text:
How do I apply an Ambient Occlusion material "multiplied" over a base color (principled BSDF shader)
In Modo, I could take a basic Ambient Occlusion (AO) layer and apply it over whatever material layer I had underneath (the way you would apply a multiply layer in photoshop) this would add a nice base layer of shadow to the material that I could adjust as desired.

You can connect it by adding an Ambient Occlusion Node (under input) and multiply it over your BaseColor using a MixRGB Node. If your material has a normal map, connect it to the normal input of the AO Node. Don't forget to enable Ambient Occlusion in the render properties panel (right side):

Thank you very much @ChristopherBennett.  Could you zoom out so that I could study your entire node tree?

Tried the approach above and it worked well.
In my case, perhaps because the normal map is not particularly detailed, I followed a simpler approach with AO that worked better (I have an AO texture map).

Get a "mixRGB" node and change it from mix to multiply.
Connect Color output to Base Color input in Principled BSDF node.
Connect Ambient Occlusion texture map to color2 input and Base color texture map to color1 input.
Change Fac slide until you are happy with the amount of AO displayed. Left it in 1.000 in my case.

Hope it helps!


text:
Can not create node group inputs and outputs using python
I have written a code to create a NodeGroup using python inside Blender. NodeGroup and GroupInput and GroupOutput nodes inside NodeGroup are also created successfully. The GroupInput node works fine for creating sockets while the other GroupOutput node throws an error.

import bpy

def back_facing_node_group(name):
    #Create NodeGroup
    back_facing = bpy.data.node_groups.new(name,'ShaderNodeTree')
    #Group input node and its sockets
    group_inp = back_facing.nodes.new('NodeGroupInput')
    group_inp.outputs.new('NodeSocketColor','Color')
    #Group output node and its sockets
    group_out = back_facing.nodes.new('NodeGroupOutput')
    group_out.inputs.new('NodeSocketColor','Color')
    #Group Nodes
    geo_node = back_facing.nodes.new('ShaderNodeNewGeometry')
    mix_node = back_facing.nodes.new('ShaderNodeMixRGB')
    #Group Links
    back_facing.links.new(group_inp.outputs['Color'],mix_node.inputs[1])
    back_facing.links.new(geo_node.outputs[6], mix_node.inputs[0])
    back_facing.links.new(mix_node.outputs[0], group_out.inputs['Color'])
    return back_facing

group = bpy.context.object.active_material.node_tree.nodes.new('ShaderNodeGroup')
group.location = -300,200
group.node_tree = back_facing_node_group('Node_group')

If this is the expected output then use the following script, you have to replace group_inp.outputs.new with back_facing.outputs.new

import bpy

def back_facing_node_group(name):
    #Create NodeGroup
    back_facing = bpy.data.node_groups.new(name,'ShaderNodeTree')
    #Group input node and its sockets
    group_inp = back_facing.nodes.new('NodeGroupInput')
    back_facing.outputs.new('NodeSocketColor','Color')

    #Group output node and its sockets
    group_out = back_facing.nodes.new('NodeGroupOutput')
    back_facing.inputs.new('NodeSocketColor','Color')

    #Group Nodes
    geo_node = back_facing.nodes.new('ShaderNodeNewGeometry')
    mix_node = back_facing.nodes.new('ShaderNodeMixRGB')

    #Group Links
    back_facing.links.new(group_inp.outputs['Color'],mix_node.inputs[1])
    back_facing.links.new(geo_node.outputs[6], mix_node.inputs[0])
    back_facing.links.new(mix_node.outputs[0], group_out.inputs['Color'])
    return back_facing

group = bpy.context.object.active_material.node_tree.nodes.new('ShaderNodeGroup')
group.location = -300,200
group.node_tree = back_facing_node_group('Node_group')

Thank you very much.

In Blender 4.0 the "inputs" and "outputs" were removed from "bpy.types.NodeTree" (https://docs.blender.org/api/current/change_log.html#bpy-types-nodetree)
Thus adding and changing Node Group Inputs/Outputs is different now.
Here is an Example for adding a Shader Node
    #Add the Node Group
    someGroup = bpy.data.node_groups.new('someGroup', 'ShaderNodeTree')

    #Add the Input Sockets and change their Default Values
    someGroup.interface.new_socket(name="Some Color Input",description="some_color_input",in_out ="INPUT", socket_type="NodeSocketColor")
    someGroup.interface.items_tree[0].default_value = [1.0,1.0,1.0,1.0]
    someGroup.interface.new_socket(name="Some Float Input",description="some_float_input",in_out ="INPUT", socket_type="NodeSocketFloat")
    someGroup.interface.items_tree[1].default_value = 1.0

    #Add the Output Sockets and change their Default Value
    someGroup.interface.new_socket(name="Some Shader Output",description="some_shader_output",in_out ="OUTPUT", socket_type="NodeSocketShader")

    #Add Group Input/Output Nodes and position them
    group_input : bpy.types.ShaderNodeGroup = IndirectLightingGroup.nodes.new('NodeGroupInput')
    group_input.location = (-340,80)
    group_output : bpy.types.ShaderNodeGroup = IndirectLightingGroup.nodes.new('NodeGroupOutput')
    group_output.location = (180,300)

import bpy

def back_facing_node_group(name):
    #Create NodeGroup
    back_facing = bpy.data.node_groups.new(name,'ShaderNodeTree')
    #Group input node and its sockets
    group_inp = back_facing.nodes.new('NodeGroupInput')
    group_inp.outputs.new('NodeSocketColor','Color')
    #Group output node and its sockets
    group_out = back_facing.nodes.new('NodeGroupOutput')
    #Group Nodes
    geo_node = back_facing.nodes.new('ShaderNodeNewGeometry')
    mix_node = back_facing.nodes.new('ShaderNodeMixRGB')
    #Group Links
    back_facing.links.new(geo_node.outputs['Backfacing'], mix_node.inputs['Fac'])
    back_facing.links.new(group_inp.outputs['Color'], mix_node.inputs['Color1'])
    back_facing.links.new(mix_node.outputs['Color'], group_out.inputs[''])
    return back_facing

group = bpy.context.object.active_material.node_tree.nodes.new('ShaderNodeGroup')
group.location = -300,200
group.node_tree = back_facing_node_group('Node_group')

source: Stack Exchange

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

sort: votes


text:
Is there a way to drag and create while in shading tab?
I've been doing some material work lateley and it feels kind of unpractical that I can't just drag and create a new node and then connect it. Am I somehow missing a shortcut to drag and create a node or is it just not possible?

If you create a node group, then it will appear in the Add>>Group menu in the Shader editor so you can reuse it.

The Node Wrangler addon (included in blender download but not enabled by default) may have some tools you find helpful.

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


text:
Why do black artifacts appear on exported model?
Why do black artifacts appear on the faces of my model When I export it to .obj format? I use Blender 3.2.

I'm going to assume the black lines appear in places where your model has some edges. Seems like the normals are causing some weird shading.
Try going into edit mode, hitting A to select everything, and then hitting Shift + N to recalculate normals.
Alternatively, you might also have some geometry right under the surface of that top layer, and they start clipping through a little, in which case you should either remove or lower that geometry.

Thanks for the sugestions, I try but it doesn't work to me, after so many tryes to fix this I reach the conclusion of maybe I doing wrong something about the export and that is, in the menu of exporting I check the box of intersect faces and finally I get solved...


text:
Blender registers random amount of characters when I press keys on keyboard
Whenever I press a key (eg. typing numbers for rotation and etc.) Blender types random amount of the character that I typed. For example if I press the F key just a single time, it'd type "ffffff".Also when I press hotkeys it does the same thing, eg. when I press Ctrl+Z it applies multiple times and the same for all other hotkeys! I searched everything I could but didn't find anything about this problem.
I tried reinstalling but didn't work.
I'm using windows 10 and Blender 2.93.3

Are you sure your keyboard isn't to blame?

Absolutely. I tried Microsoft's touch keyboard and the same thing happened and as you can see I'm typing here with no issue.

I have an Arduino leonardo board and it's plugged in all the time(I use it for my flight sim). I simply unplugged it when using Blender and it works perfectly fine now.


text:
Denting a sphere into a plane

I would like this plane to deform around this UV sphere — specifically, in a way that makes it look like a sphere was violently rammed into the plane, causing a wide (not completely sphere-shaped) dent If it deforms the entire plane slightly that's even better.
I would furthermore like the depth of this dent to scale proportionate to the sphere's position to the plane. For instance, if the sphere isn't touching the plane, no dent, if the sphere is slightly touching the plane, a small dent, if the sphere's middle lines up with the plane, a large dent. I would not like this dent to adhere to the surface of the sphere; I would rather that the sphere "tug" on nearby vertices as well as those whose lines it intersects with.
What set of modifiers or operators could allow me to do this, if any?

Soft body or cloth physics.

@Nathan Are there any specific settings you recommend I use those with? I'm unfamiliar with them. Also, I doubt the cloth physics would work; I don't want the plane to behave like a cloth, I want it to behave like a rigid sheet which has had a dent beaten into it.

Let me amend that: sculpting the dent is better.  But physics are more like what you're describing-- more procedural, less artistic.  I'm not really interested in making a dent with them myself, which is why all I'm doing is letting you know what kind of things to become familiar with in a comment, rather than a full answer.

@Nathan Aye, thanks.

It also depends a little on what material the ground should be made of. Is the dent like a dent in metal, (wet) sand/snow, concrete/ice or elastic/pudding? If you want to try a Cloth sim, make a collision object (=a plane with a hole in the middle, hidden for render), put another plane on it (=the cloth object with a pin group that pins the outer area). Finally, make a sphere with collision fall into the (invisible) hole to create the dent.

@Blunder Think of it as a tank shell hitting a steel plate and deforming it in a certain direction somewhat; updating the question with that. I will do my best to try your advice regarding cloth simulation.

For kicks I went the Shrinkwrap route:

I sub-divided the plane surface into sufficient segments and assigned the center group of vertices to vertex group "Group".
I then used the Skrinkmap modifier to the target Sphere, and found that project, Outside Surface worked best.  Note that I had to "play" with the Z-distance between the two, and added a slight offset to keep the two visually separated (plane always on top of sphere) -- you may not need this is you want to hide the sphere from rendering.
If you want, then try Applying the S.R. and Surface Deform to the sphere.  This might allow you to play more with moving the sphere around which can cause extra wrinkle-distortions to appear (creases).

This is almost perfect. Do you know a way to increase the distance that the deformation falls off at? Everything in your answer works but I'm getting a distinctly sphere-shaped dent rather than a sort of wider one.

@KEY_ABRADE - first, Unbind the SurfaceDeform on the Plane.  Then, for the sphere, add a SimpleDeform modifier, and try Stretch mode, Z axis, -0.2.  This will create a more elliptical shape (spread the Shrinkwrap out a bit).


text:
Creating an Unwrapping Animation (NOT texturing)
As a new-ish Blender user, I'm still not entirely familiar with how to do everything in Blender. I've been attempting to create an animation of the lateral area of a cone unwrapping into a 2-D semicircle thing: however, I've found no good way to separate out each area of the cone for rigid-body bound animation. Any and all help is appreciated: if you need a .blend, just ask, but it's really just a cone on an otherwise blank area, so I don't think it's necessary.
Thanks.

a sreenshot of the desired result could help

I assume the author is asking about a simple unfolding of a cone into a semicircle. There is no problem with boxes, but I don't have a slightest idea how to unfold a cone, played with warp a little bit, but could not achieve anything good, so sorry for no helping.

I'm not quite sure what you are trying to achieve, but I created this blend file that turns a 2D fan into a 3D cone... https://www.dropbox.com/s/zjddbv90rfj48n8/Cone2Dto3D.blend?dl=0 . Just press Alt+A to run the animation.
OK, since it was requested, here's the instructions....
0) To get started, Num Pad 7 for top view and Shift+C to centre cursor at origin.
1) Add a mesh circle with 72 sides, triangle fan fill, 1.1536m radius. [Any strange dimensions given here are due to the maths required to make a cone that ends up as 1m tall. I did do the maths but deleted it].
2) R, Z, 2.5, Enter, to rotate circle about Z by 2.5 degrees.
3) Tab into edit mode and delete 71 of the faces, leaving just the one at the 12 o'clock position.
4) Add an Empty ('Empty1') at the origin (i.e. the sharp point of the triangle).
5) Select just the triangle and add an array modifier, Count=36. Turn off Relative Offset and choose just Object Offset, specifying Empty1 as the Object Offset.
6) Rotate Empty1 5 degrees about Z to cause a fanned array of triangles in a semi-circle.
7) Add another Empty ('Empty2') at the point of the triangle (I used the Single Arrow style to make things clearer). You should get an arrow pointing up the +ve Z axis.
8) Select Empty2, then shift-select the triangle, hit Tab to edit triangle, shift select the vertex at the point.
9) Press Ctrl+H, Hook to Selected Object. (Moving Empty2 can now drag the triangles up and down into a point... but leave it where it is for now at Z=0).
10) With the triangle still in edit mode, select the other two vertices only (Ctrl+I), Shift+S, Cursor To Selected. The cursor should now be between the two vertices at the outside of the triangle.
11) Tab out of edit mode and then A to deselect the triangles.
12) Add another Empty ('Empty3'), single arrow style, then press R, X, 90, Enter, so it points back towards the point of the triangle (along the Y axis).
13) With Empty3 selected, shift-select the triangle, Tab, Ctrl+H, Hook To Selected Object. [Moving Empty3 can now squash the triangle towards the centre... but leave it where it is for now at Y = 1.1536m.]
14) Tab out of edit mode and A to deselect all.
++ Now the animation ++
15) Set start frame to 1, end frame to anything you like.
16) At Frame 1, select Empty2 (the arrow pointing upwards) and set a key frame for Loc Z (i.e. Z=0).
17) Go to last frame (Shift+Right arrow). Move Empty2 up to Z=1 and set a keyframe.
18) IMPORTANT! Go into the graph editor and set interpolation (T) to Linear.
19) Go back to Frame 1 (Shift+Left arrow), select Empty1 and set a keyframe for Rot Z (i.e. Rot Z = 5 degrees).
20) Go to last frame. Rotate Empty2 another 5 degrees about Z and set a keyframe (i.e. Rot Z = 10 degrees). [You should have a droopy propellor / palm leaf thing now].
21) IMPORTANT! Go into the graph editor and set interpolation (T) to Linear.
22) Go back to Frame 1, select Empty3 and set a keyframe for Loc Y (i.e. Y = 1.1536)
23) Go to last frame. In top view, select Empty3 and set its Y location to Y = 0.57625. The triangles should join exactly to make a cone. If not, move Empty3 manually along Y until they do.
24) When the triangles meet exactly, set a keyframe for Empty3's Y location.
25) IMPORTANT! Go into the graph editor, select Empty3's graph and open the Properties panel (P). Set Interpolation to Sinusoidal, and set Easing to Ease Out.
26) Alt+A to run animation.

