text:
My materials are not showing up in the rendered view even though I assigned materials to them all
At first, they worked properly, but now none of the props in my scene are showing any materials in the rendered view. They seem to show an impression of material instead, where they are not just smooth objects but rather bumpy, sort of.
More information is that each object in the scene is made of different parts which is joined together. I of course gave them each materials before joining them with cntrl + J. I even use the UV editor to modify the way the texture displayed. But now none of it is showing which is confusing. I do not know what I did wrong. Could someone please help me?
I have included a link to the file, too. Thanks.
Blender file

for future uploads, please follow our file sharing guide to learn how to make an efficient and lightweight upload for our platform. 104MB filesize it too much for the average folk's network. Also it's a good idea to indicate which software version you are using, especially when you don't use the current stable release which most people assume to be of use. Here according to BPY you used v3.0.42, that's quite a jump backwards with many changes that happened in both render engines and shader nodes that have to be taken into account.

Looking at your blend file I'm 99% sure it's because you're doing something weird with the Ambient Occlusion map and the Base Color. Can't confirm because the node is lost between our different versions of Blender, but it should be set up with both nodes going into a Mix node, set to Multiply blend mode and the Factor at 1.0. Doing that it seems to fix it on my end.

Result:

Thanks so much for checking it out! I appreciate you taking the time to troubleshoot—I'll set it up with the Multiply blend mode and Factor at 1.0 and see if that does the trick on my end too. Thanks again! @jakemoyo

The blend file data shows it was written using Blender v3.0.42. And yet when opening the file with that version, the MixRGB nodes in your materials are shown as being undefined:

This happens when a file was done on Blender versions from 3.4 and above, and then open in an older version of Blender from before 3.4. The issue with that being that the node was changed in version 3.4:

The "MixRGB" node for Shader and Geometry Nodes is converted to the new "Mix Node" on loading. Files saved with the new node are not forward compatible with older versions of Blender (bfa0ee13d5).

Note that it is possible to upgrade a file's mix node to a newer version, but not to downgrade. So the issue occurs only when opening newer files with older versions than 3.4.
If you have a version of your file that wasn't saved with a Blender version <3.4, you could use that. Otherwise, you have to go through each of your materials and replace the undefined nodes by the available Mix node.
I made a script that should theoretically be able to do it in one click, but it will not recover the mix type nor input values. It will only preserve the old socket color inputs/output connections, and assuming you used most of these mixRGB as multipliers between albedo and ambient occlusion: it arbitrarily sets the mix nodes to multiply and the factor at 1. You can change that if you want another set of... Settings... It's below the "EXTRA OPTION" comment.
But if you don't have most of your nodes doing that albedo multiply AO, then perhaps a more neutral script that just connects all nodes as is and leaves unconnected values at default is better, in which case see this other answer.
import bpy

for material in bpy.data.materials:
    if not material.use_nodes:
        continue

    node_tree = material.node_tree
    nodes = node_tree.nodes

    fail_state = False

    for node in nodes:
        if node.name == "Mix":
            try:
                input_links = {}
                output_link = None

                if len(node.inputs) > 6 and node.inputs[6].is_linked:  # Color1 input
                    input_links[6] = node.inputs[6].links[0].from_socket
                if len(node.inputs) > 7 and node.inputs[7].is_linked:  # Color2 input
                    input_links[7] = node.inputs[7].links[0].from_socket

                if len(node.outputs) > 0 and node.outputs[2].is_linked:
                    output_link = node.outputs[2].links[0].to_socket

                mix_rgb_node = nodes.new(type="ShaderNodeMixRGB")
                mix_rgb_node.location = node.location
                # EXTRAS OPTIONS
                mix_rgb_node.blend_type = 'MULTIPLY'
                mix_rgb_node.inputs[0].default_value = 1 # Factor

                if 6 in input_links:
                    node_tree.links.new(input_links[6], mix_rgb_node.inputs[1])  # Color1 input
                if 7 in input_links:
                    node_tree.links.new(input_links[7], mix_rgb_node.inputs[2])  # Color2 input

                # Reconnect the output link to the new MixRGB node's Color output
                if output_link:
                    node_tree.links.new(mix_rgb_node.outputs[0], output_link)

                nodes.remove(node)
            except:
                print(f"failed on material '{material.name}'")
                fail_state = True

print(f"Replacement of 'Mix' nodes with 'MixRGB' nodes completed {'with errors' if fail_state else 'with no errors'}.")

Paste in text editor and run.

Thank you for explaining all that. I’ll try the script you made to convert the nodes over—setting the Mix nodes to multiply with Factor at 1 sounds like a solid starting point.  Really appreciate you going the extra mile to include those options. i cant thank u enough for your kindness.

The " upvote" and "✔ accept answer" buttons to the top left corner of an answer are there for it ;) it also makes the answer more visible on the page and better referenced in search results.


text:
Purple screen when rendering in Blender
I have 3 images as planes and I've meshed them to fit a 3D TV model which is just a basic cube with the faces mapped to images. The images as planes are videos that I have on my local machine.
When I render, one of the videos starts glitching and flickers between a purple screen. When I looked the issue up, the community mentioned it's because Blender may not be able to locate the file or fetch it's resources, but that doesn't make sense because the screen is not permanently purple, it flickers. I also relinked everything and used the Find Missing Data tool to ensure this.
I'm still unsure as to why it's happening and would appreciate any feedback.

I see you're not getting any help here.   I think your question is light on details.  May I suggest making a blend file copy and: 1) first try to simplify the rightmost "screen" down to an image sequence on a plane.  2) If problem persists, then delete all else from the file (other objects and materials), pack resources, use blend-exchange to include a link in your question.

+1 to james_t ... Even I haven't seen this kind of issue the purple is missing image, even video file is accessible there is always chance of some video's codec issue. Exporting video into image sequence and used us animated texture is simple way to identify the issue.

source: Stack Exchange

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

sort: votes


text:
I want to make my glass transparent and reflective
I using Blender 2.9 with Cycles render.
I want make a texture glass with a transparent and reflective, but I can't make it work.
I search with google, but I only found a no texture tutorial.

Did you try the no texture tutorial? It is likely that after making that node setup all you have to do is plug in the image texture.

Then where should it be placed of texture?

Likely the color input.

Just use the glass shader. If you want to add an image texture on top read the following: Add a transparent image on top of a material

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


text:
My rigged character wobbles and shakes in viewport and in render
My rigged character woobles and shakes with no reason, I checked the keyframes on the feet and body and they are not keyframed so I don't know what is causing this.

I tried deleting the keyframes of the armature but still doesn't work, the shaking problem is still there.

It seems changing the value on W Rotation in Quaternions makes the shaking movement

https://drive.google.com/file/d/180VdsMHlKyVVHsp2ex8kLoor7VqCUYJD/view?usp=sharing

Could you please describe more precisely the issue, provide screenshots or GIFs, and even your project file using blend-exchange.com so that we can better see for ourselves and find a solution?

I added a GIf for better understanding of my problem, I forgot about that sorry

are you sure you don't have a degree/radians problem?

How can I check that buddy?

I couldn't upload my blend file to blend exchange because I get an error saying my blend file is not a file supported. Can I paste a google drive URL?

It seems changing the value on W Rotation in Quaternions makes the shaking movement. How can I fix that?

Use blend without compression to upload file, delete all objects that doesn't participate on issue, I would say just the armature should be enough. You can check  root bone, but if you deleted all keyframes ... or if Armature object is not keyframes.

I can't upload it to blender exchange due to large file 46 MB, I'll leave a google drive link I hope is allowed. https://drive.google.com/file/d/180VdsMHlKyVVHsp2ex8kLoor7VqCUYJD/view?usp=sharing

Your file is big because you packed unnecessary data inside. For a rigging/animation issue, you don't need to pack in your 11MB of texture files and a 27MB HDRI file ;) Just removing these makes your file 1.5MB only.  The issue seems to come fron your spine IK setup, let me make a proper answer.

The issue comes from the way you setup your IK chains, I.E. the one that goes from your head all the way down to your hip bone.
IK is quite a sensitive thing. The longer the chain with no clear direction, the more it can give erratic results.
That's why most of the time, IK chains are about two bones long, and with a separate Start and End point that are isolated by the IK chain's influence. Because if you ask a bone to be both the effector and the affected, both roles will compete with each other. Like an arm IK only affects what's between the shoulder and hand: arm and forearm. Or a leg IK is only between the hip and the foot: thigh and tibia.
Your current setup does not have an isolated end point, and the Start point - although isolated - isn't the right one: you currently have no way to freely orient the head as it is part of the chain.
It starts from the Bone.027 and just influences all the chain down to Bone that acts like the hip bone. This can only cause issues.
First, let's prepare the rig to make it easy to use and will overall produce better results.
Preparing the rig
1. Renaming
I started by renaming all the bones so that we don't get confused and know what is what.
To make this process faster, delete the leg and arm bones on one side, so that you only have one half to take care of. Make sure to put either .r or .l at the end of the arm/leg bone names to mark their side. Then select that half and go to the menu Armature → Symmetrize to make a mirrored copy of the arms/legs with the correct side naming.
2. Clearing transforms
In Object mode, select the armature and hit ⎈ CtrlA → Apply Location and then again for Apply Scale.
This is to fix your armature's origin not being at the world center, and the scale being not equal to 1. You should also do this with your mesh objects to avoid deformation issues.
3. Fixing the rig structure
Looking at the model, some bones were at the wrong place, some were not needed at all, some other bones were missing, ... So I went ahead and changed that.
The bottom line is, look at your model, think where a deformation should happen and put a bone there.
And no matter how you build your rig, you need a "root" bone, that is at the top level of the bones hierarchy, and will serve as your rig's base placement, and also is where you will put any mesh influence that isn't taken care of by any other bone.
This bone is not just useful, it is sometimes mandatory in some softwares, so it's a good habit to always have one to avoid surprises when exporting your rig elsewhere.
And I finally removed the IK constraints and animation, so that now we can correctly rebuild a proper IK chain.
The final result should look something like this:

Making an IK chain for the neck
I'm using the neck as an example, but this would be basically the same on any chain.
1. Preparing the bones
First, we will need a "target" bone for the chain. It's the bone that the IK chain will "start from", the starting point. It's safer to not use a bone that is already used for deforming, so let's make a new one:
In edit mode, select the dot between Head and Neck.002, and hit EZ to extrude a new bone upwards. This will be our neck's IK target bone, so let's name it Neck_IK_Target.
We need this bone to follow the Head bone, so let's parent it to the Head bone with "connected" option off.
We also need the Head bone not to follow the neck bones (as they will be influenced by the IK, which the head will be the influencer), so let's parent Head to Torso with "connected" off too.
Now depending on your needs, Neck_IK_Target should either be independent of the body movement or follow the torso, or maybe even both depending on the animation.
I will not cover how to make a setup that allows to do both, so let's just pretend we need it to follow the torso: Select Neck_IK_Target then ⇧ Shift select Torso and hit ⎈ CtrlP → Make Parent Keep Offset.
We will probably need to make sure the curve of the neck points the right way and animate it, which is usually done by having a "pole target" bone the IK chain points towards.
Select Neck_IK_Target, duplicate it with ⇧ ShiftD and move it somewhat above and midway the neck. Let's name it Neck_IK_Pole. The result:

2. Setting up the constraint
Back in Pose mode, select Neck_IK_Target then shift select Neck.002 and hit ⎈ Ctrl⇧ ShiftC → Inverse Kinematics. This will add an IK constrain to Neck.002 with Neck_IK_Target set as target.
We need the chain to influence only Neck.002 and Neck.001, so set the Chain Length to 2.
Finally, set the Pole Target to Neck_IK_Pole, then the Pole Angle to 90 (the pole angle needed depends the orientation of the bones, so can be different from one setup to another. Just use whatever seems to make the chain point to the right direction.
The constraint settings should look like this:

Now you should have this result:

That's an awesome work!! Any chance in sharing the blend file? I'll take a look at it thanks very much

What a patient :) Great work. Would be good to mention Bone Properties > Relations > Parent

I rigged it properly following your instructions! thanks a lot buddy

@AlexisRivera Glad it helped! Though sorry, I didn't keep the file :o

@vklidu Thanks! I thought about mentioning this and other things, but the post was already getting long and detailed so i had to cut some things out x)


text:
My donut project can no longer render, computer freezes. Cannot fix!
I was following blender gurus tutorials and got to the part where I textured the cake area of the donut and when I try to render it, nothing shows up and it freezes my computer and I have to turn my computer off and on again.
I have no idea what settings I should lower in order for it to render better and I've already tried the decimation option, doesn't seem to work. The only other thing I can think May be the issue is the graphics card I have right now. I have a GeForce GTX 1660 SUPER. I am not extremely tech savvy, just a well-seasoned artist trying to understand 3D better.

https://blend-exchange.com/b/8LbOxlGW

theres the file

go to your modifiers and delete the subdivision surface modifiers. I even don't know why you had 3 of them...

..... Huh.... You know, I'll be completely honest with you. I don't know why I did either, haha!  Cannot thank you enough!

You are welcome. Could you please check my answer as correct?


text:
Rig Weight Paint double paint
I have a problem with my weight painting. Here is the topo when painting my bones I find myself painting them on another bone at the same time and impossible to pass the bar of .5 point influence on the right side.
Let me show you
Here you can see the paint weight I have on the bicept.L

And now I paint it at the max power I can so I can't go further than the green (it's  0.5 if it's correct) and the Bicept.R take is color too.

So I already remove the topology Mirror in the options but the mirror weight paint doesn't work after this, so I was wondering what I going wrong.
Also my radius disappearing so if someone can help me whit all my problems

Which Blender version is this?

v.2.90.1 do i need to uppgrade ?

Yes, the early 2.9 version had some issues/bugs with symmetry and weight painting. In 2.92 there is now an option named Vertex Group X under Symmetry which does the mirroring if you named the vertex groups/bones properly (such as bone.L or bones.left.001).

A simple workaround, to get rid of glitches with mirroring weight paint is: delete bicept.r, rename bicept.l as simply bicept, create a copy of bicept, use the "mirror vertex group" function on the copy, rename as needed.

ok, i will try to update blender and do what i have to correct this. and i have this probleme to all my bones not only the bicept

So, i've upgraded blender and delete renamme the bones and do a shift+D to duplicate them because the symmetrize didn't work ether, still have the same probleme even worst. However, how could we reset the parameters to zero need to see if it work

i re uploaded an ancient mesh, visibly the probleme is my mesh, what could be wrong ?

Where is the uploaded ancient mesh?

on my computer why ???

ok so I deleted half of my Mesh because it annoys me too much (I had no more ideas in mind) and obviously the painting works fine (finally) but as I have a mirror on my mesh it does not not going to cause problems for later?


text:
Custom plugin documentation - Import Helper options
I'm a developer looking to write a plugin, but am having such a hard time finding docs on the options for many inbuilt blender functions.
Specifically today I'm trying to customise the ImportHelper that comes with bpy_extras.io_utils but the only documentation I can find are existing code examples by other users, and this unhelpful stub:
https://docs.blender.org/api/current/bpy_extras.io_utils.html#bpy_extras.io_utils.ImportHelper
Where am I not looking?

It's easier to check the source code: https://projects.blender.org/blender/blender/src/commit/5721b34e53640ce68875603a6842c528e1887dcd/scripts/modules/bpy_extras/io_utils.py#L91

Ah, thank you very much. Not super detailed but I can work through it from there.


text:
Compositor node output in 4.2 doesn't have Z channel that 3.6 had
This feels daft but I cannot find anything online to reference either this feature being disabled in the 4.* releases of Blender, or a setting to enable the output depth pass being added to the final composite.
I want to use the OpenEXR format with, what would be in 3.6, the z buffer option enabled, but that is also missing. I'm using Blender 4.2 here, and the blender docs for 4.2 annoyingly show the compsitor node with the Z output there.
What am I doing wrong?

See the difference in options here.

Oh, I just realised what your problem is - you don't want to save it as OpenEXR MultiLayer, just as regular OpenEXR, right? Okay, then you got a problem and the answers given here will not help. @MartynasŽiemys I completely missed the point that he wants to save the depth in an EXR non-multilayer file.

It's all confusing how EXR is implemented in Blender. If you just render to MultilayerEXR it outputs a file with multiple "layers", but if you use File Output node, there is just one of those and still it contains multiple images. I think it's the same thing as it was if you use File Output node and just add the Z there... Does it really matter? Most software supports MultilayerEXRs now...

@MartynasŽiemys It simply was not necessary to use a File Output node. Say you render an animation with hundreds of images and just want to render with Ctrl+F12, and the scene is composited from many view layers, but for further editing in some other software you only need the composite image and a depth pass, then this was easily done by compositing everything together and enabling Z Buffer in the OpenEXR options and you had hundreds of EXR files with depth pass. Now you have to choose OpenEXR MultiLayer and get hundreds of files containing all view layers which are much larger.

@MartynasŽiemys And of course, while for tasks like this you are now forced to use the File Output node, doing something like mentioned before, storing all view layers with all passes in a single multilayer file, this is a major pain in the a$$ if you explicitly want to do it with a File Output node, because there you have to connect everything manually, no automatic saving of all passes in all layers just because you use OpenEXR MultiLayer as file format.

@GordonBrinkmann I think saving to EXR could have more functionality - for example why isn't there a choice to save multiple layers with File Output node?.. I think there should also be a choose to disable main output if File Output node is used. However, it's at most slight inconvenience. If only depth pass is needed there is only one connection in the nodes and it's possible to render single view layer, if more passes are needed, nothing changed - only Z pass was removed from randomly being there on composite node. Why not normal pass?.. Why is Z special?.. Now they are all uniform.

Oh, OK, I get it. If you want to render multiple view layers each with Z pass to separate files... OK... That probably means that now you have to do more work same as if you wanted to do that with any other pass.

@MartynasŽiemys Z pass is special because other 2D software like image and video editors can use depth information for various things, whereas normal pass, UV pass etc. are often only interesting for 3D software, some of the passes maybe just for Blender compositing and nowhere else. And no, I don't mean multiple layers and each Z pass in separate files. I mean multiple layers composited into a single image and a single Z pass. In older Blender versions you can do this just by hitting F12 or Ctrl+F12 - now you get multilayer files blown up with data or are forced to use File Output.

Let us continue this discussion in chat.