The idea is to give answers that everyone can use later. could you add some explainations and/or a few screenshots?

Great! This is exactly what I wanted. However, the DropBox link doesn't seem to be working, could you verify that it does?

Updated link. Not sure why it failed.

Okay, awesome. Is there a way in the animation I can separate it later so they no longer rely on the center point so I could animate each segment individually?

To remove the hook, select the triangle's centre vertex, Ctrl+H, Remove Hook. You can 'apply' the Array modifier to make each triangle a separate entity.

Actually, I just tried applying the modifier and they all end up as one merged object. There's probably a quick way to separate all the faces (if there is I don't know how) but you could select each in turn and press P > Selection.

@JMY1000: If these instructions answered your question, please mark it as an answer using the check mark.

Almost got everything I need. Is there a good way to do the unhooking as a keyframe or can it only be done to the entire object for the entire scene? If it's the latter, is it a good idea to create a clone of the object that appears later in the animation then use that for the unhooked animation or is there a better way? How well would the AnimAll Addon work for this?

Well, since I need to keep going with this project, I've simply taken a clumsy but workable way of creating a separate object then making it visible later in the animation. However, I can't figure out how to remove the center hook without destroying the array. How can I make the array without having them be bound? Should I simply remodel it as another object without the array?

Well, what I've done so far is create another object with the same modifiers, but applying the array modifier then following this to split each of the different pieces up. However, this is leading to some weird thing with the objects that I don't know how to explain. So here's the download link (will be constantly updated).

Okay, well, I solved the problem using the above method. You can download the file if you want to see what the end result was.

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


text:
Can I avoid an undo when operator is called due to a property change?
I am writing an add-on that creates a mesh with several randomly generated aspects. The mesh is generated from default property values when the operator is initially called. These properties are added to the tools panel for the user to modify.
In some cases I want to modify the already generated mesh both to avoid wasted recalculation and to retain the majority of randomly generated features. Ie - it might look the way I want it except for some minor aspect I can change without effecting the overall appearance.
To do this, my property update functions set a flag to indicate whether the property change necessitates a complete regeneration of the mesh or if the existing mesh can be tweaked instead.
I am seeing that there is no object to tweak when the operator's execute function is called after a property change. It appears that an undo is performed before the operator is called again.
Is there a way to avoid the undo operation? Or a way to store the mesh and access it when the operator is called again?
As an example:
# ------------------------------------------------------------
# Operator for adding a Thing
# ------------------------------------------------------------
class ThingAddOp(bpy.types.Operator):

    ...

    # set a flag indicating a complete regenerate is required
    def update_regenerate(self, context):
        self.do_regenerate = True

    # set a flag to indicating a simpler update can be done
    def update_modify(self, context):
        self.do_modify = True

    # flags used to determine if Thing should be regenerated or modified
    do_regenerate = BoolProperty(name='Must regenerate object', default=False, options={'HIDDEN'})
    do_modify     = BoolProperty(name='Can modify object', default=False, options={'HIDDEN'})

    ...

    def execute(self, context):
        thing_add(self)
        self.do_regenerate = False
        self.do_modify = False
        return {'FINISHED'}

    @classmethod
    def poll(cls, context):
        return context.mode == 'OBJECT'

    def invoke(self, context, event):
        return self.execute(context)

    def draw(self, context):
        ...

# ------------------------------------------------------------
# Creates a random Thing
# ------------------------------------------------------------
def thing_add(props):
    if props.do_modify:
        # At this point there is no object to modify!!
        bpy.ops.object.mode_set(mode='EDIT', toggle=False)

        # only resize because the user liked the randomly
        # generated object but wants to resize the base
        # without changing the other apsects of it
        size_base(props)
    else:
        create_base(props)   # creates a base with a given size
        create_spokes(props) # creates randomly oriented spokes
    bpy.ops.object.mode_set(mode='OBJECT', toggle=False)

Blender's redo panel will revert all changes every time and re-run the operation, there's no way around that. The behavior might be different / more controllable when writing a modifier in C, I'm not sure.

Operators automatically push their actions containing the properties used onto the undo/redo stack, by calling an operator with different options you are adding it to the stack each time.
To prevent calling the operator each time an option changes you could move the properties for the options to outside of the operator, maybe to an AddonPreferences instance? This can then be accessed by the operator and a panel or directly in the User Preferences when enabling the addon. See Cloud Generator addon for an example of properties added to bpy.types.Scene and used by both panel and operator.
You could also try having the operator take a single argument as a string (comma separated list you can split?), a CollectionProperty or BoolVectorProperty, which I think would integrate better with the undo stack. A panel displaying the operators options could then combine the options into one property to be passed to the operator call.
Having said that, you may also find that calling the operator with defaults and only allowing the user to change options within the Redo Last to be a workable solution. See the sapling addon and it's large array of options only available in the redo last. Also the space tree addon in contrib has a similarly large list of options. You can adjust properties in the redo last panel, see the results and only have one undo step.

Thank you for the thorough response. I appreciate the effort. I'll look deeper into your suggestions to see if there is a manageable way to get the behavior I want. I am beginning to think using a modifier to make additional changes after the mesh has been added by the operator might be a better approach.

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


text:
How to make Chrometype Potrait in Blender?
Chrometype Potrait
I saw this video on reddit and wanted to recreate this effect in Blender but the only nearest thing I have found is this tutorial. However, this tutorial was made for Cinema 4D users. Can anyone give a detailed method as to how to recreate the effect in Blender? (Please try to include lightning, node setup and other important stuff as well).
(Cycles render engine to be used)