Basically the answer by @MartynasŽiemys is completely fine, this last sentence says it all: "You can choose MultilayerEXR and all enabled passes will be saved in it."
But since you are missing the Z socket in the Composite node, I guess there is a general misunderstanding on your behalf how this works. The Z input on the Composite node is not necessary to store the actual unmodified depth pass - not in 4.2, and not in older versions like 3.6 either.
Just like the Alpha socket which is still there in newer versions, it is only necessary if you want to manipulate the pass.
Whenever you save the render result from the Image Editor with Save Image As... and choose the file format OpenEXR MultiLayer, all passes will be saved within the file withoutd the need to connect them beforehand (just like you don't need to connect something to Alpha to save an image with transparent background - it has a Use Alpha checkbox for that).
The thing is, these passes are not stored in the Composite layer, but the View Layer. Take the following example, I render a simple scene and have several non-default passes enabled. They appear on the Render Layers node as output sockets:

I did not connect any of them to the Composite node or anywhere else. Then I save the render result with Save Image As... and choose OpenEXR MultiLayer as file format:

Now I go back to the Compositor and add an Image node where I load the saved EXR file. Now this does not look very promising at first - maybe you tried it like that and got this result:

However, if I switch the Layer from Composite to View Layer, the node has a lot more outputs as you can see, all those which the Render Layers node has. With the only difference that the XYZ channels of the vector passes are stored in the RGB channels of color passes, that's why they are all yellow.

The name View Layer is the one of the layer which you rendered. And if you have multiple view layers in your scene which you all render, then they all are stored in the EXR file and you can choose which one of them you need - or use multiple Image nodes to get them all. This way you have all separate render results in the corresponding view layers' Combined output and the actual Compositor result in the Composite layer's Combined output.

Exactly what I needed, thank you very much Gordon.

You can save depth pass same way as any other pass. There is nothing special about it so it seems the developers decided to remove it from where it was for no reason at all. It's just a pass same as UV, or normal, or ambient occlusion or any one of other passes.
You can choose MultilayerEXR and all enabled passes will be saved in it.

+1, although I can imagine for someone who is not aware how the multilayer EXR stores all this data and especially how to retrieve it, this might not be so obvious - so forgive me that I gave another answer where I explained it further.


text:
Object rotation during export
The thing is, when I export the model (having previously applied all transform), the next time I import the floor, the model turns slightly, how can I fix it?
Before export

After the export, the next import

Hello and welcome. Can you share the blend file https://blend-exchange.com

Blender uses floating point maths to define all it's numbers that locate an object. There is some limitations to floating point maths in the computing world so some extremely small errors can occur. Particularly when importing things.
For a more complete answer on why floating point numbers get rounded see this video: https://www.youtube.com/watch?v=2gIxbTn7GSc&ab_channel=b001
That rotarion differance is so small it's really not worth worrying about.


text:
Box select in Object Mode selects too many things
When I box select in blender I dont expect the selection to go through objects.
For example here I only want to select the two walls to move them down, the walls behind are okay

however with box select, it selects everything in its path

Is there some toggle or setting to avoid this behavior? Or another method of making such selections?
I know I could left click and shift left click those two walls, but on bigger selections I wanna be able to select multiple things by dragging instead of clicking everything

That's how box select is supposed to work. - It selects everything within the dotted box!

I think it is weird I expecetd this kind of behavior when box selecting in wireframe/xray mode

If you are selecting only two objects, I think you can use use shift-left-click to select them.

This is a bad limitation of selection in Object Mode, IMO. But it is one. Upvote it on Right-Click-Select


text:
Default Pivot Point
Is there a way to change the where the default pivot point for an added object is at? For example, can it be set so that when adding a cube the pivot point is at one of the bottom vertices, from the beginning without having to manually change it, instead of the current default at the object's center?

I guess you mean the origin of the object. Simple answer: no. Unless you are firm enough to change the source code to create your own build of Blender that has this feature.

Yes. Sorry if I got the terminology wrong.


text:
How to remove non-exact overlapping faces and vertices in blender?
I've been modifiying and sculpting on an existing blender model for a while, but then I noticed that the mesh had some weird overlappings, which is causing problems with boolean tools.
Take a look:

Using tools like "Merge by Distance" have no effect here because the planes dont have he same amount of vertices and are peer-connected to the "second layer".
Is there a way to remove these so that I have one layer only? I was not able to find a solution here.
And I dont want to spend hours of finding every face and deleting it, which also causes holes since they're all inter-connected here.
Your help would be much appreciated!
Thanks!

Hello and welcome. Hmm that is terrible topology, consider modeling it again.

I would as well consider modelling whatever this is again. Seems like something that requires manual work to fix and a lot of it for questionable result. Better to do it right from the start. From my experience, it often surprisingly ends up being faster as well.

You could remesh your mesh (Object Data > Remesh > Quad).
Or select all in Edit mode and try the Mesh > Clean Up > Delete Loose function, which will remove all the floating edges:

Or try the Mesh: 3D-Print Toolbox addon, enable it, select your object, in the N panel click on the 3D-Print tab, press the Check All button, in Edit mode press on Non Manifold Edges button, it will select the floating edges, remove them with X or click on the Clean Up > Make Manifold button:

Thanks, its promising, but somehow its not working for me...
Selected Non Manifold Edges:
https://i.gyazo.com/9df111fe065ff6cb3ccffa3a232c04ab.png
"Make Manifold":
https://i.gyazo.com/ebfb5cdd838e6141ff42b2a9d5f8c1aa.png
Deleting faces only leaves many holes in the mesh...
Do you have an other idea how I can solve this?

hard to say without the file, it may be too compliated to calculate, but maybe consider using the quad remesh tool?


text:
How do you use geometry nodes to set position with vertex group?
How can I use a vertex group to set the end position of a bezier segment?

make a vertex group then you a named attribute node to access it for use as the selection.

The named attribute node doesn't loop through the indexes so it outputs a default value of 0 or 1

Do you think this could work with a vertex group? If I box-select a few vertices and assign them to a vertex group in which order would you get them from the group? What defines the order? Is there an order at all?

If you want to convert edges to a curve, you may want to use Mesh to Curve with an empty curve input

I see what you are saying, and a vertex group can't work. do you want to set the vertex index manually?


text:
How to isolate the light diffused from a specific object?
I’m doing an interior render for a carpet company. I need to show all the carpet's colour variants in the same interior scene.
I’m rendering the carpet with a neutral colour, and then adding the various carpet colours in Photoshop. All good so far:

In real-life, the carpet would reflect its colour onto nearby objects. For example, a yellow carpet would reflect a little bit of yellow onto nearby objects:

So I want to isolate the light diffused specifically from the carpet so I can add a colour overlay in Photoshop to simulate how it would work in real-life.
I know how to get a pass with all of the scene’s diffuse light. Does anyone know how to isolate the light diffused from a specific object? I assume there's a way in the compositor to mask the diffuse light pass to only show the light diffused by the carpet...

Curious.. why not add the color to the carpet's material, and let Cycles do the indirect bounce for you?

@RobinBetts because I need to do multiple colours, and it's quicker to add them in Photoshop than render the same scene for each colour...

OK, I guess it depends on your workflow. Arranging all the carpet-textures as an image sequence, and going away for a cup of tea while they all render, seems quite attractive :)


text:
Cut object and change length
I am a beginner at blender. What would be the easiest method to delete the phone holder and decrease the length of the arm? I can look up more into the method (or the steps) by my own I just need some guidance.

The topology here scares me, if the phone holder is a cylindrical part and connected to everything else, I could only use manual selection...

@KISKAart No the phone holder is not the cylindrical part. That is the cup holder. Maybe it just easier to start from scratch to achieve what I want then to modify an existing model?

It is probably easier to redo the model, I would start with a low poly cylinder and carefully place edge loops where you need them. I think there were several objects with boolean modifiers here. You can find some good topology tutorials online.


text:
Fill in hole with too many faces and edges
I am new to blender and I'm trying to learn how to fill in the hole in the image below.
I have searched on youtube, google and stackexchange on how to fill holes and all the solutions are either using looptools bridge or alt + F. This however do not work for the object I have since I am not able to select all the tiny pieces of edges. I managed to join the four parts into one object, now however I have been stuck for hours. Any idea on how to proceed and fill the hole?
Thanks in advance!

I think we are gong to have to see your Blend file. - It looks from the Moire patterns on the sides of those cylinders as if you have duplicate meshes in the same place. You can share your blend file via https://blend-exchange.com/ following the instructions on that page.

I would suggest maybe building the shape with less geometry and using the circle object with different radii first then upping the sibdivision later to get smoother results.
Maybe follow the following steps:

In general, I always like to model with less geometry and then refine later, less geometry means less you need to keep track of to get yourself a good result! Hope this helps at all :)
To Answer the question in your comment I would go about it like this:

So let's take this setup again without deleting the interior geometry of the circles.

Again we merge the corresponding verts.

Select following verts and create face

Close the faces of the circles by selecting the corresponding verts (CTRL click helps select verts in a line fast!)

Extrude all faces together

Lastly select the circle faces and extrude those once more to get the desired height! Hope this helps :)

Could you edit to explain how you went from stop 1 (the 4 circles) to step 2 (the basic outline)?

Sure! Added captions to the images but they didn't seem to come up >:(
step 1: Start by creating a circle object and duplicate the circle and use s to scale the circles until you create a rough outline of the shape you need.
step 2: Delete the extra vertices that don't make up your shape (x to delete)
step 3: Select corresponding vertices that are almost overlapping and merge them using 'm' at centre
Step 4: Select all and press 'f' to create the face :)

This answer helped a lot! Thank you! I do however still have some issues. The hard part here is that the cylinders have different height where the height of the "link" between the cylinders have the same height as the cylinder with the larger radius. How would you take that into consideration?

Check out my edit, this should help you :)

It turned out great! Thank you so much!

No Problem! I'm glad I could help :)

Selecting Loops can be useful.  I would create faces as follows:

Select a verticle segment on both sides where you want new edges, or select two adjacent vertices and "Select :: Loops :: Edge" to extend the selection:

The use the menu "Edge :: Bridge" to create the new edges
subdivide these edges "sufficiently" (you can always add a Smooth or Subdivision modifiers later).
same for other side of the destination face
In Edit-Edge mode, carefully select the corner edges of the target face
"Select :: Loops :: Edge" to extend the selection all the way around

use the menu "Vertex :: New Face" for these edges.

and you'll get this new face where the edges can be moved to sculpt into some curve.

do the same for the other (bottom) side

In terms of "sculpting" the new edge into some curve, you could select a set of vertices halfway in-between the left/right sides and proportionally move.  You can do this before or after adding the new faces.

First of all the topology of your model is way too complex that it needs to be (I would say like a 1000% more maybe even more). You should try to keep the topology as simple as possible. If you need the model to be smooth you can alway right-click -> shade smooth or use a subdivision modifier. Second of all if you are trying to make it one continuos shape, this is not a way to do it. Joining the geometries into one object does not mean the geometries are actually connected (and with the topology you have it would be very hard to do so)
Anyway to your question. You can select a whole loopcut by holding alt + selecting you geometry. this way you woudn't have to click every single edge separately. you can also select one of the edges and while holding ctrl+shift select another one. This will select the shortest path needed to reach it.