Hello and welcome. While files, images, and external videos or links may be helpful additions they should not be the only way to obtain information about your issue. Don't make understanding your question rely on downloading a file, watching a video or visiting an external site. Use the builtin tools to upload images or gifs, along with thoroughly explaining the problem in written form so it can be indexed and searched for thus helping future visitors with similar issues.

I didn't study your tutorial link ... so just a few tips since no-one provided any other answer here.

You can try default Principled BSDF shader with Metallic 1, Roughness 0 or something small. Color based on ColorRamp node according to your taste (HSV gives me nicer saturated color mix than RGB). Texture coordinate looks like Layer Weight > Facing type.

For World material set Environment texture with some black&white equirectangular texture ...

Should be .exr or .hdr file type, but in this case - mainly used for reflection purpose (not lightning) a .jpg works as well.
Animate the texture in Z axis.

For final touch just enable Eevee > Bloom with some adjustments according to your world texture condition to bloom up result.


text:
Blender 2.79 not working in Windows Server 2019 on AWS cloud t2.micro
I was trying to install Blender 2.79 on Windows Server 2019 on AWS cloud t2.micro. It installs but does not start - neither GUI, nor by using  blener -b command. The error it gives says does not have display driver or OpenGL. But this version ran in my laptop without graphics card. What should I do?

Your laptop most certainly had a graphics card, although likely one integrated in the CPU. Otherwise it would not have been able to display any graphics at all.

Buy a graphics card. Blender does not and did never support to run at the onboard graphics of the cpu. Even when it works in some cases.

While a GPU is required for running Blender, it is incorrect that Blender does not support integrated GPUs. Intel CPUs Haswell and newer are officially supported with their integrated GPUs, although they do not allow GPU accelerated rendering with Cycles. The requirements for running Blender can be found here: https://www.blender.org/download/requirements/

Thanks for the correction Robert, but isn't that for Blender 3? He runs Blender 2.79. And even here, still just a fraction of integrated gpu is supported.

Blender 2.79 has lower hardware requirements, thus it should work on more hardware, including older integrated GPUs such as the Intel HD Graphics 4000. The issue here is that the AWS instance likely does not have any GPU nor OpenGL software emulation and thus it does not fulfill the minimum requirements for running Blender.


text:
Render only takes seconds however result is incredibly blurry
When I render with Blender the render only takes a couple of seconds when I use the GPU even though it would take hours with the CPU. However the result comes out incredibly blurry. I have noticed that it gets to around sample 50 and then suddenly goes incredibly fast taking only around 4 seconds to reach sample 1000.

GPU: 980ti
CPU: i7 3820
Blender Ver: 3.2.2

Your noise threshold and denoising may be the issue, or you are rendering at 50% resolution or something

I tried using the blender default noise threshold and turning off denoising but nothing worked. Also tried blenders denoising. I might upload a clip of whats happening soon @AllenSimpson

@AllenSimpson I am rendering at 100% resolution. Heres a video of whats happening. This is with denosing off but its the same thing with it on. https://streamable.com/hd2i8i

Look at depth of field settings on your camera, you might want to [edit] these details into the question

A lot of guessing here :) probably better share some simplified file. BTW your threshold in video is not default, also you have enabled some kind of Simplification in properties, and you use Volumes that can also participate on issue :)


text:
Controlling thickness of node-generated concentric rings

These 36-segment concentric rings are formed from node-generated, circular edge loops. The planes between them aren't — I've bridged the edge loops myself — but the edge loops are procedural. Below are the geometry nodes which have generated them:

The upper left three blue nodes take each ring's index number and raise it to the
power of ${\sqrt 2}$, then plug the result into the
"instance on points" node's "scale" socket, thereby making each bottommost, outermost ring ${\sqrt 2}$ times wider than the previous one above.
The three red nodes provide each edge loop's index number, the number of rings desired ("integer"), and the spacing between each ring ("value").
The big block of nodes below/to the right of the red nodes builds a vertical mesh line whose number of vertices equals the number of rings desired. Rings are later built around these vertices.
"Instance on points" installs the first set of edge loops — in the image, these are the second outermost ones in each ring. The instance being used is the original geometry, an empty, circular edge loop. These edge loops act as templates for (5).
The big block of nodes above "instance on points" — the line which starts with "subtract" and ends with "realize instances" — copies the edge loops produced in (4) a certain amount of times, then displaces them downwards. Said amount is -0.1 multiplied by the template edge loop's index number, meaning that higher, smaller rings are copied more and shunted downwards more. All edge loops created up until now serve as the inner boundaries of the rings.
The two nodes below (5) and to the right of (4) interpret all the edge loops up until this point as a single instance, duplicate them all, then expand them by a factor of 1.1 in the X and Y directions. These edge loops form the outer boundaries of the rings.
The products of both (4)/(5) and (6) are merged and the geometry is output.

This model is intended to represent a building which is essentially a stack of increasingly-smaller circular sections. The rings represent the footprints of its walls. The innermost rings must be thicker to represent that the innermost walls bear more weight, but, as you can see, they aren't — as a matter of fact, the rings get thicker the greater their radius, not the other way around. I would like it to be the other way around.
My best guess is that doing this would involve the nodes in step 6 somehow changing the amount each edge loop is scaled by based on the radius of the edge loop. I have no idea how to actually do this. I believe the closest I've gotten was when I tried something similar to step 1, where I first converted the duplicate instances from step 6 to curves, then took their radii, then plugged them in where step 1 uses the index number instead, but nothing happened.
I've looked at these questions but they haven't done much for me.
I believe the problem here is that the only way to determine how large an edge loop is in comparison to the ones around it (ergo, how much it must be scaled in or out for the ring it's part of to be thicker or thinner) is to take its radius, and I have no idea how to do that. Anyone trying to answer this might want to start from there.
This should link to the file:

Hi Key_abrade, i would recommend providing a blend file, because this attracts more people to help you, so a) we can test our solution proposal and b) we don't have to rebuild everything on our own

@Chris Done. Let me know if the computer gremlins stop the BlendExchange link from working for you.

You describe very well what your current node tree is doing. But I'm unable to understand what the issue is and which result you expect... : (

@lemon The issue is that the inner rings are thinner than the outer rings when I want the inner rings to be thicker than the outer rings.

it is because you're scaling the duplicate elements. You should scale with some factor with inverse of their radii.

@lemon Oh, certainly; I know that the solution probably has something to do with their radius. the problem is that, in the absence of the 1.1x X/Y scale, I don't know how to (a) get their unaltered radii and (b) turn that into a thing which can scale them differently depending on their original size.

but what is the "rule" for the thickness, depending on the radius?

(Using Blender 3.6.8)
Wall thickness function of ring index
Using Named Attribute, the original index of each concentric ring can be transferred by Duplicate Elements nodes, to be used as argument of a function scaling duplicated rings:

Resources:
Wall thickness function of ring radius
The rings radius is computed from the original circle bounding box, multiplied by the scaling factor function of the rings index. For the demo, a constant wall thickness is modelled.

Resources:

The question is addressing the issue of determining the radius of rings. As radii are function of the scaling factor computed by the three top left blue nodes, and that these factors are function of the rings index, this proposal stored the index as primary parameter. If the radius is required nonetheless, it can be computed from the bounding box of the input geometry and the scaling factor, and stored as named attribute instead.

Well, I do need the scale to base off the radius, not the index number — otherwise the outer part of each ring will scale based on how far down the ring is in the stack, not how far towards the middle it is. What geometry would be input into the bounding box for this, and is the scale factor those blue nodes in the green-highlighted area?

I now recognize Bounding Box must come after Duplicate Elements (i.e. taking the bounding boxes of the duplicated instances) and that there'll be Separate and Combine XYZ nodes between Bounding Box and Scale Instances so the X or Y value can be separated from the overall position vectors of the bounding boxes. However, when applied to any instances in the model, Bounding Box's Min and Max outputs are always position vectors whose X/Y components are 0, despite the mesh clearly being larger than 0 in those dimensions. This means it only scales the instances to 0 in those dimensions.

About "otherwise the outer part of each ring will scale based on how far down the ring is in the stack, not how far towards the middle it is": the Spreadsheet editor shows that the duplicated index is actually indicating "how far towards the middle" a ring is. There are 3 rings numbered "0" with Z going from 0 to -0.2, 2 rings numbered "1" with Z going from -0.1 to -0.2, 1 ring numbered "2" with Z equal to -0.2.

About "is the scale factor those blue nodes in the green-highlighted area": no, it is a reference to the original graph (described as step (1) in the question).

Well, I was going to point out a few issues I found, but you apparently found all of them and debugged them while I was writing the comment, plus one I hadn't noticed — the issue where, if the "Ring" named attribute minus 2 equals 0, for all intents and purposes it deletes an entire edge loop. Even if I can't figure out how to scale the outer loops of the wall bases based off their radii, I can just go in manually after the geometry nodes are applied and do it myself — 1x for the outermost, 1.1x for the next innermost, 1.2x for the next, etc. 10/10 answer, would ask for help again.


text:
Converting an image to a mesh
I am a railway modeller, I can design and add basic textures in SketchUp, no problems.
I needed to up the texture levels quellenform instructions put me right so now Walls with real life textures are possible.
I made a couple of how too videos aimed at the newbie like myself on my YouTube Channel. I am trying to pass on the knowledge and the response was great.

My question is: how do I convert a SVG/STL/DAE type file in Blender to a single mesh with no subdivisions so I can add a displacement texture. I can then cut out windows using the Boolean method later once the texture is applied. I have Construction lines addon installed, would this help?

Import SVG, Limited dissolve works well.
I try and subdivide and only the edge gets subdivided?

I seem to be doing something wrong as I get to the REMESH stage and when I apply it the CPU slows down and the object disappears.

I thank you very much for the time spent educating a numpty like me.
I have been going through the node sequence box by box trying to work out what does what.
I have come unstuck on the first hurdle. On the Map Texture Scaling Box the blue box Map Range node has no node connectors. How do I connect that box to the Bounding Box node and Position node?

I have updated to the latest Blender and following your Node flowchart, I have MADE SOME CHANGES and the model is working. I need to get into the finer details on how everything works.