First normal click, second alt+click, third ctrl+shift click
Now for the question about connecting faces. Alt+f is a shortcut for filling a face. That is possible only when you have a closed loop of edges that you want to fill with faces. I cannot really see whether the shape in the middle is closed or not as it overlaps with the cylinders but my guess is it is not. What you probably want to do is simple F shortcut. This creates a new face between selected geometries like so:

My guess is your geometry looks like this underneath the cylinders (though with much much more complex topology):

By combining info I gave you you'll simply do something like this:

I strongly recommend you to start over with much less topology as the geometry is simple enough to create from scratch and you won't run into troubles in the future with it. Personally I would create such shape from bezier curve. It is quite simple to manipulate with (you could do it with just a few control points) and you don't have tu worry about messing up topology.


text:
When I convert from GLB to FBX, the texture is lost, any advice?
Hello I've been trying to find a solution to this issue and was hoping someone could help
(this is in blender btw)
I then export it as an fbx, after doing so I then reimport it back into blender as an fbx. Upon doing that all I see is my 3d model but without texture.
Any advice as to how I can get the texture to remain after converting from .glb to fbx. Thank you :)

Look at the shader node graph after importing. The base color texture needs to be plugged directly into the Principled BSDF Base Color socket for the FBX export to work.

thank u so much i will try that right now


text:
Bulk Create custom node group Materials from Image Directory
I kindly ask for your help on the following:

I have created a custom node group that has 1 single image as an input

I have a very large directory of textures to be used as input for this custom node group

as I'm not a programmer, I would like to know if there is a simple script that can create, in bulk, inside the Blend file, a series of materials that

look like the one in the screenshot
each one has a different image from the directory as an input
each one takes the name from the image

thank you in advance for any help you can give me

That can be this kind of script.
Details are in comments in the code.
Note: material output in not in the image in the question, but I've added it in the script.
import bpy
import os

def get_images(directory):
    return os.listdir(directory)

def image_to_material(directory, image_name, pbr_group, replace = True):

    # if image and material are to be replaced
    if replace:
        image = bpy.data.images.get(image_name)
        if image:
            bpy.data.images.remove(image)
        material = bpy.data.materials.get(image_name)
        if material:
            bpy.data.materials.remove(material)

    # get the image
    image = bpy.data.images.load(os.path.join(directory, image_name))

    # create the material
    material = bpy.data.materials.new(image_name)
    material.use_nodes = True
    node_tree = material.node_tree
    principled = node_tree.nodes['Principled BSDF']
    node_tree.nodes.remove(principled) # default principled is removed in this case

    # insert the pbr group in the material tree
    group_node = node_tree.nodes.new(type='ShaderNodeGroup')
    group_node.node_tree = pbr_group

    # insert the image texture node
    image_node = node_tree.nodes.new(type="ShaderNodeTexImage")
    image_node.image = image

    # get the material output
    output_node = node_tree.nodes['Material Output']

    # link the image texture to the group and the group to material output
    node_tree.links.new(image_node.outputs[0], group_node.inputs[0])
    node_tree.links.new(group_node.outputs[0], output_node.inputs[0])

    # place them
    group_node.location = (output_node.location.x - group_node.width - 100, output_node.location.y)
    image_node.location = (group_node.location.x - image_node.width - 100, group_node.location.y)

directory = "d:/temp/images" # your directory here

pbr_group_name = "test" # your node group name here
pbr_group = bpy.data.node_groups.get(pbr_group_name)

if pbr_group:
    # loop over image file names
    for image_name in get_images(directory):
        try:
            # create the material
            image_to_material(directory, image_name, pbr_group)
        except Exception as e:
            # in case, for instance, one of the files is not loadable
            print( f"An error occured for {image_name}", e)
else:
    print("Group not found")


text:
Issue with UV unwrapping on chair
I have made a chair where I made the first 1/2 of it and the copied and mirrored the other side to make it equal. I then joined the pieces together and closed the shape using bridge edge loops.
When looking at the object you can still see a crease where the center of the object is.

When going into the shading tool this becomes even worse. I have unwrapped it using smart UV project.

I have also merged the chair in another way which fixed the problem in solid mode

But when going to the shading I can still see similar errors on the textures.

The chair has scale applied to it. What could be the issue? And how could I resolve it?

Hello, what does it give if you switch the normal Image Texture node from sRGB to Non-Color? Or please pack the images and share your file?

How did you "copy and mirror the other side" ? Did you use a mirror modifier and if so have you deleted any internal face there may be between the halves of the mirror? We'll need to see your Blend file to see exactly what's going on. You can share it via https://blend-exchange.com/ following the instructions there.

The solution from @moonboots worked, the chair now looks correct with the textures. Thank you for your help!

for your first question, there's probably a problem in your topology, like an inner face or overlapping vertices, but hard to say without the object

Switch the normal Image Texture node from sRGB to Non-Color

This is most probably a normal issue, make sure your normals are all facing the correct way! You can check them this way:

All of your outward facing normals should appear blue. If you notice some faces are red while others are blue you can reset this by simply selecting all the faces in edit mode and hitting alt + n and hitting recalculate outside.
When it comes to the actual UV of the chair, I suggest you lessen your poly count significantly as this will make manouevering the UV layout much easier. You don't need all of those polys as is. You can always subdivide the result after using a subdivide modifier!
Ideally to UV correctly you should place seams where you would expect the chair to have seams in real life! Think about it, nothing made of fabric will have no seams at all. Once you've decided on your seams and marked the edges (Select edges -> right click -> mark as seam) make sure all transforms are applied and just hit a normal unwrap! This should make the UVs much cleaner!
A quicker fix to the issue if you don't want to go through the full UV unwrapping procedure, I find the Cube project generally works a lot better than the Smart UV Unwrap as it doesn't create small islands
Let me know if this helps :)


text:
Strange artifacts on cycles render

Do you have any idea what is causing these artifacts on my cycles render?
I'm using a sun light source to illuminate the scene.
128 samples.
I've pasted a screenshot of the material that the artifacts are happening on

I solved the problem by raising the samples count to 400

Looks as if you were using denoising on a extremely low sample count.

I did use denoising, so it could definitely have been that. I have just never seen it before and I always use denoising. Even with low sample count

The default denoiser of Blender has some issues especially with monotone and flat surfaces, which your case does fit perfectly. The results are those clouds that form.


text:
Any way of not displaying white mesh border lines in 3D viewport when texture painting?
I'm painting a mesh with two materials, but I don't want to paint over the other materials, so I have the "face selection masking for painting" on.
The problem is that it shows these white mesh lines.
Is there any way to turn that off, so it's easier to see what I'm painting?
I don't remember this being a problem in 2.79

Simply turn off overlays in the top right corner over there by the gizmo, and then toggle back when you need to see your selection outline again.

Ah great! For me it was on the bottom right, but I found it. Thanks Craig!

Turn off overlays by pressing this button, either in the top or bottom right of the 3D Viewport


text:
3d Volume from 2d Texture
is it somehow possible to generate volumetric information from a 2D Image Texture?

I experimented already quite a bit, but with no succes. I thought about using the RGB, or better said, the BW-Information to generate the missing vector.
An alternative which i thought would work, was to use the image as a input Position for a gradient (spheric), since the gradients are all volumetric by themselves. Also, with no succes.
The mockup was created by using an empty and its object coordinates as gradient input vector.
Thanks in advance!

I have just been playing with this. Use a Gradient Texture Node but set it to Quadratic Sphere.

A very good question. I would love to figure this out or find an answer to this as well. That would be quite useful.

Here's a clunky sort of first step (maybe not towards where you want to go):
Make a height-map of the subject (Mist Pass, 0-1, front to back of a containing cube)

Set up a node tree something like this:

Where each shading point asks whether, in 0-1 generated texture coordinate space, its Z value is close to the R value in the depth map for its XY. If it is, it lights up.
(Sorry to be confusing, but here, XY has been mapped to XZ, and Y checked against the map, to get Suzanne facing down Y)
The 'Close to' node group just returns 1 if Value1 and Value2 are within Delta of one another, 0 otherwise.
The 'Less Than' node checks if the Y value is close to 1, to get rid of the background, 'beyond everything' values in the depth map.
This is the result:

I tried projecting height-maps down X and Z as well, which could be encoded in G and B of the texture, but they were not automatically calibrated for position or scale, I may just have slipped up somewhere.
But I thought , anyway, it would be better to go for a spherical height map: bake a displacement map of the subject from an enclosing sphere, and store it as, say, a Mercator projection? And then, instead of using Z as the lookup, use the shading point's angles, theta and phi from the origin, to look up the point in the texture to check against.
Then you could use Alpha to store depth, and R,G and B to store R,G and B, to get colored (but not fully covered) volumes.
But since there will be lots of gotchas, and I'm not @Rich Sedman, that may take a while.

I just figured out why the X and Z mist-passes weren't calibrated.. they were quadratic, not linear. No time right now..

Wow, thats already great! I thought about baking a texture of the object-space colours, each pixel would essentially describe a xyz value. Would it be possible to cast lines from the origin of the cube and check them against those values?

@Chris If you bake to a UV map, then, without a 3D mesh, there's no mapping from  the shading point, no lookup into the texture, and we're trying to avoid 3D info ( otherwise we could just use a Point Density texture). If we bake to a known projection of some sort, then 2 dimensions are  implicit in the location of the pixel in the texture, making 2 dimensions of  its object-space color redundant? There has to be some sort of lookup, with the shading point as key. Unless you want a full search of the texture file on every sample, for a pixel matching the shading point... which you don't :)

@Robin Betts hmh, you're right. I probably have thought something not entirely trough^^. In my mind i had it layed out somewhat like this: Based on the normal of the surface a line gets cast perpendicular to the inside of the mesh (not the origin). To get the depth i wanted to use the white levels of the texture that previously  were painted in texture paint. So there would be a 3D Mesh to cast from.