Hi :). To remove subdivisions on a flat surface, use the Limited Dissolve command or Decimate Modifier

Now on topic: If you have already successfully applied the Boolean Modifier technique to a section in the inner area, why not repeat the same technique with this outer shape? So extrude this mesh with Solidifier, then a grid which is also extruded with Solidifier, and a Boolean modifier which leaves the part of the intersection of these two parts with Intersect. It is certainly not the most performant solution, but it works and the mesh should be clean enough for further processing.

The unused inputs are hidden to save space, press CTRL+H to unhide

Success, I have found that adding a DAE file converted to a curve works well. Also to replace the original curve with a new one, some geometry links in the NODE EDITOR must be removed and reconnected after new curve added.

OK, I think now it's time for you to get to know Geometry Nodes ;-)
Of course you can do all this with modifiers and various edits directly on the mesh, but this is a desctructive edit, and I strongly assume you are talking about procedural creation of your mesh.
In this example, I created the entire object directly from a curve-based shape using Geometry Nodes:

As you can see, it's a relatively clean and high-resolution mesh that you can always make finer.

The nodes that created this result look like this:

I explain briefly what I do here:

First, I create a grid, and set the size and resolution here. The dimensions should be a bit higher than your shape. You influence the resolution with the number of vertices of the grid, and additionally with the node Subdivision.

I capture the dimensions of this grid with the node Bounding Box and then map the positions of the individual points to an area that can then be used for texture mapping. The size of the texture is defined with the node Scale (Vector Math).

Then I include the actual displacement map with the node Image Texture, which receives the previously calculated positions as vector input. The height of the displacement is controlled by the node Multiply (Math).

In the next step I apply the displacement to the grid with the node Set Position. The node Transform defines the final position of the grid.

At the same time I get the shape of the grid. In this case it must be a curve. In your case you have the optimal data when importing SVG, and if it is still a mesh, just transform it into curves beforehand. I fill this curve(s) with the node Fill Curve (with the settings N-gons) so that I have a clean mesh as a base. Furthermore I apply the node Extrude which gives me an extruded mesh like the modifier Solidify.

Now comes the computationally intensive part: I combine these shapes with the node Mesh Boolean (with the setting Difference), so that I finally get the result where only the surface of the mesh is affected by the displacement, but still only the surface is replaced by a clean grid.

In the final step I apply the original shape with flipped faces on the bottom side and merge the vertices with the node Merge Vertices.

With that, you should have your 100% procedural mesh.

Note:

Since everything here is procedural, a lot of processing power is needed. So always try changes on a less high resolution mesh first (reduce the subdivision)! Increase the subdivision only at the end, as soon as you are satisfied with your result.
The shape to which you apply the displacement must always be a little larger than the shape you want to edit.


text:
Rigged model wrong in object mode when I import it
This is what my rigged model looks like in Object Mode when I import it:

But is correct in Edit Mode:

How to fix this?

It's probably a pose. Have you tried to clear it? (Select armature, switch to pose mode, select all bones, select menu Pose > Clear Transform > All)

Thanks, that fixed it.


text:
Unsplit a face in an object or reconnect a face
I'm new to using this app so I'm not really certain what happened, but I think while I was trying to resize or move a face on the y-axis in Edit Mode, I hit Y on the face and split it. And now if I try to move it, it will move separate from the head entirely. Whenever or however I did this, I can't undo it. Is there a way to reconnect the face back to the block?
Example of the face before I do anything with it:

Example of the face when I try to move it with G

If you've not done too much else, CTRL-Z will undo each action back to the limit of the undo buffer which is set via Edit > Preferences > System > Memory & Limits > Undo Steps.

If you can't undo, delete the face with X then select the edges around where the face was and hit F

If the face is back in the place where it was before, press A to select all, then M > Merge > By Distance: if you didn't move the face the vertices of the face should be in the same place as the ones where the ocnnection was and they get merged.

@GordonBrinkmann ah this worked! thank you so much!!


text:
How to add new bone to my current control rig for animation?
I have a model which I rigged with the Mixamo addon (it's humanoid). Now I have to add a new bone (or something, probably it could be an object Empty) to make animation for ball (run with ball - new bone it was supposed to be for ball) and then a mesh will be added to the bone in Unity. I don't know how to do this. Once I added the bone to the armature and it worked with animation (but I think it wasn't control rigged bone) and in Unity animation doesn't work properly - this the bone animation.
Here's a video demonstration in Blender and in Unity
Download blender file

Hi, welcome! Just a heads up that you can attach images to your question in a way that they directly appear inline with your text. This might make your question more accessible. :)

So the problem was in unity,If you use humanoid rig it doesn't show extra bones in animators so in unity you should active this bones manual -> here is the answer https://forum.unity.com/threads/humanoid-rigs-and-extra-bones.360979/
If you have exportes file (fbx) with armature and baked animations in it In inspectore you have to go to animation tab -> go to MASK ( bottom in this window) then open transform tab and find bones wihich you want to be active in my case it was bone named *ball_control and then click apply _> in your export file it will create new animation xx_1 and this animation will show your extra bones.
Maybe someone use this

Thanks for the posts. This is not a regular forum, according to site rules links to answers are not answers if the link goes missing your answer becomes an empty shell without content. Answers should be substantial and stand on their own without relying on external data like links, videos or images. Instead of having users go through external links, either transcribe essential parts of the process here, linking the source, or posts these in the comments section instead.


text:
Botaniq grass on the road
Grass grows on the road. I'm using the Botaniq full addon. How to place the grass only on the plane? Boolean modifier doesn't work.

From downloaded free addon, I can see a grass object is a cluster of wheats as single object and distributed by particle system. So each particle distributes this wheat cluster. This cluster has an origin at a center. When particle system distributes points they can be released close to border and since each point is represent by grass cluster it easily appears as part of this cluster is outside original (distribution) object.

Yes, that right. But can I solve it somehow? I was trying to cut the gress with Boolean modifier. But that didn´t work.

When you place a grass, in Outliner window you can see several objects:

Collection of grass objects (named Grass_Basic...)
and actual plane object distributing objects from collection.
(named pps_Grass ... "pps" probably plane's particle system)

Each objects in this collection is a cluster of grass wheats with Origin at center of this cluster.

Each object in collection is used to be rendered at a point distributed by particle system. Since particles can be released close to plane border, the cluster rendered with center at particle position partly place the grass cluster out of plane.

Yes, that right. But can I solve it somehow? I was trying to cut the gress with Boolean modifier. But that didn´t work.

Solution depends how complex part you need to solve. If it is just a strip, seen in your screenshot, make it narrower ... or you can try extend material node tree with a few nodes - make it transparent in that part. I can extend my answer if you are interested (or if does it make sense in your case)... nothing for very close up look :)

You could select the row of faces closest to the road.  Then hit p to make them their own object. Then place new grass just on that strip and scale down the grass so that it does cover the road.  This could give a it a nice "edge trimmer" effect which could add to the realism of the scene.  Just a thought


text:
Object flies away when adding Curve modifier
When I'm adding the curve modifier and adding a curve object - my object flies away

For the "Curve" modifier to work, the object and the curve must be in the same position and have the same rotation.

@LeonardoCáceres Thank you!!! It solves my problem

As @LeonardoCáceres said, the position and rotation for both object and curve must be same. It solved my problem!

To get the same rotation, select the object that's flying away, select "Object Constraint Properties" on the right panel, select "Copy Rotation" constraint from the pulldown and point it to your curve object.
(took me way to long to figure this out, posting detailed pic to save others my headache!)


text:
Multiply object and place at vertices with specific orientation
I have this object:
And these vertices connected at their center:
I want to multiply the object and place mutiples of it at the center of the different vertices, and have all the multiples oriented with their Z-axis away from the center vertex; like so:
How would I go about doing this?
In the third image, the result is not perfect and the local Z-axis of the object is not aligned well.

The standard duplication feature for vertices supports rotation, but it wob't align the cone-like meshes like in your example. Personally, I would write a Python script, that calculated the vectors from the central vertex, duplicated the cone-like objects and constructed a transformation matrix for them based on the calculated vector. But someone else may know an easier way.

You could use Dupliverts to add one copy of the object to each vertex, and then use a Constraint to orient them correctly.

Parent the rounded cylinder object to the vertex object by pressing CtrlP:

Enable Dupliverts in Properties > Object > Duplication with the vertex object selected and scale the rounded cylinder object down (S):

Select the rounded cylinder object and snap the 3D cursor to it with ShiftS:

Add an empty (ShiftA> Empty > Plain Axes), it should appear at the center of the rounded cylinder object (where the 3D cursor is). Then select the vertex object and press CtrlShiftA to make the dupliface objects real:

With one of the rounded cylinder objects selected, add a Track To constraint in Properties > Constraints and tweak the axes settings:

With the same rounded cylinder object selected, press ShiftL> Object Data to select all the other rounded cylinder objects, then copy the constraints by pressing 3D View > Header > Object > Constraints > Copy Constraints to Selected Objects:

If you then snap the vertex object to the 3D cursor, and then delete the two center rounded cylinder objects, you get this:

Removing the constraints
To "apply" the constraints to the object transforms, select all the rounded cylinder objects again:

Select one of them and press ShiftL> Object Data

Press CtrlA> Apply Visual Transform make their actual rotation the same as the constrained rotation.

Then remove the constraints:

Remove the constraint from one by pressing the X on the constraint in Properties > Constraints.

Copy it to the others with 3D View > Header > Object > Constraints > Copy Constraints to Selected Objects.


text:
Having trouble panning/rotating with two-fingers on trackpad
I'm having trouble with something that's hopefully pretty basic. I just got a windows laptop after using a macbook for a while. I was surprised to find that blender was not acting the same. On my mac, when I do a two-finger scroll, it rotates the view, and when I do shift+two fingers, it pans the view. On my new laptop, it acts like it would with a deskop + a mouse: to rotate I have to click the middle mouse button (in my case, left-click+alt) and move it, and to pan I do this +shift.
This seems like an unnecessary number of keys to be pressing when I have scrolling functionality built into the touchpad. Any suggestions?
I have an asus laptop with an elan touchpad, the latest drivers installed.
Thanks!!

Although I haven't experienced with this kind of device, I think it is possible to try setting the customized input for your own via User Preferences (Ctrl Alt U).
example here and here.

And http://forum.notebookreview.com/asus/684036-enabling-3-finger-tap-middle-click-other-functions-elan-touchpads-zenbooks-etc.html

Thanks to both of you.
@LeonCheung, I noticed those settings, but unfortunately they seem to be settings that are already set the right way: pan and rotate are set to trackpad pan/rotate. Screenshot here: https://www.dropbox.com/s/9dz8dgeopg88ign/Screenshot%202014-02-07%2009.27.54.png Any idea why this isn't working?

@stacker, thanks for the link, I guess I'll be messing with some drivers and registry settings.

SO just gave me a notification that this is a popular question. Unfortunately, the only solution I was able to end up finding for this problem was to return the windows laptop and getting a macbook :|

Take a look at this video: https://www.youtube.com/watch?v=nCgt4ODsWYQT Basic tutorial for mac/trackpad users.

Go file, input and then check the emulate 3 button mouse.
Then exit it and use alt + right click.


text:
How exactly does Blender perform a simple deformation?
I would like to understand, in detail, the algorithm used by blenders simple deform modifier, specifically the bend tool. I have found the source code but I do not understand exactly what it is doing. It looks like it is assigning weights to the vertices but how does that make the mesh bend? How exactly are the weights chosen? I want to know because I would like to be able to predict how the mesh will deform without actually performing several tests to get it just right.
Is there more detailed documentation somewhere or perhaps a paper which describes the general algorithm? Also, if there is a better place to ask this type of question please let me know.
Thanks.

By following the file history I can find that it was originally developed in the soc-2008-jaguarandi branch. The original documentation for it is here but I don't see any explanation of the algorithm used and there are no comments on papers used.
If you could find a copy of the gsoc application it may have a description of the algorithm.
It's also possible that you could contact jaguarandi who may still remember how it works.


text:
Config blender to save backup files in subfolder
Blender is by default config to save backup file from previous saves like .blender1, .blender2 and this is a good thing in case you mess up. What i want is to config blender to place this specific files in a subdirectory. Right now they show up in the list of blender files and make the list really long if you have a few scenes. Is it possible to config blender to do this?
Illustration of the structure.
.blender_folder
..Backup
...file1.blender1
...file1.blender2
...file2.blender1
...file2.blender2
..file1.blender
..file2.blender

I don't think you can do this without altering the source code and building your own version.

Make a request as it is a thing that bothers me a bit, too

I took a little time writing an addon for Blender, which will move the backup save files to a sub directory every time you save. You may change it however you want it to work.
I hope it works for you guys. :)
Simply save the code below into a file called something .py, I called mine "blender_move_backup_save_files_to_a_sub_directory.py".
Then import the file by clicking: File > User Preferences > Addons > Install From File... > Finally select the file and activate the addon.
bl_info = {
    "version": (1, 3),
    "blender": (2, 68, 0),
    "name": "Move Backup Save Files To A Sub Directory",
    "author": "Jonathan Stroem",
    "description": """Move the backup save files to a sub-directory instead of the Blender-file's current directory. A new folder called "backup.blend" will be created and all save-files will be moved there instead of the default folder.""" ,
    "category": "System",
    "location": """The backup folder will be named "backup.blend". Under 'File > User Preferences > File > Save Versions', you can change how many backups that'll be used.""",
    }

#IMPORTS
import bpy, os
import shutil
from bpy.app.handlers import persistent

import time
from stat import *

#When enabling the addon.
def register():
    bpy.app.handlers.save_post.append(move_handler)

#When disabling the addon.
def unregister():
    bpy.app.handlers.save_post.remove(move_handler)

#So that Blender recognize it as an addon.
if __name__ == "__main__":
    register()

@persistent
def move_handler(dummy):

    #fullpath = Full path to the data file.
    #directory = Directory the data file is in.
    #name = Name of file, without extension.
    #extension = Extension of files.
    #backup_amount = Max amount of backups to store.
    #backup_directory = The name of the backup directory. (Where the files should be moved.) So change this if you want to change where the backups are saved.

    file = {"fullpath":bpy.data.filepath, \
            "directory":os.path.dirname(bpy.data.filepath), \
            "name":bpy.path.display_name_from_filepath(bpy.data.filepath), \
            "extension":".blend", \
            "backup_amount":bpy.context.user_preferences.filepaths.save_version, \
            "backup_directory":"backup.blend" \
            }

    #Create backup directory if it doesn't exist.
    if file["backup_directory"] not in os.listdir(file["directory"]) :
        os.chdir(file["directory"])
        os.mkdir(file["backup_directory"])

    #Get current save files from the backup directory.
    currentFiles = []
    for f in [ f for f in os.listdir(file["directory"] + "\\" + file["backup_directory"]) for c in range(1, int(file["backup_amount"]) + 1) if f == file["name"] + file["extension"] + str(c) if os.path.isfile(os.path.join(file["directory"] + "\\" + file["backup_directory"], f)) ] :
        currentFiles.append(f)

    #All this is moving the correct file.
    if len(currentFiles) < 1 : #If no files, then no need to check.
        if os.path.isfile(file["fullpath"] + "1") :
            shutil.move(file["fullpath"] + "1", file["directory"] + "\\" + file["backup_directory"] + "\\" + file["name"] + ".blend1")
    else : #If the max backup amount has been reached, then check for the oldest file and overwrite that one.
        if file["backup_amount"] <= len(currentFiles) :
            replaceFile = {"modified_date":None, \
                           "fullname":""}
            for f in currentFiles :
                stats = os.stat(file["directory"] + "\\" + file["backup_directory"] + "\\" + f) #Get attributes from a file.
                if replaceFile["fullname"] == "" : #This will happen only the first time.
                    replaceFile["fullname"] = f
                    replaceFile["modified_date"] = time.asctime(time.localtime(stats[ST_MTIME]))
                else : # Is the previous file older or newer? If it's older, then you'd want to overwrite that one instead. Go through all backup-files.
                    temp_modified = time.asctime(time.localtime(stats[ST_MTIME]))
                    if replaceFile["modified_date"] > temp_modified :
                        replaceFile["fullname"] = f
                        replaceFile["modified_date"] = temp_modified

            #When the loop is finished, the oldest file has been found, and will be overwritten.
            shutil.move(file["fullpath"] + "1", file["directory"] + "\\" + file["backup_directory"] + "\\" + replaceFile["fullname"])
        else : #If the max backup amount hasn't been reached, and the folder isn't empty.
            #Then check for the next number, and then just move the file over with the correct number.
            replaceFile = "" #Location.
            for f in currentFiles :
                for c in range(1, int(file["backup_amount"]) + 1) :
                    if not os.path.isfile(file["directory"] + "\\" + file["backup_directory"] + "\\" + file["name"] + file["extension"] + str(c)) :
                        shutil.move(file["fullpath"] + "1", file["directory"] + "\\" + file["backup_directory"] + "\\" + file["name"] + file["extension"] + str(c))
                        replaceFile = f
                        break
                if replaceFile != "" : #File to replace has been found, break out.
                    break

#This document is licensed according to GNU Global Public License v3.

Thanks for take the time to do this, is it ok if i spread the code to other people that might be interested?

You're welcome, I'm glad you like it.Yes, definitely! Feel free to spread it around.

Even though this is 4 years old, it's still very useful.

No longer works in versions 2.8 and beyond. Is it possible to get this updated for 2.9?

First of all, thank you Jonathan for writing this script. I'm much happier with this arrangement of backup files!
It didn't work out of the box on my Mac because the some of the OS paths were constructed with hard-coded Windows backslashes, so I went in and changed them to be platform independent.
I hope this is helpful to someone. Since I hadn't seen any later versions of this script, I went ahead and advanced the version #.
bl_info = {
    "version": (1, 4),
    "blender": (2, 68, 0),
    "name": "Move Backup Save Files To A Sub Directory",
    "author": "Jonathan Stroem",
    "description": """Move the backup save files to a sub-directory instead of the Blender-file's current directory. A new folder called "backup.blend" will be created and all save-files will be moved there instead of the default folder.""" ,
    "category": "System",
    "location": """The backup folder will be named "backup.blend". Under 'File > User Preferences > File > Save Versions', you can change how many backups that'll be used.""",
    }

#IMPORTS
import bpy, os
import shutil
from bpy.app.handlers import persistent

import time
from stat import *

#When enabling the addon.
def register():
    bpy.app.handlers.save_post.append(move_handler)

#When disabling the addon.
def unregister():
    bpy.app.handlers.save_post.remove(move_handler)

#So that Blender recognize it as an addon.
if __name__ == "__main__":
    register()