There might well be a way we haven't thought of ... when I saw your idea I was very tempted... even skirted around with how holograms work... after all the surface of an object is 2D,.. it's a lovely question.

@Robin Betts i just had a thought, but i first need to explain my basic idea. What i initially planned, was to use this to distort noises in Blender, since they are "volumetric" or "3D" you can cut trough them with a bool and see their inner workings. For more control as to where some distortions/scale irregularities happen i wanted to use a texture. The issue is that they only distort on a surface level, so i tried to extend those into the mesh. I think that my basic idea as to how this could work is obsolete now, since by slicing the mesh, the geometry gets changed...

Default Cube with a Color Ramp powered from the Gradient Texture set to Quadratic Sphere

Now with the Generated Texture coordinates tweaked to place the center at the centre of the Default Cube

Using Emission Shader because it looks cool.

Procedural Gradient texture in Blender is 3d. The question is about a 2d image.


text:
Change active View Layer with Python
I'm currently trying to figure out how i can change the active view layer with python. The change to 2.8 made sourcing for documentation quite difficult.
I'd be thankfull for any help!

Set Window.view_layer
From https://code.blender.org/2017/09/view-layers-and-collections/

For simplicity now, we stick to having a single ‘active View Layer’
  per Blender window.

Set the view_layer property of the context window to the view layer you wish to be active for that window.
Example using py console. I have 3 viewlayers "RenderLayer", "View Layer" and "XXXX", code below sets "XXXX" as active in current (context) window.
>>> vl = C.scene.view_layers['
                              RenderLayer']
                              View Layer']
                              XXXX']
>>> vl = C.scene.view_layers['XXXX']
>>> C.window.view_layer = vl
>>>

Thank you very much! It was far simpler than i imagined. Its essentially just: bpy.context.window.view_layer = bpy.context.scene.view_layers ['Layer_Name']

Possibly worth noting used to set context scene via context.screen.scene = scn, now that is also done via window also.  context.window.scene = scn.

sorry, that was just a misclick. It showed me that there has been an edit, so i've reloaded the page. After that it must have been unset again. Sorry!

Cheers, didn't think it could be from changing "Render Layer" to "RenderLayer" lol.

haha :D that would be quite harsh


text:
Use Geometry Nodes Raycast to detect closest surface and place Object there
I'm trying to get a dynamic contact point for a shrinkwrap modifier. The normal projection of the shrinkwrap is not enough in my case, as i need the closest point of another surface. However i'm not having any luck in getting the values from the raycast back that i need.
Here is my current setup:

I would want to get the shortest ray, and at its hit point i want to spawn a simple icosphere, or other mesh. In my mind its quite simple to achieve, but i cant get it to work.

Just a few thoughts: It doesn't work this way because you use the sphere's Geometry for the Set Position and since the Ray Cast node also is connected to it, the Ray Cast node uses the sphere to cast rays from it. The Set Position node will move the vertices of the sphere to the hit position (=shrinkwrap the sphere). You need to do something with the circle's geometry (Group Input > Geometry). Also, you need the closest hit position. Maybe Attribute Statistics helps but this can only get you one value. You need the distance & location... you probably also need a Sample node...

You need 2 Attribute Statistic nodes then it kinda works. I'm just curious what do you need this for? The shortest distance makes the sphere jump over pits and stick it to bumps. Here is a demo: https://i.sstatic.net/J3nVt.gif. It reveals that the sphere sticks half into the ground because the origin is in the center. So I guess you have to move it "back" along the normal of the floor plane to gently touch the floor.

Thank you booth for your Tipps! I'll try it asap :) i need to visualize a theoretical contact point of a tire to the ground. I'll Post my result

Since your source-object is circular, can you dispense with ray-casting altogether and just find the closest point on the target-plane, to source (0,0,0) ?

Which does this:

And for non-circular object you could go through the bottom curve, capture the attribute of the distance to the nearest point on the top object, then use a statistics node to find the minimum, then find the lowest index with such value as the distance and then sample the point with that index.


text:
Find outside/inside curve of two curves
in geometry nodes i want to determine which curves lies on the inside (our outside) of a turn.
I found out that it should, in general, be possible to do so by calculating the curvature of of the curves and then comparing those values. The larger one should usually be the outside curve. My goal is to get and use these values as "mask" for further GN Stuff.
I base these two curves on one single bezier curve:

Here i take my input curve and offset it by a factor in the normal direction, however i'm unsure about calculating the curvature and then comparing it. Does anyone have an idea how i could calculate the curvature for each point in the curve and then compare them? Thanks in advance.

I think your problem boils down to being able to have a common factor between the two curves. Spline factor and spline length wouldn't be related between the two curves (inner curve factor goes quicker than outter). How did you get the two curves ? Would it be ok for your application to generate the curves in GN with one central curve (midpoint between the curves) ? If yes, I have a simple solution.

yes that would be okay, actually that would be the preferred way. In my second image you can see how i'm generating the two curves atm. I use an input bezier curve and offset its values and normals to offset it. The resample node gives a better curve with better normals for the offset. Could it be possible to store an own "Index+Angle/Curvature" and go from there?

Curvature of a Curve
This solution should work for curves with variable z-position, as long as the general shape is somewhat planar.
By using the Cross Product on the tangent of the current point and the next one, we get a perpendicular vector, pointing up when curve goes to the left, and pointing down when the curve goes to the right. We can then extract the z position and test its signature.

In orange is the current tangent $\vec{t_n}$, in red is the next tangent $\vec{t_{n+1}}$ and in blue the cross product. I've drawn another example a little further along the curve, where curvature is opposite.
Let's store the boolean isRightTurn as attribute. From there it's straight forward. The outter part is only define by the left/right curve and if we are in a left/right turn.
For the right curve, we reverse the boolean with Not. For the left curve, we take the boolean as is. Here is for the right curve :

If we plug the isOutter attribute, we get the expected result :

Oversight
The last point of the curve will not get a correct computation of the curvature. I would suggest manually giving its correct value if it generates some issue.

Blend file

Lovely answer.. I guess to default the non-existent curvature at the end-points, you could do something like make an arbitrary extension to the curves by reflecting the adjacent points about the ends, or something like that? .. But that would be a user preference, anyway..


text:
Interface Panel not Updating correctly
i'm currently trying to add presets to the addon i'm developing, while creating and loading those presets works fine, updating the values in the panel that the properties are used in does not work in the way i thougt it would. While other native presets menus like the render resolution menu will update the moment you click on a preset, the values in mine will not. Only after moving the mouse all values in the panel change. Do i have to include an update routine somewhere?
I'm using the same systems blender uses.
Heres my code
    import bpy
    from bl_operators.presets import AddPresetBase
    from bl_ui.utils import PresetPanel
    from bpy.types import Panel, Menu, Operator, WindowManager

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

    class CustomProperties(bpy.types.PropertyGroup):
        fps: IntProperty(name="FPS", default=24, min=1, max=244)
        quality: IntProperty(name="Quality", default=75,min=1,max=100)

    class My_OP(Operator):
        bl_idname = "my.operator"
        bl_label = 'My Cool OP'
        bl_options = {'PRESET'}

    class MY_MT_Presets(Menu):
        bl_label = 'My Presets'
        preset_subdir = 'object/mypresets'
        preset_operator = 'script.execute_preset'
        draw = Menu.draw_preset

    class OT_AddMyPreset(AddPresetBase, Operator):
        bl_idname = 'my.add_preset'
        bl_label = 'Add a preset'
        preset_menu = 'MY_MT_Presets'

        # Common variables used for all preset values
        preset_defines = [
            'obj = bpy.context.object',
            'scene = bpy.context.scene'
        ]

        # Properties to store in the preset
        preset_values = [
            'scene.custom_properties.fps',
            'scene.custom_properties.quality'
        ]

        # Directory to store the presets
        preset_subdir = 'object/my_presets'

    class MY_PT_presets(PresetPanel, Panel):
        bl_label = 'My Presets'
        preset_subdir = 'object/my_presets'
        preset_operator = 'script.execute_preset'
        preset_add_operator = 'my.add_preset'

    class My_PT_Panel(Panel):
        bl_label = 'My Panel'
        bl_space_type = 'PROPERTIES'
        bl_region_type = 'WINDOW'
        bl_context = 'output'
        bl_category = 'Output'

        def draw_header_preset(self, _context):
            MY_PT_presets.draw_panel_header(self.layout)

        def draw(self, context):
            scene = context.scene
            props = scene.custom_properties

            layout = self.layout
            row = layout.row
            layout.prop(props, "fps")
            layout.prop(props, "quality")

    def register():
        bpy.utils.register_class(CustomProperties)
        bpy.utils.register_class(My_OP)
        bpy.utils.register_class(MY_MT_Presets)
        bpy.utils.register_class(OT_AddMyPreset)
        bpy.utils.register_class(MY_PT_presets)
        bpy.utils.register_class(My_PT_Panel)

        bpy.types.Scene.custom_properties = bpy.props.PointerProperty(type=CustomProperties)

    def unregister():
        bpy.utils.unregister_class(CustomProperties)
        bpy.utils.unregister_class(My_OP)
        bpy.utils.unregister_class(MY_MT_Presets)
        bpy.utils.unregister_class(OT_AddMyPreset)
        bpy.utils.unregister_class(MY_PT_presets)
        bpy.utils.unregister_class(My_PT_Panel)

        del bpy.types.Scene.custom_properties
    if __name__ == "__main__":
        register()

And here's how it looks in blender. Its located in the Render Output Panel

Once you've clicked on a preset, it should update the values in the panel, but only does so once you've moved the mouse out of the black box.
Does anyone know whats the reason for this?

This is a different approach
import bpy
from bl_operators.presets import AddPresetBase
from bl_ui.utils import PresetPanel
from bpy.types import Panel, Menu, Operator, WindowManager
from bpy.props import BoolProperty, StringProperty, IntProperty, FloatProperty

class CustomProperties(bpy.types.PropertyGroup):
    fps: IntProperty(name="FPS", default=24, min=1, max=244)
    quality: IntProperty(name="Quality", default=75, min=1, max=100)

class My_OP(Operator):
    bl_idname = "my.operator"
    bl_label = "My Cool OP"
    bl_options = {"PRESET"}

class MY_MT_Presets(Menu):
    bl_label = "My Presets"
    preset_subdir = "object/my_presets"
    preset_operator = "script.execute_preset"
    preset_add_operator = "my.add_preset"
    preset_operator_defaults = {"menu_idname": "MY_MT_Presets"}

    def draw(self, context):
        self.draw_preset(context)

class OT_AddMyPreset(AddPresetBase, Operator):
    bl_idname = "my.add_preset"
    bl_label = "Add a preset"
    preset_menu = "MY_MT_Presets"

    # Directory to store the presets
    preset_subdir = "object/my_presets"

    # Common variables used for all preset values
    preset_defines = ["obj = bpy.context.object", "scene = bpy.context.scene"]

    # Properties to store in the preset
    preset_values = ["scene.custom_properties.fps", "scene.custom_properties.quality"]

class MY_PT_presets(PresetPanel, Panel):
    bl_label = "My Presets"

    def draw(self, context):
        layout = self.layout
        layout.emboss = "PULLDOWN_MENU"
        layout.operator_context = "EXEC_DEFAULT"
        layout.menu_contents("MY_MT_Presets")
        context.area.tag_redraw()

class My_PT_Panel(Panel):
    bl_label = "My Panel"
    bl_space_type = "PROPERTIES"
    bl_region_type = "WINDOW"
    bl_context = "output"
    bl_category = "Output"

    def draw_header_preset(self, _context):
        MY_PT_presets.draw_panel_header(self.layout)

    def draw(self, context):
        scene = context.scene
        props = scene.custom_properties

        layout = self.layout
        row = layout.row
        layout.prop(props, "fps")
        layout.prop(props, "quality")

def register():
    bpy.utils.register_class(CustomProperties)
    bpy.utils.register_class(My_OP)
    bpy.utils.register_class(MY_MT_Presets)
    bpy.utils.register_class(OT_AddMyPreset)
    bpy.utils.register_class(MY_PT_presets)
    bpy.utils.register_class(My_PT_Panel)

    bpy.types.Scene.custom_properties = bpy.props.PointerProperty(type=CustomProperties)

def unregister():
    bpy.utils.unregister_class(CustomProperties)
    bpy.utils.unregister_class(My_OP)
    bpy.utils.unregister_class(MY_MT_Presets)
    bpy.utils.unregister_class(OT_AddMyPreset)
    bpy.utils.unregister_class(MY_PT_presets)
    bpy.utils.unregister_class(My_PT_Panel)

    del bpy.types.Scene.custom_properties

if __name__ == "__main__":
    register()

Another way:
Add to line 57: def __del__(self): bpy.context.area.tag_redraw()
class MY_PT_presets(PresetPanel, Panel):
    bl_label = 'My Presets'
    preset_subdir = 'object/my_presets'
    preset_operator = 'script.execute_preset'
    preset_add_operator = 'my.add_preset'

    def __del__(self): bpy.context.area.tag_redraw()


text:
How to get a specific color/slot from a Color Palette
i'm currently trying out a few different things and hit a wall when I was trying to get the rgb value of a color in a palette:

I'm looking for the RGB Value of one of the colors in this palette, and i want to get it by python and not just by "what slot is active" but by some sort of ID/Name, my next idea was to go to the Blender File API and look there for the Datapath of the individual color to get an idea how i would need to write my script, however right clicking on it there, does not reveal the usual feature to "copy Data Path" so i suspect that the information is stored somewhere deeper and that i need to access it in another way.

Sidenote: It would be really great if we were able to Change the name of the individual colors here and i think that is something that is planned.
My final goal would be to get the color and with that set the color of a material on an object, the last part of it i already got down.
Has anyone an idea how i could get the vaulue? I was only able to get the data path up to the Palette itself:
bpy.data.palettes["PaletteTest"].name

But not on the values it contains.

Related https://blender.stackexchange.com/a/73137/15543

Palette has a colors collection.
Example of displaying and  creating palettes.  How do i create Palette UI object
Add a new palette,
>>> pal = D.palettes.new("Test")

The palettes color collection holds objects of type bpy.types.PaletteColor.  The color is its PaletteColor.color property
give it 10 random colors.
>>> from random import random
>>> for i in range(10):
...     col = pal.colors.new()
...     col.color = (random(), random(), random())
...

All the palettes in the file (just the new one for example)
>>> for pal in D.palettes:
...     pal.name
...
'Test'

Get that particular palette, will be None if it doesn't exist
>>> pal = bpy.data.palettes.get("Test")

display its colors..
>>> for col in pal.colors:
...     col.color[:]
...
(0.9453005194664001, 0.5010330677032471, 0.5785542726516724)
(0.8932003378868103, 0.4246959388256073, 0.30071189999580383)
(0.867354154586792, 0.40056300163269043, 0.9528054594993591)
(0.9828635454177856, 0.22360216081142426, 0.7132857441902161)
(0.6740276217460632, 0.6160644888877869, 0.43397003412246704)
(0.65944504737854, 0.4424607753753662, 0.7807620763778687)
(0.8238367438316345, 0.5752789378166199, 0.6956546306610107)
(0.11555215716362, 0.7942420244216919, 0.33690154552459717)
(0.026920389384031296, 0.7090178728103638, 0.9057185053825378)
(0.36781519651412964, 0.18919502198696136, 0.32881513237953186)

>>>

So bpy.data.palettes.get("PaletteName".colors returns a list/array with all entries in it, how would i get a specific one from that, like the fifth as an example?

AFAIK the colors aren't assigned name. Index by number pal.colors[0] is the first, etc. & foo.get("bar").prop defeats the purpose, throwing an error  if foo.bar is None.   Instead if not pal:.

Ah okay, i think with the value that is returned its not possible to just straight put it into the value of an RGB Node ... .nodes["NameOfNode"].outputs[0].default_value = (bpy.data.palettes.get("PaletteTest").colors[5]). I get an error doing that : ValueError: bpy_struct: item.attr = val: sequence expected at dimension 1, not 'PaletteColor'

r, g, b = pal.colors[4].color is the (r, g, b) value given to the 5th color. (ie Use the color attribute as shown in answer)  Some nodes may require an alpha, default_value = (r, g, b, 1)

that did it! Thank you very much :) !


text:
Blender Game - music problem
I have a problem with soundtrack and sounds
In the Blender Game (while using blender) sounds and music seems right and i can clearly hear both of them. but when i export my game as game engine runtime, and then play my game, sounds and music disappears. Can somebody help me?

Did you packed your sounds inside the blend file? Try using external sound files, relative to the blend file.

The simplest way to fix this problem is to pack the sounds inside your blend file..
Use the menu command : File -> External Data -> Pack All into .blend file.

(It also gives you some fps boost!)


text:
Using graph editor to manipulate movement speed but static rotation speed
First of all, pardon me if the title is a little bit confusing. What I'm trying to make is a tossed coin animation. Like how a tossed coin should be, it move upward and rotating, and after reaching a certain height, it will slow down and finally fell (while still rotating).
Using graph editor I manage to manipulate the movement speed, but the problem is, I realized when the coin's movement started slowing down, so does the rotation speed. I wanted the rotation speed to be static in the whole animation.
Is there a way when I manipulate the animation in graph editor, it only affect the location but not the rotation?

if you unfold the tracks on the left, you'll see 3 different sort of tracks: location, rotation and scale, each for X, Y and Z, is it not what you're looking for?

I clicked on "Z Location" and resized the graph, but somehow I feel like the rotation also got affected even though I didn't select the "X Euler Rotation". I also tried to click the padlock icon next to the "X Euler Rotation" but it didn't helped


text:
Placing object on uneven surface
Is there a way to put an object on uneven surface? For example: if I make a food object, let's say a toast, and put it on a plate, it's all well if I just put in on the center of the plate, which is mostly flat surface. But what if there are other objects on the plate, and I have to put the toast on the side edge of the plate, which is curved?
I have tried using proportional editing and dragging faces of the toast as near as possible to the plate's surface, but the result is really ugly (perhaps due to my lack of experience and skill). Snapping to the surface seems only worked the best when the objects have flat surfaces.

My answer probably better suited to animation, but all or part of it  could still be used for posing

If you don't want to go to the expense of simulation, a rig can get you quite close:

Prepare a copy of the plate's top surface, its rim (E,right-click, S) extended, as a Shrinkwrap target.

Make a triangular face from some vertices of your toast,ShiftD duplicated, and P separated to a new object. This will be the root object, and control the gross orientation and location of the toast.

Additionally, create a flat Lattice, (1 segment in Z) which will bend the toast.

With the toast and triangle selected, triangle active and in Edit Mode with all verts selected, CtrlP parent the toast to the triangle's vertices
in Object Mode, CtrlP parent the Lattice to the triangle.
Assign Shrinkwrap modifiers projected in Z, to both the triangle and the lattice, aimed at your newly created Srinkwrap target.
Assign a Lattice modifier to the toast, targeted on  the Lattice.

Now when you move the triangle, the toast will more-or-less conform to the plate. You can tune the resolution of the Lattice and influence of the Lattice modifier to make the toast more or less soggy, and the offset in the Shrinkwrap modifiers to control the proximity of the toast to the plate.

EDIT: A duff version of the blend replaced: 1400 GMT 19 March.

I'm still new to Lattice and Shrinkwrap modifier, but I'll give it a try when I get home. Thanks for the input!

@Switch88 Somehow I posted a crazy version of the blend.. make sure you have the latest, if you're downloading.

You can use the physics engine to place the toast on the plate.

Initially position the toast just above the plate and enable rigid body physics in both the plate and the toast. The plate will be static and the toast will be active. You may want to make other objects on the plate static to prevent the toast from sliding further into the plate - but experimentation will enable you to get the look you want.
Run the animation and use the frame after the toast has settled on the plate.

I think using physics engine is the way, but somehow the toast is just too rigid. is there a way to make the toast a little bit less... stiff? I mean, to make the toast bend a little when it's on the plate. I tried using soft body on the toast and collision on the plate, but it took a long time to bake and the Blender software froze.

is it for an animation, like the toast falling on the plate? You could also try clothes with a high Material > Bending

Actually, it's not for an animation. I was aiming for something photo realistic (perhaps the term is "realism", I'm still new in this), so it's a little bit strange for the toast to be as stiff as a board.