@persistent
def move_handler(dummy):

    #fullpath = Full path to the data file.
    #directory = Directory the data file is in.
    #name = Name of file, without extension.
    #extension = Extension of files.
    #backup_amount = Max amount of backups to store.
    #backup_directory = The name of the backup directory. (Where the files should be moved.) So change this if you want to change where the backups are saved.

    file = {"fullpath":bpy.data.filepath, \
            "directory":os.path.dirname(bpy.data.filepath), \
            "name":bpy.path.display_name_from_filepath(bpy.data.filepath), \
            "extension":".blend", \
            "backup_amount":bpy.context.user_preferences.filepaths.save_version, \
            "backup_directory":"backup.blend" \
            }

    #Create backup directory if it doesn't exist.
    if file["backup_directory"] not in os.listdir(file["directory"]) :
        os.chdir(file["directory"])
        os.mkdir(file["backup_directory"])

    #Get current save files from the backup directory.
    currentFiles = []
    for f in [ f for f in os.listdir(os.path.join(file["directory"], file["backup_directory"])) for c in range(1, int(file["backup_amount"]) + 1) if f == file["name"] + file["extension"] + str(c) if os.path.isfile(os.path.join(file["directory"], file["backup_directory"], f)) ] :
        currentFiles.append(f)

    #All this is moving the correct file.
    if len(currentFiles) < 1 : #If no files, then no need to check.
        if os.path.isfile(file["fullpath"] + "1") :
            shutil.move(file["fullpath"] + "1", os.path.join(file["directory"], file["backup_directory"], file["name"] + ".blend1"))
    else : #If the max backup amount has been reached, then check for the oldest file and overwrite that one.
        if file["backup_amount"] <= len(currentFiles) :
            replaceFile = {"modified_date":None, \
                           "fullname":""}
            for f in currentFiles :
                stats = os.stat(os.path.join(file["directory"], file["backup_directory"], f)) #Get attributes from a file.
                if replaceFile["fullname"] == "" : #This will happen only the first time.
                    replaceFile["fullname"] = f
                    replaceFile["modified_date"] = time.asctime(time.localtime(stats[ST_MTIME]))
                else : # Is the previous file older or newer? If it's older, then you'd want to overwrite that one instead. Go through all backup-files.
                    temp_modified = time.asctime(time.localtime(stats[ST_MTIME]))
                    if replaceFile["modified_date"] > temp_modified :
                        replaceFile["fullname"] = f
                        replaceFile["modified_date"] = temp_modified

            #When the loop is finished, the oldest file has been found, and will be overwritten.
            shutil.move(file["fullpath"] + "1", os.path.join(file["directory"], file["backup_directory"], replaceFile["fullname"]))
        else : #If the max backup amount hasn't been reached, and the folder isn't empty.
            #Then check for the next number, and then just move the file over with the correct number.
            replaceFile = "" #Location.
            for f in currentFiles :
                for c in range(1, int(file["backup_amount"]) + 1) :
                    if not os.path.isfile(os.path.join(file["directory"], file["backup_directory"], file["name"] + file["extension"] + str(c))) :
                        shutil.move(file["fullpath"] + "1", os.path.join(file["directory"], file["backup_directory"], file["name"] + file["extension"] + str(c)))
                        replaceFile = f
                        break
                if replaceFile != "" : #File to replace has been found, break out.
                    break

#This document is licensed according to GNU Global Public License v3.

with this change that work for me on Linux.
bl_info = {
    "version": (1, 3, 1),
    "blender": (3, 0, 0),
    "name": "Move Backup Save Files To A Sub Directory",
    "author": "Jonathan Stroem",
    "description": """Move the backup save files to a sub-directory instead of the Blender-file's current directory. A new folder called "backup.blend" will be created and all save-files will be moved there instead of the default folder.""" ,
    "category": "System",
    "location": """The backup folder will be named "backup.blend". Under 'File > User Preferences > File > Save Versions', you can change how many backups that'll be used.""",
    }

import bpy, os
import shutil
from bpy.app.handlers import persistent

import time
from stat import *

def register():
    bpy.app.handlers.save_post.append(move_handler)

def unregister():
    bpy.app.handlers.save_post.remove(move_handler)

if __name__ == "__main__":
    register()

@persistent
def move_handler(dummy):

    file = {"fullpath":bpy.data.filepath, \
            "directory":os.path.dirname(bpy.data.filepath), \
            "name":bpy.path.display_name_from_filepath(bpy.data.filepath), \
            "extension":".blend", \
            "backup_amount":bpy.context.preferences.filepaths.save_version, \
            "backup_directory":"backup" \
            }
    if file["backup_directory"] not in os.listdir(file["directory"]) :
        os.chdir(file["directory"])
        os.mkdir(file["backup_directory"])
    currentFiles = []
    for f in [ f for f in os.listdir(os.path.dirname(bpy.data.filepath) + "/" + "backup") ] :
        for c in range(1, int(bpy.context.preferences.filepaths.save_version) + 1) :
            if f == bpy.path.display_name_from_filepath(bpy.data.filepath) + ".blend" + str(c) :
                if os.path.isfile(os.path.join(os.path.dirname(bpy.data.filepath) + "/" + "backup", f)) :
                    currentFiles.append(f)
    if len(currentFiles) < 1 :
        if os.path.isfile(file["fullpath"] + "1") :
            shutil.move(file["fullpath"] + "1", file["directory"] + "/" + file["backup_directory"] + "/" + file["name"] + ".blend1")
    else :
        if file["backup_amount"] <= len(currentFiles) :
            replaceFile = {"modified_date":None, \
                           "fullname":""}
            for f in currentFiles :
                stats = os.stat(file["directory"] + "/" + file["backup_directory"] + "/" + f)
                if replaceFile["fullname"] == "" :
                    replaceFile["fullname"] = f
                    replaceFile["modified_date"] = time.asctime(time.localtime(stats.st_mtime))
                else :
                    temp_modified = time.asctime(time.localtime(stats.st_mtime))
                    if replaceFile["modified_date"] > temp_modified :
                        replaceFile["fullname"] = f
                        replaceFile["modified_date"] = temp_modified
            shutil.move(file["fullpath"] + "1", file["directory"] + "/" + file["backup_directory"] + "/" + replaceFile["fullname"])
        else :
            replaceFile = ""
            for f in currentFiles :
                for c in range(1, int(file["backup_amount"]) + 1) :
                    if not os.path.isfile(file["directory"] + "/" + file["backup_directory"] + "/" + file["name"] + file["extension"] + str(c)) :
                        shutil.move(file["fullpath"] + "1", file["directory"] + "/" + file["backup_directory"] + "/" + file["name"] + file["extension"] + str(c))
                        replaceFile = f
                        break
                if replaceFile != "" :
                    break

#This document is licensed according to GNU Global Public License v3.

this is very beautiful. thanks
(it worked on blender 3.4.1 on Windows 10)

In Blender the file selector window have a filter for excluding BLEND1/BLEND2/... files. It's located inbetween the show BLEND files and show image files (a grey icon with the Blender logo).

Don't forget to activate the filter altogether by clicking on the funnel icon to the left of all the possible filters.
In Windows 7 you can right click and select group by type, and then click on the arrows next to "BLEND1 file", "BLEND2 file" et.c. in order to collapse these. This helps to remove clutter when browsing the files in Windows Explorer. Windows remembers your selection.
And consider using software for version control like GIT (http://git-scm.com/). Then you do not need the BLEND1/BLEND2/... files at all! And have greater flexibility experimenting.

I made a version so I could change the directory to an absolute path (copied from the 4.x.x version below by Charlie Essers):
Simply change the line below that reads:

"directory":os.path.abspath("/####/#####/####"), \

Example mine reads:

"directory":os.path.abspath("/Users/BrianPlauger/blender-temp"), \

This then saves it to the location Users/BrianPlauger/blender-temp
I am not sure it would create a directory if yours didn't exist but those that are smarter than me can figure that out. I would just create a directory first before installing the script, and then point it to that directory.

bl_info = {
    "version": (1, 5, 1),
    "blender": (4, 1, 1),
    "name": "Move old Save Files To A Sub Directory",
    "author": "Jonathan Stroem, Paul Mohr, Anthony Aragues",
    "description": """Move the backup save files to a sub-directory instead of the Blender-file's current directory. A new folder called "backup.blend" will be created and all save-files will be moved there instead of the default folder.""" ,
    "category": "System",
    "location": """The backup folder will be named "backup.blend". Under 'File > User Preferences > File > Save Versions', you can change how many backups that'll be used.""",
    }

#IMPORTS
import bpy, os
import shutil
from bpy.app.handlers import persistent

import time
from stat import *

@persistent
def move_handler(dummy):
    print('save_post handler:', bpy.data.filepath, dummy)

    #fullpath = Full path to the data file.
    #directory = Directory the data file is in.
    #name = Name of file, without extension.
    #extension = Extension of files.
    #backup_amount = Max amount of backups to store.
    #backup_directory = The name of the backup directory. (Where the files should be moved.) So change this if you want to change where the backups are saved.

    file = {"fullpath":bpy.data.filepath, \
            "directory":os.path.abspath("/####/#####/####"), \
            "name":bpy.path.display_name_from_filepath(bpy.data.filepath), \
            "extension":".blend", \
            "backup_amount":bpy.context.preferences.filepaths.save_version, \
            "backup_directory":"backup.blend" \
            }

    #Create backup directory if it doesn't exist.
    if file["backup_directory"] not in os.listdir(file["directory"]) :
        os.chdir(file["directory"])
        os.mkdir(file["backup_directory"])

    #Get current save files from the backup directory.
    currentFiles = []
    for f in [ f for f in os.listdir(os.path.join(file["directory"], file["backup_directory"])) for c in range(1, int(file["backup_amount"]) + 1) if f == file["name"] + file["extension"] + str(c) if os.path.isfile(os.path.join(file["directory"], file["backup_directory"], f)) ] :
        currentFiles.append(f)

    #All this is moving the correct file.
    if len(currentFiles)  temp_modified :
                        replaceFile["fullname"] = f
                        replaceFile["modified_date"] = temp_modified

            #When the loop is finished, the oldest file has been found, and will be overwritten.
            shutil.move(file["fullpath"] + "1", os.path.join(file["directory"], file["backup_directory"], replaceFile["fullname"]))
        else : #If the max backup amount hasn't been reached, and the folder isn't empty.
            #Then check for the next number, and then just move the file over with the correct number.
            replaceFile = "" #Location.
            for f in currentFiles :
                for c in range(1, int(file["backup_amount"]) + 1) :
                    if not os.path.isfile(os.path.join(file["directory"], file["backup_directory"], file["name"] + file["extension"] + str(c))) :
                        shutil.move(file["fullpath"] + "1", os.path.join(file["directory"], file["backup_directory"], file["name"] + file["extension"] + str(c)))
                        replaceFile = f
                        break
                if replaceFile != "" : #File to replace has been found, break out.
                    break
@persistent
def test_handler(dummy):
    print('save_pre handler:', bpy.data.filepath, dummy)

#When enabling the addon.
def register():
    bpy.app.handlers.save_post.append(move_handler)

#When disabling the addon.
def unregister():
    bpy.app.handlers.save_post.remove(move_handler)

#So that Blender recognize it as an addon.
if __name__ == "__main__":
    register()

#This document is licensed according to GNU Global Public License v3.

Cheers to Jonathan and Paul for leading the way. Anthony Araques of Adventures in 3d modified their Add-on to work with Blender 4.x!
bl_info = {
    "version": (1, 5),
    "blender": (4, 0, 0),
    "name": "Move old Save Files To A Sub Directory",
    "author": "Jonathan Stroem, Paul Mohr, Anthony Aragues",
    "description": """Move the backup save files to a sub-directory instead of the Blender-file's current directory. A new folder called "backup.blend" will be created and all save-files will be moved there instead of the default folder.""" ,
    "category": "System",
    "location": """The backup folder will be named "backup.blend". Under 'File > User Preferences > File > Save Versions', you can change how many backups that'll be used.""",
    }

#IMPORTS
import bpy, os
import shutil
from bpy.app.handlers import persistent

import time
from stat import *

@persistent
def move_handler(dummy):
    print('save_post handler:', bpy.data.filepath, dummy)

    #fullpath = Full path to the data file.
    #directory = Directory the data file is in.
    #name = Name of file, without extension.
    #extension = Extension of files.
    #backup_amount = Max amount of backups to store.
    #backup_directory = The name of the backup directory. (Where the files should be moved.) So change this if you want to change where the backups are saved.

    file = {"fullpath":bpy.data.filepath, \
            "directory":os.path.dirname(bpy.data.filepath), \
            "name":bpy.path.display_name_from_filepath(bpy.data.filepath), \
            "extension":".blend", \
            "backup_amount":bpy.context.preferences.filepaths.save_version, \
            "backup_directory":"backup.blend" \
            }

    #Create backup directory if it doesn't exist.
    if file["backup_directory"] not in os.listdir(file["directory"]) :
        os.chdir(file["directory"])
        os.mkdir(file["backup_directory"])

    #Get current save files from the backup directory.
    currentFiles = []
    for f in [ f for f in os.listdir(os.path.join(file["directory"], file["backup_directory"])) for c in range(1, int(file["backup_amount"]) + 1) if f == file["name"] + file["extension"] + str(c) if os.path.isfile(os.path.join(file["directory"], file["backup_directory"], f)) ] :
        currentFiles.append(f)

    #All this is moving the correct file.
    if len(currentFiles) < 1 : #If no files, then no need to check.
        if os.path.isfile(file["fullpath"] + "1") :
            shutil.move(file["fullpath"] + "1", os.path.join(file["directory"], file["backup_directory"], file["name"] + ".blend1"))
    else : #If the max backup amount has been reached, then check for the oldest file and overwrite that one.
        if file["backup_amount"] <= len(currentFiles) :
            replaceFile = {"modified_date":None, \
                           "fullname":""}
            for f in currentFiles :
                stats = os.stat(os.path.join(file["directory"], file["backup_directory"], f)) #Get attributes from a file.
                if replaceFile["fullname"] == "" : #This will happen only the first time.
                    replaceFile["fullname"] = f
                    replaceFile["modified_date"] = time.asctime(time.localtime(stats[ST_MTIME]))
                else : # Is the previous file older or newer? If it's older, then you'd want to overwrite that one instead. Go through all backup-files.
                    temp_modified = time.asctime(time.localtime(stats[ST_MTIME]))
                    if replaceFile["modified_date"] > temp_modified :
                        replaceFile["fullname"] = f
                        replaceFile["modified_date"] = temp_modified

            #When the loop is finished, the oldest file has been found, and will be overwritten.
            shutil.move(file["fullpath"] + "1", os.path.join(file["directory"], file["backup_directory"], replaceFile["fullname"]))
        else : #If the max backup amount hasn't been reached, and the folder isn't empty.
            #Then check for the next number, and then just move the file over with the correct number.
            replaceFile = "" #Location.
            for f in currentFiles :
                for c in range(1, int(file["backup_amount"]) + 1) :
                    if not os.path.isfile(os.path.join(file["directory"], file["backup_directory"], file["name"] + file["extension"] + str(c))) :
                        shutil.move(file["fullpath"] + "1", os.path.join(file["directory"], file["backup_directory"], file["name"] + file["extension"] + str(c)))
                        replaceFile = f
                        break
                if replaceFile != "" : #File to replace has been found, break out.
                    break
@persistent
def test_handler(dummy):
    print('save_pre handler:', bpy.data.filepath, dummy)

#When enabling the addon.
def register():
    bpy.app.handlers.save_post.append(move_handler)

#When disabling the addon.
def unregister():
    bpy.app.handlers.save_post.remove(move_handler)

#So that Blender recognize it as an addon.
if __name__ == "__main__":
    register()

#This document is licensed according to GNU Global Public License v3.


text:
Importing makehuman figure and joining
Imported figure direct into blender 3.4.1 using the Import human tab. Human comes in as seperate bits pic1. When i join the seperate bits together pic2 is the result. Not quiet what I want.

Man 01

I don’t see the brown meshes in the unjoined version. Something about joining us making them visible. Did you hide them in viewport (not with the H key)?

I have attached the file Man01, its on workupload because of the size. This figure is just imported direct from makehuman.

When you combine multiple meshes, it only keeps the last object's modifiers, all the others are removed. In this case, the "My Man 001.Body" has a Toggle Visibility Helper which is hiding a lot of vertices. These vertices became visible when you joined the meshes together.
To avoid this problem, with the "My Man 001.Body" selected, apply the modifier before you join the meshes:

Excellent, thanks very much.


text:
Boolean not performing as expected
I have 2 imported STL's which I am trying to use the Boolean modifier to subtract the object from the truck windscreen with not much success. When I apply the Boolean it leaves the object imbedded in the truck.

Hello it seems to work with Solver >Fast instead of Exact

The Solver > Fast option seems to work, instead of Exact:

Sometimes the answerer is just staring you in the face and you just don't see it. Another lesson learnt, thanks.


text:
Imported dae from SketchUp
I import a dae file from sketchup into Blender and go to edit mode.
The pic is the mesh generated by the dae file. How do I remove the lines going from the circle to the edges? My aim is to have a clean mesh so I can subdivide and add some texture.

Not the result I was looking for.

You can press X and choose Limited Dissolve, this will get rid of most of the edges. But note: the hole in the middle needs at least one connection to the outside, so you will never get rid of all edges.
If you want to have more control, let's say each outer corner should have one connection edge to the hole in the middle, just select all edges you don't want to keep, then again press X and choose Dissolve Edges.


text:
Solidify 3d slice thin walls
I drape the barrels with a subdivided mesh and apply subdivide.
All works fine.
I solidify with .05 thickness and apply.
Most of the draped mesh thickens except the top where it lays across barrels.
Export as STL which confirms the top is a lot thinner than the sides.
I am missing a setting somewhere, any help please.
Eddy

Did you apply scale in object mode?

Thank you Marty, just one simple step and all is good lots to learn.


text:
Grouping fingers to move with hand
Blender file
I import my MakeHuman figure into Blender 3.0.0 apply IK to middle finger to move the arm.
I then close fingers together to give me a better chance of 3d printing.
When I move the hand using the IK linked finger the other fingers move all over the place.
I know I am doing something wrong but cannot work it out.
Any help pse?
Eddy

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

hello please share your file so that we can test: https://pasteall.org/blend/


text:
Removing windows from a STL truck
I have a STL which I need to remove the windows from.
I have dissolved the faces to form one workable face.
My problem is I need to push this through to the other side but keep the object solid.
I can extrude the face but obviously it does not match up on the other side.
I need to keep the object watertight as I will be 3d printing it.

delete window, select edge loops on both sides and use bridge tool ... BTW now I checked your blend - seems to be done as solid ... now I don't understand your Q.

The object is a solid, but I need to remove the windows and leave space in the cab for 3d printed figures. I will then reglaze the windows with glass. If I just remove the glass and export the object as a STL it will auto repair in my slicer and fill the window gaps in again.

I have used the edge loop and bridge method on the side windows and it works perfectly, the front windows are another problem.

Sorry but your screens shows what you described, but provided blend file has already glass deleted and holes filled https://imgur.com/jlIQ1xB ... so the only one difference that you mentioned in comment now is you need space for figures?

There must be confusion on what I am trying to achieve. I used the loop bridge to delete side windows. I have used Boolean to cut the front windows out. As pictures above.

Big mistake I uploaded the wrong file to start with, new file added.


text:
Wave effect with pentagon shapes: Solidify Modifier does not work as desired
I'm working on a project to create a wave-like effect with pentagon shapes. I am not sure I am doing this the most efficient way, but it almost works.
Except for the Solidify Modifier that does not work as I hoped. When I apply the solidify modifier to the pentagon shapes, the outer bevels/corners become much larger than the inner corners. Messing up the entire animation.
Screenshot one looks good and as desired. Yet when the waves come back up, screenshot 2, you notice the outer corners are much larger, making the wave effect look very weird,
Any ideas on how to solve this?

Possible steps, if destructive modelling is acceptable:

5-sided Mesh Circle
CtrlShiftB bevel vertices
ShiftDS duplicate and scale to centre
CtrlE Edge Menu > Bridge Edge Loops
CtrlR cut in desired number of slices
V split the newly created loops

(ShiftD dupe inner loop, and F fill, if needed)

Solidify, and Bevel modifiers, or extrusion and a bevel operation

If you then P separate by loose parts, and set the origin of each ring to a corresponding face with the others, you can assign them all a Shrinkwrap constraint to a mesh which is influenced by a Wave modifier:

With this sort of result:

Wrangling the Wave modifier to loop, if that's what you need, is a bit of a fiddle, fishing for the right numbers. The maths might be a bit easier with a little Geometry Nodes tree, but that's another question?

Omg! You're my hero of the week! haha. This is exactly what I'm looking for. I'm gonna give this a go tonight and see if I can recreate this. Thanks again!

Hi @MarcusMaximus! np. There is a bit of added complexity here to wave-move the rings without deforming the rings themselves. You may not need that.

Here's a type of topology you may be interested in, albeit a little bit more manual. You need to model 1/5 of the pentagon, and then you can duplicate and rotate the mesh 72 degrees 5 times. Merge with AM > By Distance and separate each set of ring faces with P > Separate > By Selection

So you can get something like this:

You can dissolve some of the unneeded Edge Loops. Add 2 Supporting Edge Loop rings on the outer and 2 Supporting Edge Loops rings on the inner sides for support for your Subdivision Modifier:

With a nicely spaced quad topology, you can do more versatile things like creating smooth deformations, optimizing edge loops for animations, and achieving more predictable shading results:

That looks like you have the Bevel type set to Percentage instead of Offset. Try these setting instead:

Depending on how big you want the bevel I think you should have a bevel mod before the solidify to bevel the vertices and get smooth corners and then another bevel mod after the solidify, set to only sharp angles so that it only affects the borders
That way you can have different widths for the bevels

Unfortunately I had the same bevel settings as you, and it didn't change much. Clever idea though to also put a bevel mod before the solidify.

I've added an extra screenshot clarifying the result I'm hoping for.

Ok, I think I see the problem. Are you using a 5 sided cylinder with the corners beveled in edit mode, and then a solidify modifier to give it thickness? If so, then it would result in your pic because the solidify mod is basically extruding the faces outwards. The width of the outside corners would not be controllable like that.
If that's what you are doing, try using a flat pentagon with a pentagon whole in the middle instead (a 5 sided ring). That should result in the geometry I posted

i think that is a pretty good use case for geometry nodes. Hopefully geometry nodes is ok for you...
Ok, my solution works as follows:

i create the shape via curves
i "round" it with fillet curve
i create a grid with 2 vertices on one side, and the amount of points of the curves to the other one
in the node group i connect the vertices from the grid from one curve to next curve
then i just extrude the result to have a mesh
i make the result to instances and scale them (if you don't want a rim, don't scale them afterward)

Note: my GN setup is far from being perfect and optimised. I just made it, so that it works.
Node group:

Main:

result:

animated:


text:
Can you use a render layer output as an image texture input in a shader for a separate render layer?
I want to recreate the grass effect t3ssel8r has in his unity project as shown in this video.
It looks like the best way to do this would be to have billboarded sprites for the grass. And to render the shadows on the ground w/o the grass first. Then sample the result from the ground render to determine the color of each sprite as it's rendered. This way, I can have each sprite be one solid color, while having that color be determined by the shadows. And I can rotate the sprites to face the camera without the color changing. This means I would need the output from rendering the ground to be available in the grass shader.
I've done some research and found Malt, which lets you make a custom render pipeline, but I'd rather not dive into learning python and trying to decipher all that if I don't have to. Which brings me to my question: Is there a way to use the output of a render layer as a texture input in a shader in another render layer?


text:
How to Bisect in Blender?
Can anyone please tell me what he is doing? How did he get that cross margin? (white dotted lines) and how can he select all the vertices of one circular line before bisecting them?

he selected everything with a and then basically did object menu Mesh > Bisect (shortcut Shift+Spacebar+8) and then click on the left side and drag to the right side then press Ctrl while dragging to get a straight line.

Wow. Thank you so much. I can do it after you explained. <3

cool! enjoy using that tool coz it's awesome!

1 In Edit Mode, press A to select everything.
2 Go to object menu Mesh > Bisect ( or Shift+Spacebar+8 ) or long click LMB Knife Tool:

3 Click on the far left side of object and drag to the right side and press  Ctrl  to strighten line.
4 Release LMB to confirm bisection.


text:
How to Lattice deform for multiple objects?
I'm trying to deform multiple objects all together by Lattice(Blender 3.2.0).
They were created by Array Modifier is not applied yet.
However I want to deform them diagonally compressed top like on top picture pink line but they just moved like on middle picture.
Next I tried to apply all object Lattice Deform but after applying rest of 4 has disappeared.
How can I deform array objects all together as a single object?
In case I uploaded blend file here.
https://ufile.io/o05y99se

You need to join all the objects (plane, cube, sphere) with CTRL+J instead of parenting them to the plane. Use ALT+P to unparent the cube and sphere before joining them. Here's the result https://blend-exchange.com/b/9m2zyMqx

Thank you so much for your quick answer! You solved my issue!

You're welcome. I'm glad i was able to help :)