@moonboots: while it is not for am animation, using animation techniques to settle into a position can help with realism. Can add that "random" factor into the positioning.

ok, but in my opinion it's simpler to just subdivide and deform the toast

@moonboots: That could be a valid answer within itself.

@Switch88: What If the toast was a form of stiff fabric? just spitballing here.

@AJD In my case, i just need to make the toast stick to the plate's surface. If I assume the toast to be stiff fabric, perhaps moonboots' suggestion to subdivide and deform the toast is better solution. But like I mentioned before, I have tried to use proportional editing, and the result is really ugly. Perhaps I just need to practice more


text:
Which one is a better approach
Sorry for this beginner like question, but I can't find the answer since I don't know what I need to type in Google search. I have been learning to use Blender for the past few months, and I tried to make some low poly wooden fence for small houses
At first I created the standing part (I don't know what i should called it, sorry for my bad English)
and then put a plank right through the middle part
While it looks good, there are some parts of the plank that driven into the standing part, while it's not visible, I believe it's still rendered by the engine.
Since it's only a small object and few in number, I believe in won't effect the performance. However, in the future, I was hoping to develop my own simple and low poly game. If I ever used this as an asset for my game, will it affect the performance altogether?
After some thoughts, I separated the plank into parts, and placed them between the standing parts. Since it's a simple type (cube shaped) fence, it doesn't take much time to connect the vertexes together, but what if the fence is round type? I have tried to make a hole in the standing parts, connecting the vertexes, and it's time consuming.
My question is: considering the amount of time needed to work on, and how much it's affecting the render time process, would you rather drive a cylinder type mesh into the middle part, or doing the same thing as I did for the cube shaped fence?

I would look at the Array Modifier with the Merge Check box. The Array Modifier also has Start & End cap Mesh options. This way you create single post and let Blender do the work.

When it comes to game assets there is one general simple rule. Use as many polygons as necessary and as little polygons as possible. No exception.
It's not only the amount of polygons but also the amount of vertices that matter. On top of that you also have to take the amount of UV islands for texturing (that means no "Smart UV Projection" or other fancy UV shortcut nonsense).
Also, don't assume the performance hit by the size of the object (in terms of screen space) in your finished game, neither the CPU nor the GPU care about that. They only care about the complexity as I described it above.
Continuous planks and bars (like in your fist example) through other meshes are the way to go, as long as they stay at the same position at their entry and exit points.

About Smart UV Projection, does the seam automatically created by Blender is really not efficient? I heard most people prefer to mark the seam manually. Since I'm still learning about basic of UV Unwrapping and how it works, I am trying not to rely on anything that automatically or instantly produced, so I have no experience in using Smart UV Projection

Box Projection is OK, as long as it works for your model. In most cases it doesn't and manual unwrapping is still more effective in many cases. Smart UV Projection is everything else but efficient, because it generates way too many UV Islands. Every UV island generates a draw call, which means that both your CPU and GPU and most possibly your HDD have to work. There is a short but comprehensible explanation on Stackexchange . In any case, UV unwrapping is a basic and necessary skill in 3D modelling.

Start with a plane and model a plank;
extrude it to give it thickness;
add a plane, scale it down, align wih your plank;
knife project the plane with the strike through option checked;
extrude "holes" horizontally;
use Array modifier on everything.

With cylinders you knife project, as above, and extrude circle(s).
Every ime you extrude, remember to remove doubles.
This method doesn't produce i.a. inner edges and, for the sake of performance, it's always better to operate on single meshes rather than (too) many separate ones.

They're not asking how to model it, they want to know which one is better for performance.


text:
Hotkey to go DIRECTLY to vertex, edge, face edit mode?
As a long time user of other prominent 3d software, I'm used to being able to be in object mode and press 1 hotkey to go directly to vertex, edge, or face mode.
I'm using 2.8 and love it, but for the life of me, I can't get used to pressing "Tab" before I hit 1,2,or 3.  To make things worse, those keys (in object mode) hide and unhide collections.  It's driving me crazy.
I just want a smart hotkey that allows me to press 1,2,or 3 in object mode and automatically puts me in edit mode.  Pressing "Tab" would behave as it already does - toggling between object or edit mode.
Is there a way to do this?
Thanks,
Chris

Since as you mentioned object mode has different functions when pressing 1,2 .. and you want to skip the tab to switch to edit mode, it's not gonna be possible with a simple change of keymapping. The switch between modes is needed to get to the vertex, edge or face mode, so you most certainly would need to use a script (little addon) that would be called by a pressing a key. While that is possible, the fact remains that it would need to overwrite the 1,2 .. key in object mode to prevent Blender from doing the wrong thing.

As much as i can understand having used other software for a long time comes with habits and a problem to just getting used to different workflows, it does not mean there is no reason for the difference. It can be changed, but that would lead to other changes needed to be made to keep the functionality of the collections available. Finding not used keys for shortcuts can be hard and would also estrange you from the default more and more, making it harder,not impossible, to follow tutorials as well as explanations from people not knowing your setup or using a different one all together.

The tab key is also context-sensitive.. it will toggle to and from Edit mode from whichever mode you were in .. (Pose, Vertex Paint... etc) so overriding it would have to be done with care

The operator for this is bpy.ops.object.mode_set_with_submode(). It allows you to create custom shortcuts that both switch to edit mode and enable a combination of vertex, edge and/or face select.
The keymap can be edited through Edit > Preferences > Keymap. As shown in the screenshot below, you need to set the Identifier to object.mode_set_with_submode, select Edit Mode and choose the desired Submode.

The complicated part is the choice of shortcut though, since the number keys are already used in Object Mode. You'd either have to remap the shortcuts for hiding collections to e.g. CTRL + ALT + the number key or use a different key combination for your new shortcuts that don't involve the number keys.

Wow.. where did you track that one down?

@RobinBetts The industry compatible keymap used to define its own operator for this purpose which caused problems when people created a new keymap based on it, since the operator wouldn't be registered for the custom keymap. This was originally brought to my attention through this question. The issue was fixed by Campbell Barton by using the aforementioned operator.

I adjusted the template of "operator_simple.py" to do the switching into edit mode followed by the activation of "vertex" selection mode. This is by no means a perfect solution as i already mentioned in the comment, but as you asked, and i said it's possible, here the proof.

Above i deactivated the 1 shortcut key and added a new one instead.
In the new one i called the "object.simple_operator" without ()!
And assigned the 1 key to it, afterwards i made sure the edit mode is not already in vertex mode to show the functionality of the code.
With the Screencast Keys active you can see the 1 showing up at the lower left side when i press the 1 in the 3D View while in Object Mode. The result is the change to Edit Mode and vertex selection chosen in one go.
While this works as long as the script is used once in blender, or is registered to be executed on startup of blender, you would need 3 of these for each key ( 1 vertex, 2 edge, 3 faces). If you want you can even make it an addon by adding some more code to the top like in the code below.
bl_info = {
    "name": "Mode Switcher",
    "author": "Your Name Here",
    "version": (1, 0),
    "blender": (2, 80, 0),
    "location": "F3->simple_operator",
    "description": "Combines the switching to Edit Mode with activation of vertex select mode",
    "warning": "",
    "wiki_url": "",
    "category": "mode",
}

import bpy

def main(context):
    # switch to edit mode
    bpy.ops.object.mode_set(mode='EDIT', toggle=False)
    # activate vertex selection ( vertex, edge, face) possible to activate all or 2 as well
    bpy.context.tool_settings.mesh_select_mode = (True, False, False)

class SimpleOperator(bpy.types.Operator):
    """Change to edit mode and activate vertex select"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        main(context)
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.simple_operator()

This here does not include the naming and such, there sure is a lot that can be done.
But the point is, it's possible, to which extend you want to change the workflow to be more close to what you are used to, that is essentially up to you. Please use separate names for the addon if you use this, i only used the template to explain it fast.


text:
The material look odd with the change of Lamp shadow
The material or the texture look odd, it change with the Lamp.
The first three pictures below show the changes in blender render.
And I also write the script to change texture to cycle, but when i change to cycle render,  some objects look odd, like the picture 4.
I use more picture to show another object.
The order is blender render with Lamp withou shadow, the second one is with Lamp shadow, and the last one is cycle render

blender render without light shadow

blender render and the light chose ray shadow

Cycler

The order is blender render with Lamp withou shadow, the second one is with Lamp shadow, and the last one is cycle render

It was imported from the same problem. I have many objects and some objects didn't appear this problem.


text:
Mesh Face Count Different in Edit and Object Mode
I'm new to Blender so go easy! I've modelled a bottle in Blender and I have a label on it. The label is really blocky so I increased the number of faces with the subdivide tool. Problem is this only shows in edit mode, in all other views, including render, the label is still blocky and I can't seem to smooth it out. No modifiers on it and if I do try and smooth it with a modifier it completely destroys the shape of the object which is just a plain cylinder. Top picture is edit mode with correct number of faces, bottom is object and that also follows for all other views.

please share your file, it's a bit hard to understand, use https://blend-exchange.giantcowfilms.com/

Thanks, here it is. I've also been messing with another cylinder in this project to see if I can get a smoother one but then the wrapping of the label goes awry, seems to want to wrap it across 4 segments of the cylinder rather than just one complete wrap.

So essentially I want the label to be smooth, not as it is in every view except the edit mode.

So I guess your purpose was to create an object that looked smooth. To do it, first you need to press the Smooth Shading option in the Tools panel of your 3D View. Then you need to have a high-poly mesh. The easiest way to have a high-poly mesh is not to create a lot of edges, because it will be heavy and very tedious to work with, it's much better to fake it with a Subsurf modifier.
What I see is that you have both a high-poly and a Subsurf modifier, so as you don't have any reason to have a high-poly you have to go back to a low-poly, and keep your Subsurf to fake the high-polyness.
Also, about your Subsurf modifier, decrease the Subdivisions values to 2 and 2, and choose the Catmull-Clark option rather than Simple.
Now, despite having both a high-poly and a Subsurf, you still have a cylinder that looks squared. It's because the vertical edge loops are aligned on the same axis, 5 by 5, so they create faces. So even if the Smooth Shading + the Subsurf should make your cylinder look round, these aligned edge loops tend to flatten the faces.
So to fix this, either restart from scratch with a low poly cylinder (like for example 12 vertices), or delete the edge loops that create all these faces around your current cylinder.

This is an excellent explanation, I shall give that all a try! Many thanks for taking the time to look at it.


text:
(eevee) Lights limit?
My question is...
How many lights (spot) can be on at the same time?
There's a limit imposed by blender or the machine specs?
Here's an example https://youtu.be/8Hjy2o3A9pg

Limitations:

Shadows are not supported on light instances (dupli objects, group
instancing).
Only 128 active lights can be supported by Eevee in a scene.
Only 8 Shadowed sun lights can be supported at the same time.

https://docs.blender.org/manual/en/dev/render/eevee/shadows.html

Do you know maybe why is that?


text:
Converting hair to mesh in python script
I'm working on my own renderer for learning purposes. I'm currently using Blender as a UI host for my renderer. My renderer can export mesh by using my plugin in Blender. However, it doesn't convert the hair into mesh automatically. I have to convert it manually every time after I have hair particle modification.
Could anyone share me some pointer on how to convert it to mesh in a python script?
Thanks


text:
Export hair data from Blender
I'm blocked by retrieving hair data from Blender. I would appreciate it if anyone could give me some suggestions on what I should do.
# first way to export data
transform = obj.matrix_world.inverted()
num_parents = len(ps.particles)
num_children = len(ps.child_particles)
for pindex in range(num_parents + num_children):
    for step in range(0, hair_step + 1):
        co = transform * ps.co_hair(obj, pindex, step)
        verts += POINTFMT.pack( co[0] , co[1] , co[2] )

# second way to export data
for i, h in enumerate(ps.particles):
    for i, hv in enumerate(h.hair_keys):
        verts += POINTFMT.pack( hv.co[0] , hv.co[1] , hv.co[2] )

And each of them has its own problem. The first one seems to export wrong data somehow, it doesn't give me correct data. The second solution works well, but it has another problem, there is no support for ChildParticles, but the data is correct.
And both of them are very very slow, is there any way to make it faster?
I noticed that the internal feature of converting the particles to mesh works surprisingly fast, is it implemented in python?
Thanks


text:
Call pie menu in holding state
so here is what i want to do:
holding state = when you hold the key when calling vie keymap
tapping state = when you tap the key when calling vie keymap
call a pie menu from another pie menu set the Confirm Threshold(PreferencesView.pie_menu_confirm) to lets say 20 have the pie menu in the holding state then after the second pie is called reset the Confirm Threshold back to the previous value.
setting the Confirm Threshold is not the problem i have kind of figured that out but when i call a pie menu from another pie menu im in the tapping state unless i call it with the Confirm Threshold already enabled but thats not what i want.


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

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

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

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

if __name__ == "__main__":
    register()

Override the operator
I'm not sure how a  pre delete handler or event would work?.  Whenever I model, a delete could be coming  at any time lol.
However can override any operator with another.
If another operator (or panel for that matter) is registered with the same bl_idname, then it will override the one defined previously. Giving it the same properties as the original will see existing key-maps and UI use the new one seamlessly.
For some operators and panels where the python code is available can import them and use their methods in our own. AFAIK Not the case with bpy.ops.object.delete
To override the object delete operator (very basically) run the following script
import bpy
from bpy.props import BoolProperty

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

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

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

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

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

if __name__ == "__main__":
    register()

and it will replace the delete operator. Is this good practice or recommended.. not sure (shrug) .. but it is one way to "do something before the delete operator is called"
Note: the prepend and append as shown in question is more associated with adding UI to a panels draw method.


text:
Best way to store options for panels
lets say i have a panel and i want to collapse a part if a bool is False
import bpy

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

    def draw(self, context):
        layout = self.layout
        # where should i define this bool ?
        layout.prop(place, "bool")
        if bool is True:
            obj = context.object

            row = layout.row()
            row.label(text="Hello world!", icon='WORLD_DATA')

        row = layout.row()
        row.label(text="Active object is: " + obj.name)

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

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

if __name__ == "__main__":
    register()

Blender 2.8 has sub panels.
As of blender 2.8 can if bl_parent_id is set in a panel it will be appended to the parent panel. Use the usual 'DEFAULT_CLOSED' in the bl_options set to start with panel closed.
This avoids needing to set up some boolean property to open close UI altogether.
Here is a sample file I've been testing for ordering panels.  First panel is defined as a child of the object transform panel. Second panel is a child of first. Can unregister and re-register with different parent ids to sort sub-panels, which is what I was testing

The two demo sub panels appended to object transform
import bpy
from bl_ui.properties_object import ObjectButtonsPanel, OBJECT_PT_transform

class LayoutDemoPanel(bpy.types.Panel, ObjectButtonsPanel):
    bl_label = "Layout Demo"
    bl_idname = "SCENE_PT_layout"
    bl_parent_id = 'OBJECT_PT_transform'
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'

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

        scene = context.scene

        # Create a simple row.
        layout.label(text=" Simple Row:")

        row = layout.row()
        row.prop(scene, "frame_start")

class LayoutDemoPanel2(bpy.types.Panel, ObjectButtonsPanel):
    bl_label = "Layout Demo 2"
    bl_idname = "SCENE_PT_layout2"
    bl_parent_id = 'SCENE_PT_layout'
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'

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

        scene = context.scene

        # Create a simple row.
        layout.label(text=" Simple Row:")

        row = layout.row()
        row.prop(scene, "frame_start")

def register():
    bpy.utils.register_class(LayoutDemoPanel)
    bpy.utils.register_class(LayoutDemoPanel2)

def unregister():
    bpy.utils.unregister_class(LayoutDemoPanel2)
    bpy.utils.unregister_class(LayoutDemoPanel1)

if __name__ == "__main__":
    register()

If you have some logical setting that when set needs more UI How to dynamically show/hide panel elements using python?

Cheers. Can still do this the ol' fashioned way too, added link.


text:
How is the most bottom bar called and how can i access it
How is the most bottom bar called and how can I access it?

It is called status bar and can be toggled from the Window menu or with the operator
Screen.show_statusbar


text:
Blender Became Slow
I used Blender 2.79B for a while … but after I installed windows blender became very slow … i have a Toshiba laptop with Pentium and 4 giga ram and it was fine before windows installation … I try to download intel update and windows but nothing

In my opinion this has nothing to do with Blender.

Reboot, reinstall graphics drivers, check that task manager is not showing anything else taking CPU/Mem/Disk.


text:
Light Linking blender 2.8
I'm a Maya user and have just started down the Blender path but I've hit a road block when it comes to a light linking option?
If I just want to light one object with one light and leave everything else unaffected how do I achieve this?
I use this trick a lot in my animations so it would be much appreciated if anyone has an answer. Many thanks.
(I'm rendering with Eevee).

Blender doesn't have light exclusions or lighting groups features. Maybe you can achieve somethign equivalent with render layer exclusions, but I never tried myself

I haven't got into Evee yet, nor 2.8, but in earlier versions, Duarte Farrajota Ramos' suggestion will achieve this.  Place those objects to be affectd by this light in a layer of their own and add the light(s) to that layer.
In the light's property at right, tick "This Layer Only" box.  That will prevent the light from affecting other layers.  Keep in mind that lighting in other layers that aren't also ticked as exclusive will affect these objects.


text:
Easiest way to replicate a picture
I'm trying to replicate a picture in order to replace smoke with animated smoke.
It seems simple enough: make the chimey, make a texture from the image and add the smoke and sky. But I can't help but think that there's a simpler way. I don't really manage to match the colors and smoke direction.

More or less - this is the right approach. I'm not completely sure, but this photo looks like being post processed to achieve those colours.

You can achieve the smoke by applying Physics and Smoke. I think that is the correct way to animate it, I do not know it other way. If that is how you want to do it then I can show you but I cannot help you with pure textures. Which Blender are you using V2.79b or V2.80 Beta?

@cgslav Yeah, I think it is heavily edited in post. But I think the smoke should be possible in Blender with wind + smoke sim and some motion blur. Everything else I've already accomplished. At least somewhat.

@Sprad001 I used 2.80 Beta, but it's crashing so often that I'm kind of regretting it now. My biggest problem is getting the smoke to render properly. I've achieved something, but if I try to get thicker smoke, it takes forever to bake / render / whatever. I've got the chimney done now, but my smoke is really thin.

@TemporaryName, most of the time I do not have problem with 2.80 Beta. Unfortunately as you get more realistic the more tasking it is on computer power. For more smoke have you tried to increase the Surface of the smoke emitter object?

@Sprad001 In theory, I can let my PC run 24 hours to bake and render sometimes. But I'm not even able to adjust how I want the smoke because it is so difficult to work with the smoke. I'm using a squashed Icosphere right now.

@Sprad001 I just found out that a lot of my problems had to do with the smoke being inside a collision mesh. Not sure how to fix it yet, but at least I got lots more smoke now.

@TemporaryName, you could edit your original posting and include an image so we can see what the problem is. To effect how the smoke behaves, apart from its own settings, you can experiment with various Force Field that you can add to your scene with Shift+A and select one of the desired effects.