text:
Determining camera orientation from an image/render
I try to recreate certain scenes in blender from renders and images, and I'm having a hard time setting the camera correctly and accurately.
As of now, to set up the camera position of a scene I want to recreate, I place the image/render in the background and manually move the camera until certain elements in the scene are perfectly aligned with the image in the background. (I know the exact location of given elements in the scene) This procedure takes too long and almost impossible sometimes.
Note: I know the correct camera focal length and sensor size, it's only the rotation, location and zoom I need to know.
I'll provide a simple example, for clarification:
I have the following scene:

and I want to reposition the the camera in given scene to match the position and angle as in this image:

I know the the exact location of the base object (and thus, the exact coordinates of each vertex), I also have the XY grid to use as another reference in this case.
I there a way, using a python script/add-on/external software/ect, to do this?
I think theoretically it should be possible using maths, or by iteratively moving the camera to align with the image using a python script, but I don't know how to properly implement it.
I have tried using fSpy and a similar blender add-on, and they get the camera position wrong every time, and when I import the fSpy file into blender, the camera settings are wrong.

Unfortunately, I think fspy is probably the best for it. It's quite finicky, and can take some time and fiddling (and much frustration) to get it right, but I still think it's the best. Make sure you set the axes in fspy to Z-up, -Y forward (I'm pretty sure blender is -Y forward, maybe double check that part).

You would need to know the 35mm equivalent of the focal length of the lens, but if you had it you would the basically duplicate the math fspy uses, once you've give it axis to work with.  A fspy tip that you probably already know:  Hold the shift key down when moving the axis lines to get a magnified view of the image.


text:
Smoothing out the edges of Shrinkwrapped and tilted cylinder
I have a cylinder that I want to wrap around the handle, but the edges have these huge steps to them, is there any way I can smooth them out? I tried subdividing it further, but it didn't help

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

 @moonboots Here is the file containing the objects

Your handle is not high-poly enough, if you subdivide it with a Subdivision Surface modifier you'll have a better result:

This has done the trick exactly, thank you for your help. I have a an extra question, if you don't mind. How did you make it so the edges of the handle, don't look like this (this is after applying Subdivision modifier with all the numbers exactly like yours)? I used SHIFT+E to sharpen the edges (link), and it looked good, but not quite like yours, so I was just curious as to what you did there.

I've beveled the edge (Ctrl B and choose the number of segments in the Operator Box)


text:
Cannot create mesh due to AttributeError: 'bpy_prop_collection' object has no attribute 'new'
The following error keeps showing up in my script:
AttributeError: 'bpy_prop_collection' object has no attribute 'new'

How do I fix this?
import bpy

# Set the size of the brick
brick_width = 0.5
brick_height = 0.25
brick_depth = 0.2

# Create a new mesh and object
mesh = bpy.data.meshes.new("Brick")
obj = bpy.data.objects.new("Brick", mesh)

# Set the location and dimensions of the object
obj.location = (0, 0, 0)
obj.dimensions = (brick_width, brick_height, brick_depth)

# Add vertices to the mesh
v1 = mesh.vertices.new((0, 0, 0))
v2 = mesh.vertices.new((brick_width, 0, 0))
v3 = mesh.vertices.new((brick_width, brick_depth, 0))
v4 = mesh.vertices.new((0, brick_depth, 0))
v5 = mesh.vertices.new((0, 0, brick_height))
v6 = mesh.vertices.new((brick_width, 0, brick_height))
v7 = mesh.vertices.new((brick_width, brick_depth, brick_height))
v8 = mesh.vertices.new((0, brick_depth, brick_height))

# Create edges and faces for the brick
mesh.edges.new((v1, v2))
mesh.edges.new((v2, v3))
mesh.edges.new((v3, v4))
mesh.edges.new((v4, v1))
mesh.edges.new((v1, v5))
mesh.edges.new((v2, v6))
mesh.edges.new((v3, v7))
mesh.edges.new((v4, v8))
mesh.edges.new((v5, v6))
mesh.edges.new((v6, v7))
mesh.edges.new((v7, v8))
mesh.edges.new((v8, v5))
mesh.faces.new((v1, v2, v3, v4))
mesh.faces.new((v5, v6, v7, v8))
mesh.faces.new((v1, v4, v8, v5))
mesh.faces.new((v2, v6, v7, v3))
mesh.faces.new((v4, v3, v7, v8))
mesh.faces.new((v1, v5, v6, v2))

# Create a new material
mat = bpy.data.materials.new("BrickMaterial")
mat.diffuse_color = (0.8, 0.4, 0.2, 1.0)

# Assign the material to the object
obj.data.materials.append(mat)

# Add the object to the scene
scene = bpy.context.scene
scene.collection.objects.link(obj)
```

Hello ! If you don't mind me asking, was this generated by an AI assisted tool ? If so, would you mind sharing the prompt you used to generate this ?

As you have noticed, when you run your script, it errors out with AttributeError: 'bpy_prop_collection' object has no attribute 'new'  and positions the cursor at the end of line v1 = mesh.vertices.new((0, 0, 0)).

So apparently there is no method or property with the name new on mesh.vertices. You can rewrite your script like this but take note the generated brick is very small so you will either need to increase the brick_width etc dimensions or zoom in with Numpad . (dot) after you have generated your object.
import bpy

# Set the size of the brick
brick_width = 0.5
brick_height = 0.25
brick_depth = 0.2

# Create a new mesh and object
mesh = bpy.data.meshes.new("Brick")
obj = bpy.data.objects.new("Brick", mesh)

# Set the location and dimensions of the object
obj.location = (0, 0, 0)
obj.dimensions = (brick_width, brick_height, brick_depth)

# Add vertices to the mesh
v1 = (0, 0, 0)
v2 = (brick_width, 0, 0)
v3 = (brick_width, brick_depth, 0)
v4 = (0, brick_depth, 0)
v5 = (0, 0, brick_height)
v6 = (brick_width, 0, brick_height)
v7 = (brick_width, brick_depth, brick_height)
v8 = (0, brick_depth, brick_height)

verts = (v1, v2, v3, v4, v5, v6, v7, v8)

faces = ((1, 5, 4, 0),
         (6, 5, 1, 2),
         (0, 3, 2, 1),
         (6, 2, 3, 7),
         (4, 7, 3, 0),
         (5, 6, 7, 4))

mesh.from_pydata(verts, [], faces)

# Create a new material
mat = bpy.data.materials.new("BrickMaterial")
mat.diffuse_color = (0.8, 0.4, 0.2, 1.0)

# Assign the material to the object
obj.data.materials.append(mat)

# Add the object to the scene
scene = bpy.context.scene
scene.collection.objects.link(obj)