text:
Creating cylinders with square-ish topology
I was watching a timelapse of a character being made in Blender. At the 1:00 minute mark, the artist creates cylinders for the character's arms and I notice the topology is very square-ish and even. Here is a photo of what the topology looks like:

How do I get that kind of topology? When I create cylinders, the topology I get are long rectangles, not ideal for sculpting at all.
The youtube video I watched can be found here:
https://www.youtube.com/watch?v=SNHBFtdGWhg&t=466s&ab_channel=DannyMac3D

As Moonboots said, they are probably using Blender's built-in 'Voxel Remesher'. Alternatively you can use the Quad Remesher (either the built-in one, or a third party paid plugin with same name)
Remember however, before trying either, you should apply scale while being in modelling viewport (not sculpt viewport). Without that, most of the time you will end up having non-ideal number of quads (too dense or too thin) & and in some cases even hang your PC for a while (End Task on Blender.exe in Windows Task Manager to get out of the hang)
The way to apply scale is in modelling viewport, select the object in object mode, and press CTRL+A, and then select the Scale option in the pop-up menu.
After that either remesh in Modelling viewport or while Sculpting, either is fine.
In modelling viewport, the method is Data icon (green reverse triangle) in lower right, then remesh menu. Remember to go with default value of 0.1 which give you less geometry and won't hang your blender first, before trying lower values.
Then hit the Voxel Remesh button.
In Sculpting mode, the method is to press R first to decide visually the size of your quads. Move your mouse to reduce or increase the size. Once you are happy, Left Click to confirm. Don't worry, blender remembers what you chose. You can then safely do CTRL+R
In practice, people usually Remesh once before sculpting while in modelling viewport, then remesh again as needed during sculpting.

He probably remeshes it in Sculpt mode with a CtrlR. If you want to set the size of the remesh faces, press R before the CtrlR.


text:
UV editor distorted when applying texture to custom mesh
I tried applying a texture to a custom mesh:

However, the texture looks like this in the UV editor:

And when I go into edit mode with the object selected, all the 'shapes' in the UV editor are distorted.

What can I do to 'undistort' my texture to make it uniform?

Hello, so maybe unwrap your mesh again? For example with the Smart UV Project option, or cut some seams and simply choose Unwrap

Unwrap again, use the Smart UV Project option, which will cut the mesh along the desired angle (keep the default settings, it should work fine), then in the UV Editor move, rotate and scale the UVs as you want.

source: Stack Exchange

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

sort: votes


text:
How to change base color of a Principled BSDF Material?
I'm trying to use the blender python API to change the base color of multiple materials from an object. I'm pretty new to the bpy and the documentation is likely poor.
This is my selected object, and the colors i'm trying to change:

And the code am trying to use but with no effect:
bpy.data.materials["chasis"].diffuse_color = (0, 0, 0)

This is the error message i got:
>>> bpy.data.materials["chasis"].diffuse_color = (0, 0, 0)
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ValueError: bpy_struct: item.attr = val: sequences of dimension 0 should contain 4 items, not 3

Any help would be much appreciated!

The diffuse_color is used for viewport display in solid mode. It's this:

To change the Base Color, you need to access the right node in the node tree. The simplest case is
mat = bpy.data.materials["chasis"]
principled = mat.node_tree.nodes["Principled BSDF"]
principled.inputs["Base Color"].default_value = (r, g, b, a)

It would be more complicated if you have a more complicated node setup.
And as already said, the color is a 4-tuple, so you need to set an alpha value (even though the alpha is never used).

I recommend you turn on Python Tooltips in the Preferences. You can hover over things and find out how to access them in Python.

"should contain 4 items, not 3"
bpy.data.materials["chasis"].diffuse_color = (0, 0, 0, 1)
4th item would be Alpha in this case. Above line would be Black with opacity of 1.
This, however, would be setting the Viewport Colour. To set the node base colour. Use this :
bpy.data.materials["chasis"].node_tree.nodes["Principled BSDF"].inputs[0].default_value = (0, 0, 0, 1)

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


text:
Shading nodes disappeared in Blender
So i was following Blender Guru's Donut Tutorial and in Part 3, Level 2, when he opens the shading node editor, his node are there but when i open my shading editor, there are no nodes even if i have the preview. I also have the use nodes on in Composting

From the image, it looks like you have a camera selected as a first object (yellow)and the mesh as secondary objects (orange). Cameras can't have shaders, you just need to deselect the camera.

In the picture there you can see the camera is actually first object (the object it shows nodes for), for it is outlined yellow, and the donut mesh is  the secondary object, you can see it is orange. You may have accidentally selected the camera and only group selected the donut, like I tend to do often with my projects. Just try zooming in a little closer and selecting the donut again, and you should be able to see the donut's nodes.


text:
About getting vertex positions between two models by geometry node
I want to do the following.
I want to acquire the vertex position information of two models A and B with the same structure at the geometry node, blend them, and then reflect the result in the model.
In addition to that, if possible, I want to control the mixing ratio of the vertex positions of A and B with the vertex weight value.
Is it feasible?

what do you mean with "blend them"?

I'm a beginner so I'm not sure if the blend is the correct expression. To be precise, it may be more correct to reflect the difference in the vertex positions of the model.
In the following figure, the vertices are located at 50% of the vertices of the B model with respect to the A model.

That is, 0% is the position of the apex of A, 50% is the position of the red line, and 100% is the position of the apex of B (probably acting like a shape key).

For a single frame, you can change it using the shape keys. But my ultimate goal is to automatically mix the animations for all frames at any ratio of two Allenbic file animations with the same mesh structure model but different animations.

I'm not sure if it can be reproduced with a geometry node. Either method is fine. Do you have any hints on how to reproduce it?

hi,chris  thank you for your answer. Unfortunately, I would like to give up this time.

To achieve this goal, you would only need to get the positions of the two objects with Transfer Attribute and calculate a direction vector from it.
If you then scale this vector with a value between $0$ and $1$, you can create the position between the two objects and apply it to the geometry with Set Position.

Note: the two objects would have to have the same number of points in this case, of course, because here the positions are queried via the index of the points.

Hell0,quellenform  That's the perfect answer I wanted.
Thank you from the bottom of my heart！

quellenform, I'm trying to expand on this awesome answer of yours by adding all the features of regular Shape Keys. But I got stuck with curve objects... the handles aren't deforming correctly. I just asked a question about it, in case you're curious to check it out. :-)

@Mentalist ...I have looked at your question and written an answer. I hope I have succeeded to some extent: https://blender.stackexchange.com/a/273155/145249


text:
Union operation in edit mode
I'm trying to quickly perform union operations in edit mode.  Not using modifiers.  The manual for 2.93 refers to Intersect/Union/Difference capabilities within the Face -> Intersect (Boolean) menu, but but I don't see any way to configure the operation to use union.  How do I change the operation to union from intersect?

Press F9 after invoking the operation, or expand menu at bottom left corner:


text:
Acceptable file formats to import for uv mapping and displacement
Is it possible to import an .obj file, map a .jpg photo to one of the surfaces and displace it only on that surface.  If not an obj file would any other work?
New at this.
Thanks in advance

Sure you can .. (this is a monkey I found, and imported as an .obj file).. there are a couple of things you might want to do.

Maybe remap the region you're interested in displacing, to a new UV of your own
Maybe make a vertex-group from that area, to isolate the displacement to it

Here, a Displace modifier is used, sourcing the UV Map, and aimed at the vertex-group. The subdivision is bumped up for rendering in this example.. these options would all depend on your case:

With this sort of result:

A .jpg may not be the best choice of image-format, since it will contain compression artefacts, and won't be in the right color-space to map a displacement linearly.
Again, that may or may not matter in your case.

Switching Cycles to experimental and enabling adaptive subdivision in the subdiv modifier is a great way to reduce 'stairs'

Ahh.. I didn't think of that  for displacement in geometry.. of course... :) I suspect this may be for printing anyway.. so that's moot.

Thanks.  I will work on making an new vertex group.  What photo formats would you recommend.  Essentially I have a 1 foot square surface with a 1/2 inch raised border I made in Freecad.  I want to place a photo within the frame and raise the texture a bit for cnc machining.

Hi, @Rworks .. it kind of depends where the image comes from.. you would want to wind up with a relatively high bit-depth, or float. linear image. If you're rendering your image from Blender, then EXR half-float, lossless, would be a way to go that is definitely linear..you won't get tangled up in color-space conversions.. but I don't know where your image comes from.

Image came from photo loaded into "texture from image".

@Rworks .. hehe.. I mean the origin of the photo .. is it already a .jpg?

Sorry, yes.  Your a bit ahead of me but I am trying to learn more about "groups" and mapping in the meantime.

Thanks for your patience.

@Rworks np.. we're here to help, if we can. To avoid extended commentary, I'm going to move this exchange to our not-so-great chat system. ...  '@' a name to raise a notification.

Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on [meta], or in [chat]. Comments continuing discussion may be removed.


text:
Export texture plane displacement for cam process
I have been able to apply a image (photo) as texture to a plane and displace the image creating a 3D image displacement of the plane.  Visible in render only.
I simply want to export as some type of solid that I can import into a cam software and generate a g code.
When I export it as several different formats I either get an empty plane or nothing at all.
Is there some conversion that must take place first and if so how do I do it.  Thanks for any help in advance.

As you said, the displacement you created is visible in render only - this is because there is no geometry really being displaced - to get the displacement in other software, you have to make the displacement with a Displacement modifier (which requires the mesh to have a high resolution and then apply the modifier so that the displacement is truly executed on the vertices and is no longer only existent through the modifier.

Your correct.  To my amazement, After all the work in shader, maping, unwrapping and using nodes, I went into the 3D object mode and the tools on the right and added subdivision and displacement and there it was.  Right in the material view, my 3D displacement.  I  guess what I don't understand is the difference between adding displacement in the shader side as apposed to adding it in the 3D materials side.  I am guessing there is a separation in the functions.  Any explanation would help.  Thanks a lot for your help

Shader opposed to materials? You create materials in the shader editor... Anyway, with the Feature Set > Experimental for Cycles and Adaptive Subdivision, you can get a highly detailed displacement with just four vertices. The Displacement modifier always needs high polycounts to show displacement. Apart from that, no matter if using the shader or modifier method, they are all procedural and you can change them. As soon as you apply the modifier, the mesh cannot be altered easily anymore. But in other software the modifiers don't work, so for export you need to "destroy" the mesh.


text:
Black Lines on top and bottom in Eevee render engine
I recently have tried to render an animation but every time I render there are black lines on the top and bottom that might be coming from the camera, I'm not sure. Please help

hello, it's hard to guess, maybe an object that is hidden in preview in the Outliner?

I don't think there are any objects that are hidden

Do you want the whole file?

just leave some objects, make sure that the problems is still here, and share

Ok, I'll do that and let you know

It might take a while though

@iwantasandwichyt It might be helpful to people trying to help you if you uploaded an example blend file to the site https://blend-exchange.com and add that link in the question.

https://blend-exchange.com/b/wG0JJ7XQ

here is the file i am using. while you are at it, could you find out why my render has really bad quality and losing color? Thanks.

the two black lines are appearing because you add them via compositing here via alpha over:

and for better render quality:
maybe wanna change to cycles engine, add an hdri for lighting, then i changed render settings to this:

I checked denoise and set noise threshold to 0.1
result:

How do I get rid of the black lines then, is the compositing supposed to be in the animation?


text:
I want the window to spin around the object, and it shows me points, edges and faces
This is a question regarding blender 3.5.1. I did not notice that there is a saving of key customization types, and messed up the first one. Tell me where to look for the key setting, I want my window to rotate around the object when I press the right mouse button. That is, these edges, points and faces to stand out Shift->right mouse click. And this is what it gives me

Go into key-binding in preferences and search up middle mouse, change the keying from middle mouse to right mouse button. Then, switch to Name and then  search up object context menu and then change it to whatever works for you, or else the right mouse rotate will not work. Hope this helps.
Answer number 2 : if you set shift right mouse button then you have to change your object context menu keybind to another button or else it will override the other keybind instead.

Alas, I'm still looking at the same picture. And renaming from mouse to keyboard does nothing. Still the window opens not by the specified keys, but by the mouse.

Did it. Only instead of the right mouse button, my rotation occurs due to the middle one, and the movement is through the shift of the middle mouse button.

authors: Владимир Корсун


text:
How to create circular bevel?
I would like to use a non-destructive method to bevel two edges to follow a circular profile, like so:

I tried to apply a bevel modifier, but I'm even more confused because setting the red edge to a 1.0 bevel weight affected the other bevel. Does Blender limit the bevel amount to the lowest applicable value?

Here is the blend file:

Thanks.

it doesn't seem possible so instead maybe use a cylinder as boolean to dig your shape

The interaction between the bevels is probably due  to Clamp Overlap

@RobinBetts thank you, disabling "clamp overlap" does not modify the first bevel anymore

but does it give the desired result?

@moonboots no, it gives more an appearance of an ellipse used as boolean instead of a cylinder


text:
How to calculate the rendered Blender freestyle stroke coordinates
Is there any way we can access the coordinates of the rendered stroke as we can access for e.g Cube mesh.
Since we can see if we enable blender freestyle rendering, it does the stroke rendering based on the option selected Edge Type: Silhouette, Border. Can someone please help me out how can we access those coordinates. Its look like blender does calculate those points before the stroke rendering. Please guide me on this. I have followed the link:
Mesh silhouette as a polygon or pixels surrounded by the silhouette on the rendered image?
still I am not getting the coordinates on the console as mention in the link.
I have attached the stroke rendered image of cube, I need the coordinates of black stroke creating the silhouette shape.
Please guide me if I missed something.

Since it's a post processing effect I don't know if it's possible. Maybe you ought to explore the new Line Art modifier which pretty much does the same thing ?

@Gorgious, Thanks for the update, I am still learning. will update here in case I find something..

@Gorgious, here are some references, link, link

Ooh nice didn't know you could access this data from python


text:
line art or freestyle border pass 2d fill object what can i do to stop this
strong text
line art or freestyle border pass 2d fill object what can i do to stop this

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.

i tried to combine 2d and 3d animation but when i tried to do so the line art of 3d object goes over my 2d greace pencil object what can i do to stop this


text:
Does anyone know the best way to change shadow colors?
I have used the shader nodes to almost get what I want, however I am running into many difficulties. I am making isometric 2D sprite art to a mod an existing game so I need to work within the confines of the game engine. I need my main shadow cast from the object to be red, and the transparent areas to be green. I tried setting up a green plane to act as the transparency background and as a shadow catcher however the red shadow is becoming yellow. Also I need some shadows on the 3d model to act act like normal black or greyish shadows so it has a 3D rendered look still. I am so confused which way to go from here. I have spent hours reading tutorials and watching videos. I have come close to what I want but perhaps somebody can think of a better way. Maybe I need two light sources, one for regular shading and one for the main shadow. To reiterate the main shadow needs to be red. Like I said I have gotten close in nodes but the red does not interact with the green plane well. Maybe I need to make two planes as well? One a simple shadow catcher and another that is green? My problem is that having the green one that doesn't interact with shadows or reflect back green placed under the shadow catcher makes it invisible. Do I need to make the shadow catcher transparent or able to pass shadows/light?
I know I am making this more difficult than it has to be, perhaps there is a way to render images onto a green canvas instead of having the green background actually in frame. Since it is hundreds of frames I rather not crop out and paste by hand onto a green layer in GIMP or something like that. I'm not ready to give up, five years ago I was able to do it but now I am lost.
Also I need the main red shadow to be hard as opposed to soft. Another issue I have is the light source still turns my shadow almost white in the center, I need it be solid red. I have included a mock up of what I would love to achieve if anyone can please help me.
I really appreciate any and all ideas and am open minded to changing my approach.

One question to clarify: do you need a green plane in the background (apart from shadow catching) or would an image with a transparent background placed over a green background be sufficient?

That might work, now that I think of it when I had this setup functioning I believe the plane was an image inserted as a plane. Where the image was solid green. I forgot about that, do you think it would work easier that way? How would the transparent background get placed over a green background? Would it be in composting or something?

Yes, in compositing. You use the Alpha Over node, set green as the first color and input the image with the transparent background in the second input. But that still doesn't get you a red shadow.

Yeah I've been at it all night no luck. Daz lets me change the environment background to green no problem. But blender is so much more robust if I can figure out how to get red shadows.


text:
Can't make different size rings with the same volume thckness
I´m trying to make many copies of circles and then give them the same volume thickness. But even if I put the same depth for the bevel, they all end up having different thickness. I made them with a bezier circle and then duplicating. How can I solve this?

https://blender.stackexchange.com/a/86903/19307 https://blender.stackexchange.com/a/58567/19307

Obviously you have not only duplicated the curves, but also scaled them in Object Mode. First of all, this would not happen if you scaled them in Edit Mode. But now after you did it, what you can do is apply the scale with Ctrl+A > Apply > Scale. But in the Apply Object Transorm options at the bottom left of the viewport you have to leave Scale enabled but to disable Apply Properties, otherwise the thickness will not be reset, because then the scale will be transferred to the Mean Radius of the control points. See Duarte's links for more explanations on that.


text:
The colors are stying same with the from duplicated object
I have a Hand duplicated and I want to change the color of it but when I do it the object that I duplicated it from changes also and it´s pretty annoying help.

This shows one cube with a material on it and a duplicated one beside it. If you look on the Material tab, you'll see that the same material is used by both cubes. (The 2 beside the Material name.)

Click on the 2 to make the material single user and you'll see that the name changes to Material.001 and you'll be able to change the colour without affecting the original cube which still has the originalMaterial name.

To add to John's answer, if your objects are link-duplicated (they share the same mesh) you need to go into the Material panel and click on Object to separate their material:


text:
Would it be possible to display a web-browsers view within Blender
I created a simple WebGPU renderer, for visualizing GLTF files inside a browser.
For a more responsive experience, I synchronized Blenders viewport camera with the browser using simple TCP communication, essentially resulting in Blenders viewport being rendered with my custom render-engine inside an external browser window.
However it would be much more accessible, if the browsers view was displayed directly inside of the Blender viewport.
My first approach was using the Selenium python package, saving a screenshot of a page and than reading the pixels into a Blender Image:
import bpy
from selenium import webdriver

# Set up the web browser
options = webdriver.ChromeOptions()
options.add_argument('--headless')  # Run the browser in headless mode
driver = webdriver.Chrome(options=options)

# Create an empty texture
texture_name = "Webpage Texture"
texture = bpy.data.textures.new(texture_name, type='IMAGE')
texture.use_alpha = True

# Create a material and assign the texture
material_name = "Webpage Material"
material = bpy.data.materials.new(material_name)
material.use_nodes = True
node_tree = material.node_tree
nodes = node_tree.nodes
output_node = nodes.get("Material Output")
texture_node = nodes.new("ShaderNodeTexImage")
texture_node.texture = texture

# Connect the nodes
node_tree.links.new(texture_node.outputs[0], output_node.inputs[0])

# Assign the material to an object
object_name = "Cube"
object = bpy.data.objects.get(object_name)
if object is not None:
    object.data.materials.clear()
    object.data.materials.append(material)

# Render the scene
bpy.ops.render.render(write_still=True)

# Function to update the webpage texture
def update_webpage_texture():
    # Navigate to the webpage
    driver.get("localhost:some adress my page is hosted on")

    # Capture a screenshot of the webpage
    screenshot_path = "screenshot.png"
    driver.save_screenshot(screenshot_path)

    # Update the texture image
    texture.image = bpy.data.images.load(screenshot_path)
    texture.image.reload()

# Update the webpage texture
update_webpage_texture()

# Set up an update handler
def frame_change_handler(scene):
    # Update the webpage texture
    update_webpage_texture()

# Add the update handler to the frame change event
bpy.app.handlers.frame_change_pre.append(frame_change_handler)

,whilst theoretically working (positioning the image on some screen-filling plane) this approach is very inefficient, resulting in Blender running at about half a frame per second.
I am now asking, if there is a better approach, like using the webviews framebuffer directly (however that would be possible) by sharing gpu-memory between Blender and my running Browser instance.
Any ideas on tackling this problem? Or is this just a stupid idea, the Blender scripting API isn't meant for?

I guess it's IO that's taking very long, saving the png then reading it back. Maybe you can write directly to a bpy.types.Image pixels ?

@Gorgious Your idea should certainly yield a speedup. However I even tried just changing one of pixels of the image (img.pixels[0:4] = [1.0, 1.0, 0.0, 1.0]), in blenders frame_change_pre handler and already saw massive framedrops, since the whole texture got read from the gpu to the cpu and back.

yeah you want to use foreach_set


text:
Can you comb hair particles after they have been baked?
I am having great difficulty understanding the later stages of workflow when it comes to the hair particle system.
Create a scalp mesh
Create a particle emitter type hair
I enable collisions on the emitter mesh, body etc... kiss good bye my shape keys :(
I was having problems with my model looking like smeagol from lord of the rings as the hair would clip the scalp even with the collision modifier enabled.
I have somewhat solved this by running the simulation and letting the hair not only fall into place but pop out of the scalp.
Now my problem is this:
Can I comb the particle hair system after I bake it?
I read somewhere I can but right now when I got to particle edit the hair is gone.
My issue is the hair looks decent but is in front of my 3d models face. If I convert to a mesh then it loses the children and overall aesthetic... but at least I can move the hair out of the face. There has got to be a better way.
Also, some of the top hairs look like tubes, if I make less children my model looks bald. I feel I am so close but am missing something.
I enclosed a picture of my character being rendered but the hair is all in her face. It took me an hour to simulate 1000 frames and baked just to get the hair to stop moving.
Any advice is appreciated, like what settings you use for damping collision etc. But also work flow... now that I get the hair the way I want it does it need to simulate every time I need to animate? Should I make another collision object just to "brush" the hair out the way.
Super frustrating all the tutorials cover mostly things I already know.

AFAIK there is a bug that prevents that you can edit the particles (emitter & hair) after you baked/simulated them. Have a look at this question: https://blender.stackexchange.com/questions/191147/cant-edit-cached-particles. If the hair looks like tubes you need to adjust the Hair Shape > Diameter Root + Tip settings. Also set in Eevee render settings Hair > Hair Shape Type to Strip to see the thickness of the hair in the viewport.

Thankyou so much it is good to know I am not going crazy! It kind of sucks but I guess I will try this work around thanks again!

The particle system is quite old and is going to be updated (node-based). The devs already started to improve it but then changed focus to the geometry nodes. So we need to be patient and hope the old bugs will be fixed in one of the next major versions of Blender.

About the workflow, it depends on how much realism you want & on how much movement there is (head shaking? upside-up? wind?). If your character just talks, eats & walks you need to simulate only a strand or two and/or the tips of the hair & keep all other hair particles stiff. The stiffness can be controlled by the weights (Particle Edit mode>Weight brush) & the Pin Goal Strength which affects all particles depending on their weights. If she does gymnastics or is outside where it's windy you want to make the hair fly. IIRC, edited hair also tries to keep its shape when it is simulated.


text:
Positioning of a 3D camera model in Blender to match the view of a camera object
Say I have a IMX477 Mini High Quality Camera Module as a 3D model and want to place it at the exact same position I have my camera object in blender, with the same focal length and sensor size, to get the same view. Does the center of the sensor of the 3D model has to be at the position of the camera object?

yes it does need to be there.

Why would you have it in another place? Can you tell a littele bit more?

I positioned 4 cameras in blender in such a way that I can stitch the resulting views of a certain area. So slight offsets would probalby ruin the stitch. Besides that I was wonder if the angle of view (focal length) starts at the sensor or the lens since lenses with same focal length might have different physical dimensions (not sure if true).


text:
Weird purple color in render using render farm (but not on my local computer)
I'm really new to blender and 3D overall. I've been using Conciergerender to render out my project, since I'm on a quite weak laptop.
In my render, I'm using a hdri for lighting an a background image using "import image as plane". My local render has the colors & light that I want, but the render using the render farm is all purple? And the lighting is way darker than my local render.
The only difference in settings are the amount of samples for the renders.
I read somewhere that purple is the default color for objects without texture, but the background image seems to be included correctly.
I just can't seem to find any information on why this happens and would need some help.
Thanks in advance <3

That usually happens when you don't pack all of the images into your blend file before you send it to the render farm, or the render farm can't deal with the packed images in some way.

@MartyFouts Thanks for the super quick reply! Oh yeah, I had totally forgot the step of File -> External Data -> Pack all into .blend. It works great now. Thanks again! :)


text:
How to unparent a mesh within a mesh?
I want to unparent the hair that is attached to my body mesh. I want to make the hair its own separate mesh, but i'm not sure how to unparent it and to make it a separate mesh. I try to do the alt+p and it just unparents the whole mesh instead of just the hair.

You're confusing several things in my opinion: mesh, object, parents...
An object can be made of several meshes. If you want to make 2 meshes from one, select an edge of your mesh and rip (V key). If you want to separate a mesh and make it a new object, then press P (Separate).
Parent is a completely different thing, you can parent an object to another one, you can't parent a mesh to another mesh or to an object, a mesh is just part of an object or of another one.


text:
No vertices, edges or faces displayed
I am new to blender and I have been trying to follow along to Blender Guru's How to make a teddy bear video but when I got to the part where I need to make seams, I don't have that same pathway choice as him. I can't see any of the faces, vertices or edges. My theme is also getting in the way as whenever I click on a toolbar option, the options seem to other lap. Does anyone know how I can fix this?

Hello :). Judging from the slightly broken UI, I'd say it's a hardware issue. What's your GPU?

Yes, that was exactly the problem, I didn't have any GPU on my laptop so i swapped to another one, which does ! This one has Intel (R) Iris (TM) , thank you so much for your help! :)


text:
Render turns out grey toned
I am beginner and I am trying to animate this scene with some stainless steel cutlery and some blue-ish marble top counter. The view port looks good but when I go to render it the scene looks grey toned and not at all the colours that I wanted. Can someone please help
Here is the
file

Perhaps you need to add a light…

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.

In the Viewport Shading popover, we can see you disabled the scene world:

So what you saw in your viewport was just the viewport's preview world, the same as in the Material Preview Shading, which is meant for quick shader preview with some quick and easy lighting and reflections.
The scene's world is the only one used when rendering. Any option you set in the viewport popovers affect only the viewport and are meant to be used only for preview purposes.
If you enable the scene world again, you can see your actual render. And that your scene is overall very darkly lit. You could use more or stronger light objects, as well as pump up your scene's world shader.
If you really want to render your viewport as is, switch back to Material Preview, disable the overlays, and use the menu View > Render Image (...):


text:
How to mark edges on flat plane after shade smooth/auto smooth?
I'm creating a barrel for a game. I was able to mark the seems on the side as sharp (Since there is an angle associated with it) giving the illusion of planks without adding additional vertices. I was hoping to do something similar to the edges on the top to also give the illusion of planks. Mark sharp doesn't do anything, and I haven't found a way to show the edges without adding additional vertices.

There is no way around this geometry wise, however you might use a custom normal map via image texture. That is perfect for this type of situation, and is often used in game assets for that reason.

Thanks for the response! That's unfortunate to hear. I'm using a palette to color these, so I'm not really looking to add any image textures. I'll just go with the additional vertices. Thanks!


text:
Why don't my objects reflect in the base plane?
I'm clearly missing something basic, and no doubt terribly simple. I've seen videos and tutorials on constructing reflective objects, and kind of even understand them (and I'm at least sure I'm exactly duplicating their material settings).
So, I made a large plane mesh, and gave it reflective material settings. Then I built three objects that I placed just over it (red blue and green). The objects are visible, they cast shadows, etc. But the plane does not reflect the objects.
What am I doing wrong? (Also, apologies if there are random strange characters; they echo right but when I go to the next line sometimes a few characters in the previous line change to random things! Gotta reboot I guess, even on Linux.)
This screen capture shows the material the base plane is made of, and the three objects, and the lack of reflections. That orange line is the edge of the base plane, selected, so the material shown is really the material of the base plane.

I was hoping to upload the whole project (it being trivial and hence small), but that doesn't seem to be an option. Blender version is 2.82.7, running on Ubuntu 20.04.1 LTS.

Hello :). Reflections in Eevee are disabled by default. You need to enable Screen space reflections in the RenderTab.

All the online help I found showed me how to use this constructed material, none of it showed how to make gloss with the "principled BSDF". I tried that first without help and failed utterly (but the failure may actually be the same failure I have here -- presumably what people said, I'll investigate that next). It's good that Blender is advancing fast -- but not so good that searching by date and with numbers doesn't work very well :-)

Thanks to all! Yes, the problem was (as I thought) something utterly basic, namely that reflections are off by default.
Anybody taking a vote anywhere for changing that? I suspect it may be a performance issue -- but it's not too relevant for trivial beginner projects, whereas a hugely important aspect of realism being off by default IS.  Wasted days on this.  Advanced users with complicated projects can learn to ramp down realism for interactive performance when they need it (when they run out of money for hardware :-) ).

in Eevee, for proper reflections you also need to use light probes as I've explained here: https://blender.stackexchange.com/questions/190642/how-do-i-get-proper-reflections-eevee/190650#190650

Check the Ray Visibility settings for each of your block objects.  If glossy is unchecked, you won't see the object in reflections.

Hello :). I believe the OP is using Eevee so he wouldn't have these options.

doh.wav  Hello Jachym, looking closely at the shadows I think you're right.  So then is this an eevee default that should be changed?

You can tell the difference by the Pause Viewport button missing :). Still, nice answer.

I guess I can't really upvote this since it doesn't solve my problem, but it's still useful to me to know this; who knows I may even remember it in the future sometime if I'm using Cycles. Thank you!


text:
How to merge object animations into one..?
I have 6 wheels, each animated; I need to have all animations with just one name ('_AnimWheel'...) for the complete animation to be recognised by the destination train software for this model. How may I combine all of these animations (and more to come later, for the loco valve gear...) into just one animation, please..? Here's a screenshot of the current state of the model...

Thanks in advance; meanwhile... have a great day.


text:
Is it possible to export sky texture with gltf exporter?
I’m using a sky texture node to light my scene for export to gltf, is it possible to export the sky texture light as part of the gltf?

Not as part of the glTF model itself, no.  There have been a few proposals for IBL and environment storage in glTF (one recent proposal is in PR #1956), but none of these are ratified by Khronos or included with the Blender glTF exporter as of yet.
In general many applications find it more convenient to keep the model separate from the environment, for various reasons:

Models can be interchanged among many environments.
When multiple models appear in the same environment, users don't want the size cost of including the same environment in multiple files.
Different applications use different means of storing environments (HDR, EXR, KTX2, and various forms of prefiltering and mipmapping with convolutions), so one storage mechanism may not fit all rendering engines.

So for these reasons, it seems best to keep the environment texture out of the glTF file.  Even so, several glTF viewers include the ability to load custom IBLs and environments from separate files.

UPDATE
Based on the comment below, we know the target rendering environment is ThreeJS, so I'll add a little extra detail here.  You can use Image-based Lighting (IBL) by loading an HDR file, with code like this:
var envPath = 'path/to/whatever.hdr';

var pmremGenerator = new THREE.PMREMGenerator( renderer );
pmremGenerator.compileEquirectangularShader();

new THREE.RGBELoader()
    .setDataType(THREE.UnsignedByteType)
    .load(envPath, (texture) => {
        envMap = pmremGenerator.fromEquirectangular(texture).texture;
        pmremGenerator.dispose();
        scene.environment = envMap;
        scene.background = envMap;
    });

(Above code based on this sample, licensed Apache 2.0).
Using a full lighting environment like this can help make PBR details look a lot more realistic on a model, particularly one that features metallic surfaces and other PBR effects.  You can get high-quality HDR files to use from PolyHaven and other online sources.  Of course, you can preview and render with these same environments in Blender as well.

Thanks for the thorough explanation emakey. The end goal for my current project is in a web page through threejs. I’ve tried using lights with shadows in three but the shadows are faceted so was hoping for an easier approach at the blender end. I’ve also tried baking the textures with lighting but this returns a very flat discoloured appearance. Without shadows everything looks as expected and I’m guessing I’ll just have to figure out how to work the dirlightshadows better in three. Thanks again and back to the drawing board I go

I added some details on using Image-Based Lighting in ThreeJS.

Yes thanks, I have used the HDR loader in threejs but not sure I can cast shadows from there? When I add a directional light with dirlightshadows enabled the shadows are faceted and display as small triangles. I have also tried reducing the shadow camera frustrum to improve quality but this is very tricky and returning little joy. I feel this is an area I need to work in to enable an accurate lighting environment and eventually would like to be able the hours of the day in specific locations

In general I don't think IBLs cast shadows in most real-time systems, but you can try asking the ThreeJS experts on StackOverflow.

I add a sphere around my whole environment, then set a HDR texture on the sphere, also I add emission to the texture, it works like HDRI and you can export your whole environment in glb file.


text:
Can't move vertices in Edit or Sculpt Mode
When I am in Edit (or Sculpt Mode) and try to transform a selection (g,r or s) nothing happens.  However, I can seen in the header that values are changing. None of my channels are locked.

Hello could you please show a screenshot or even share your object? https://blend-exchange.com/

it's too large to upload.  here is a link for the blend file.  https://drive.google.com/file/d/1fMmUN0wGz18ic2jOqiEt-3SSg332gCJt/view?usp=sharing

btw, if you download the file, it's the main body of the character that has the problem

Disable the shapekey's Shape Key Edit Mode option (don't know how it works though):

Thank you!  You answered that fast.  King!

In Sculpt mode you need to put the Value at 1, if it still doesn't work please share your file again


text:
How do I jump to location of the Header in the Timeline?
When my timeline is expanded and I play an animation for a little while then the header goes off to the right and I don't see it anymore.  Is there a hot key to jump to the location of the header?

Press numpad 0.....................

Me wearing the motion cap for the hand animation above:

I love that finger. We have a Michelangelo in the making! :D

Thanks, yes, good point, this was my inspiration!

is the hand rigged? :D

@Chris We are working on it, motion capture and everything, please stay tuned!!

Leonardo di Caprio is ok to play the hand

can i have a picture of you wearing the full body mocap suit?

sure, here we go


text:
Is there anyway to arrange objects order?
Suppose I want to bring an object to the front, similar to bringing a layer to the front in Photoshop. What should I do?

If you just want to have a certain object always displayed in the foreground, you can activate the option "In Front" under Object Properties > Viewport Display.

...Of course, this solution works only in the viewport and not in the final rendering.

.. unless you're using the Workbench renderer.. (it turns out.) I thought there might be a viewport / render distinction, but no.


text:
Why is the ball on the left black in shading
I'm new to Blender.
I found in tutorials, their ball on the left is showing a landscape photo. But mine is plain black.
Can anyone tell me what it is and how to change it to a landscape photo?

In the top of the 3D viewport, on the right, there are a bunch of icons that are menus.  Select the one at the far right that looks like a down arrow and add a screenshot of it, please.  It's where the settings that control that ball are.

Could be a bug. Which Blender version do you use? The bug is fixed in the current 2.93.5 version and doesn't occur in 2.92. But the early Blender 2.93.x versions have this bug related to Intel UHD graphics that results in a black material when the roughness value is very low. In this case, the left HDRI Preview sphere is black because it has a roughness of 0.


text:
Faces in XRay mode not selecting properly
I am new to blender. When I toggle XRay mode on and try to select a face of an object, it does not select when I click on it. I keep clicking and by some chance it selects sometimes or else it might select nothing or the face behind it. Although, this does not happen when I turn off the XRay mode.

What is going on?

There is a little black dot on each face:

You can select by clicking near it.
If you feel these dots are too small, you can change their size in the preferences (in Edit menu), in "Themes" at the end of the "3D viewport" section:

@AayushAggarwal Additionally I just want to say, when lemon writes "You can select by clicking near it" this means, when your cursor is somewhere near between two dots, the face with the closest dot is selected.


text:
Use a JSON file to change param in geo nodes
actually im in the process of creating a atom generator with geo nodes which will be duplicated across the periodic table (like a 3d periodic table) using the loop node.
everything is working fine but i will have to change the params for each one, i found online a json file that contains all the params i need but dont know how to import it and use it in geo nodes
maybe with the help of python i can do that but im not exactly sure how

You can read json with Python. Find more info here or here or just search the web for "Python json".
You can also change node properties with Python. You need to find your object, then its geometry nodes modifier and then the node in the modifier's node group nodes, then you find the desired input:

You can simply change default_value for the inputs:
bpy.context.object.modifiers["GeometryNodes"].node_group.nodes["Cube"].inputs[0].default_value = (2,2,2)

Unfortunately, without knowing any context, it is hard to advice more. The way you automate the assignment of data to whatever it needs to be assigned to depends on details not provided, so you will have to figure it out on your own.


text:
Get render metadata programmatically
I'm looking for a way to get a render's metadata when its finished using python (without having to save it).
basically i want to print out the meta data using the render_complete if that's possible
any thoughts?
thanks.

You can't do that yet.  Task T84598 is an open To-Do (bug) to "Add Python API for Image meta data".  The interface you need doesn't exist.


text:
Aling two dodecahedron on their faces
I am using blender 2.93.5 and I am using the extra objects plugin to create those dodecahedrons. I want them to align exactly (position and rotation)on one of their faces so that everyone of the five vertices is stacking upon each other on the alignment face. The dodecahedrons are the same size of course.
Tried to follow this tutorial on aligning them: https://cgmasters.net/free-tutorials/blender-tutorial-align-2-faces/ but I can't find the  'transform orientation' section mentioned there as by the looks of it blender is changing the UI every update.
just to get my frustration off: Just did one from 2.93.4 and had to search for the 'face select' button again. I do not have to add, that none of the tutorials I worked with in the past few weeks had remotely the interface from an current version...
Any hints are appreciated ;)

The tutorial uses 2.74 which was way before the most major update there ever was in Blender. If you ever have troubles finding a button, press F3 and start typing what the button is supposed to do. It'll also tell you the shortcut, so if you can remember that one, you'll never have to search for a button again.

the Transform Orientation panel is on the middle of the header bar

Thanks for those hints. The F3 thing should be on every blender wiki in first line in boldest font size 100!
Was not able to find the transform thingi with that, but the second comment had the right hint. Thanks for that as well. Unfortunately it does not work straight out of the box. I guess I'll fiddle around for another 2-3h to get this simple task done...

you could use a Mirror modifier to align 2 dodecahedron on the same face


text:
Blender Cycles is rendering out as blank white

My project is rendering as a blank white. The world color isn't even white and all the cameras on the right are on for rendering. It looks fine in the viewport.
I recently downloaded a poliigon bg and the addon and when I delete that bg and undo the addon this is still happening.
I've tried changing the refractions and some other small settings, and my compositor nodes are blank, could that it?

Compositor screen is blank but is Use Nodes still checked on that screen?

My mistake! I had hidden layers that were still turned on in render. So eye hidden and camera still on. Both need to be off, rookie mistake!


text:
how do i make an object cast a shadow on another object
I want to make an object cast a shadow on another, but I don know how
I've got a light with a sphere outside the camera view, I was hoping the sphere would sort of cast some sort of shadow, but it isn't. I'm not sure what to do
to mention, this model is meant to describe day/night

The environment lighting might be interfering with your ability to create a crisp shadow - click on the world properties tab (little pink globe on the right side) and change the background (world) color from default grey to closer to black.

if you are in material preview...then open this here: [1]: https://i.sstatic.net/qoFJB.png, click on "scene lights" and turn down the strength. If you are in rendered view, follow Christophers comment

Hello please share your file (upload and copy paste the URL it will generate): https://pasteall.org/blend/


text:
How do I make the camera wider?
making a project but not all the animation fits on the screen, i don't really want to change the focal lense because it makes it look zoomed out. Instead, i want to just make the camera view wider.

https://blender.stackexchange.com/questions/117139/render-dimensions https://blender.stackexchange.com/questions/201097/how-to-change-the-render-image-size-without-changing-camera-settings https://blender.stackexchange.com/questions/52509/how-to-make-a-image-bigger

The second link that @DuarteFarrajotaRamos will give you a quick and easy answer which does exactly what you want, this one, just in case his comment changes ;)  How to change the render image size without changing camera settings


text:
how do i import a blender animation into powerpoint
I recently finished a project; I was wondering what file type should I use for the final rendered animation to import it to PowerPoint?

i don't really understand your question. And therefore my answer would be: use a movie file format which powerpoints supports. So i would search on google for "which file formats supports powerpoint" -> https://support.microsoft.com/en-us/office/video-and-audio-file-formats-supported-in-powerpoint-d8b12450-26db-4c7b-a5c1-593d3418fb59

or you could also convert to animated gif?

Actually, PowerPoint supports gltf format.
https://blog.presentationpro.com/tips-and-tricks/how-to-add-3d-animated-models-in-powerpoint/
So you can try exporting to gltf.


text:
Cannot make lights visible in Render mode
I have set up area lights in Blender, with Ray Visibility set to check the Camera option. However, when I go to Viewport Render, the lights are not visible. I also have set the Scene Lights options enabled.
Is there another setting that could be causing the lights not to be visible on render?

There are several solutions here, either:

You don't have any object in your scene (you have hidden the only object of your scene, which is a cube, see the Outliner)
The strength of your light is not high enough
You have disabled the Scene Lights option in the Viewport Shading panel

Thank you for your response. I checked on those, but I'm still having the issue. The light does show on the object when I unhide it, but the light itself is not visible from the base

the lamp itself is not visible, you need to create a fake object (that has an Emission material), or create a cube with volumetric that contains your scene


text:
Slicing an object into parts along axes other than x, y, z with a python script
Using these examples
Slicing an object in 4 parts
How can I evenly split a cube?
I was able to cut an object into pieces along the x, y and z axes with a python script. But I can't do it along different axes (not x,y,z of the object). For example I would like to cut a cube according to axes not parallel to the edges and save the pieces obtained.
Please could someone give me an example or give me some suggestions to do this?

Alignment object.

Have made a small modification to my answer to linked question, to instead of using the objects bounding box, use the global bounding box of the object named "Cube".
Above shows a test run on default cone. The active object gets sliced. It uses the object named "Cube" as axes.
This could all be done via script by realigning and calculating the bbox given the chosen slicing axis.
import bpy
from mathutils import Matrix, Vector
context = bpy.context
ob = context.object
scene = context.scene
axis_ob = scene.objects.get("Cube")

size = 4 * max(axis_ob.dimensions)
mw = axis_ob.matrix_world

def bbox(ob, matrix=Matrix()):
    return (matrix @ Vector(b) for b in ob.bound_box)

def bbox_center(ob, matrix=Matrix()):
    return sum(bbox(ob, matrix), Vector()) / 8

def bbox_axes(ob, matrix=Matrix()):
    bb = list(bbox(ob, matrix))
    return tuple(bb[i] for i in (0, 4, 3, 1))

bpy.ops.mesh.primitive_plane_add(
        location=bbox_center(axis_ob, axis_ob.matrix_world),
        size=size)
chopper = context.object
m = chopper.modifiers.new("Sol", type='SOLIDIFY')
m.thickness = size

chopper.select_set(False)

def chop(ob, start, end, segments):
    slices = []
    planes = [(f, start.lerp(end, f / segments))
            for f in   range(1, segments)]

    for i, p in planes:
        m.thickness = -size
        bm = ob.modifiers.new("BOOL",type="BOOLEAN")
        bm.object = chopper
        bm.operation = 'DIFFERENCE'
        M = (mw @ end - mw @ start).to_track_quat('Z', 'X').to_matrix().to_4x4()
        M.translation = mw @ p

        chopper.matrix_world = M
        cp = ob.copy()
        cp.data = cp.data.copy()
        context.scene.collection.objects.link(cp)
        bpy.ops.object.modifier_apply({"object" : cp}, modifier="BOOL")
        slices.append(cp)
        m.thickness = size
        bpy.ops.object.modifier_apply(
                {"object" : ob}, modifier = 'BOOL')
    slices.append(ob)
    return slices

segments_x = 1
segments_y = 1
segments_z = 8

# change the cutting box
block = context.scene.objects.get("Block")

o, x, y, z = bbox_axes(axis_ob, mw.inverted() @ axis_ob.matrix_world)
for ox in chop(ob, o, x, segments_x):
    for oy in chop(ox, o, y, segments_y):
        chop(oy, o, z, segments_z)

bpy.data.objects.remove(chopper)

Thank you so much I try it now with some objects


text:
Plane with Animated Image?
I've been using grease pencil for a while - powerful tool, great for animation. I wanted to add a painted image behind the lines to act as a background, which can be easily done with a plane with an image attached to it, but I also wanted the background to be animated and this is where I'm having problems.
Is it possible to animate an image attached to a flat plane?

what kind of animation do you want? deform the plane? or play a movie instead an image?

Movie. I'd like to make a looping animation that uses images as frames.

Combine the images into a video file and select that video file in the image texture of that plane. Select the frame range and turn on "Auto Refresh" in the image texture node.

Thanks! I'll check it out.

Also, you can place an image or video file into the backplate from the camera properties tab under "Background Images" if you want a simple way to put it in the camera view.

Thanks! I'll try this out.


text:
Topology 'dents'
When modelling I always run into this strange problem where the quad bends, creating some sort of dent. I do low-poly modelling so I move the corners of the quad quite a lot. I also use proportionate editing frequently for some occasional tweaking.

How do I avoid these dents? Should I try a different technique?
Thanks

what do you call "dents", are you talking about the fact that your face is concave? You have no choice, a face is made of 2 tris and when it's not flat it will bend along a line that goes from a vertex to the opposite

Hi :). It's called non-planar polygon. Don't know if there are any automatic tools to prevent it.

Thanks! I'll read more about this.


text:
Dynamic Paint with sequence of colors as brush
I want to paint a sequence of colors dynamically onto an object.
In the blender docs under the category Dynamic Paint > Paint there is an example image that shows a sequence of colors painted on a surface. In the settings of the brush I can only draw a single color.
Blender Docs Image
How can this be achieved?

If you have e.g. a plane as canvas, you can make e.g. two objects (or even more) as brushes. If you give them a different color, you can get this:

Shading nodes of the plane:

You can of course animate/keyframe the brush/paint color.

result:

for color by distance feature you can use this node setup:

result:

although the animated gif looks a bit weird here (the white stripe isn't really white) but if you follow my node setup it works.

but can I change the color based on the traveled distance instead of the shading nodes of the plane?
I want this to be like a pen that is filled with different colors that releases the colors in the given order, independent of the surface.

just animate/keyframe the brush color. I updated my answer

ah! great, I didn't know that the color value could be keyframed, thanks!

You are welcome


text:
Record camera pose at each frame of animation
I created a Bezier curve, my camera is following that curve, tracking an object and thus rendering it from different angles. While running this animation, I also want to print/record the camera pose using Python. I can start the animation in Python using:
import bpy
bpy.ops.screen.animation_play()

But how can I get cam.location for each animation frame?

import bpy

def handler(scene):
    print("Frame Change", scene.frame_current)
    print("Camera location", scene.camera.location)

bpy.app.handlers.frame_change_pre.append(handler)

bpy.ops.screen.animation_play()

Will print the frame number and camera location at each frame.
This works because you can write a handler that is invoked each time the frame number changes.  In this case, the handler runs before the frame is displayed or rendered.  See this page of the manual for details.
This will print to the system console, and it will do so every time the frame is changed, including when you manually scrub the timeline cursor.


text:
Move the object to the center of the camera viewport
I'm new to Blender. I wrote a Python script where I sequentially read the camera poses from a csv file (real user traces), move the camera accordingly and render the scene. In my scene, there is a virtual object but for each camera trace, orientation of the camera is different so I have to manually re-adjust the position of the virtual object for it to fall within the camera viewport.
How can I set the location of the object automatically, depending on the camera orientation? Assume a constant distance between the camera and the object, I just want to adjust the orientation.

Just parent your object to the camera (adjust the position one time manually) and it will stay forever in the middle.
Like this:

result:

What if I want to do this only once at the beginning? I want to put the object in the center of the camera viewport for the first camera position and then not move it again. Similar to "Align active camera to view" but the other way around, i.e. align the object to the active camera. Can I do this using the Python APi?

you could add a child of constraint instead of parenting it. Then you can animate the influence value. If my answer helped you, please check the checkmark left to my answer. If you have other/further questions, please open a new question. Thanks.


text:
Camera transform not changing under follow path constraint
I'm moving my camera on a Bezier circle drawn around an object. To achieve this, I added an Empty, parented the Empty to the camera, added a Follow Path constraint to the Empty (set the target as my object), and finally added a Track To constraint to my camera. With this setup, I can move the camera on an arbitrary path by arranging the control points of the Bezier circle.

While doing this, I also want to get the camera location and orientation for each frame using this script:
import bpy
scene = bpy.context.scene

def handler(scene):
    print("Frame Change", scene.frame_current)
    print("Camera location", scene.camera.location)
    print("Camera rotation", scene.camera.rotation_quaternion)

bpy.app.handlers.frame_change_pre.append(handler)
bpy.ops.screen.animation_play()

However, I always get the same camera transform regardless of the camera position along the path:
Frame Change 1
Camera location <Vector (0.0000, 0.0000, 0.0000)>
Camera rotation <Quaternion (w=1.0000, x=0.0000, y=0.0000, z=0.0000)>
Frame Change 2
Camera location <Vector (0.0000, 0.0000, 0.0000)>
Camera rotation <Quaternion (w=1.0000, x=0.0000, y=0.0000, z=0.0000)>
...

How can I get the world coordinates of the camera at each frame?

use this:
import bpy

ob = bpy.context.scene.objects["Camera"]

for frame in range(0,250):

    bpy.context.scene.frame_set(frame)

    print (ob.matrix_world[0][3], ob.matrix_world[1][3], ob.matrix_world[2][3])

Thanks. Just a note: This gives the location; to get both location and rotation, we should use location, rotation = ob.matrix_world.decompose()[0:2].


text:
Can I change Blender to always show certain panels or menus?
is there a way to make the popup window expanded when adding new geometry?

And the same or similar thing with the Item window on the top right in the 3D viewport.
Can I have that always visible?

https://blender.stackexchange.com/a/169223/19307

The popup window should stay expanded for subsequent operations once you've initially expanded it. There's no specific setting to keep it expanded.
For the items on the N panel, right-click on the double dotted line on the Item panel (1) then check the Pin checkbox (2) to keep it visible. You can also drag the item up and down on the panel to position it once it's pinned and left-click on the pin to unpin it.


text:
object list is not iterable and save directly in stl files
I'm a new blender user and I am probably missing something simple but trying this script
Save objects into separate blender files
to save multiple objects as separate Blender's files I get an error because it doesn't seem possible to iterate on a list of objects. Any suggestions? thanks
found bundled python: /Applications/Blender.app/Contents/Resources/2.91/python Traceback (most recent call last): File "/Text", line 10, in TypeError: 'Object' object is not iterable
ps is there an option to save directly in stl files?

I was able to save existing objects in separate stl files with this statement
my_filepath = bpy.path.abspath(' //my_directory/ ')
bpy.ops.export_mesh.stl(filepath = my_filepath, batch_mode = 'OBJECT')


text:
Help: cannot find vertex_normal as attribute in 2.93 beta
I am following this tutorial on geometry nodes https://www.youtube.com/watch?v=DQVYieRfQBY&t=12s which is using 2.93 Apha. I couldn't find the alpha so I downloaded the beta. My issue is that at 3:38 they select vertex_normal and I cannot find this attribute in 2.93 beta. Please help.

This is what I am getting

Actually selecting "normal" makes the animation do the same thing as in the tutorial.

Related: Can't find the node! Which node is available in which Blender version?

An alternative setup is suggested in the first (pinned) comment of the video.
TLDR : You can use normal instead of point_normal although it may be inaccurate. If you want an accurate result you can read through the rest of the answer.
Quotes from user Erindale :

A note on vertex_normal attribute: This has been removed as it as a
bit of a misnomer (although very useful). The method you'll need to
use now is to take normal attribute (this is the face normals) with an
Attribute Convert node (set to point (writes to point domain) and
vector (normal is a vector)) and then use an Attribute Vector Math
node set to Normalise to ensure those vectors all have length 1. I
recommend people make a reusable node group that handles this as it is
a pretty common thing to want. Here is an example of what that could
look like

From the twitter post :
https://twitter.com/erindale_xyz/status/1374764284811612161/

As a follow up, you can just use normal as an attribute instead of
vertex_normal and it will automatically convert to point domain if
it's used with another point domain attribute (eg position). There
will however been some inaccuracies without normalising. For effects
like this you may well get away with it unnoticed but with more uneven
geometry you may find that normalising is required. I just have a
group so that's what I recommend


text:
How to make a shader that applies this effect to each face of a cube?
I'm very new at shaders, so in order to learn what they're capable of I wanted to try and create an effect that is a fair distance away from anything you can do with a single principled BSDF node. I don't quite now how to express this in 3D, so I coded a 2D animation:

basically the idea is to draw a series of squares along a line and have them grow each frame until the part of the "screen" behind them is filled with their color. in effect it is a fancy color wipe.
my question is, is there a way to apply this kind of effect to faces using a shader? if so, how would I go about that?

Do you specifically want to use a shader?  Or can you use other techniques?

With the objective of making the tree as simple as possible for the job you want done.. do you want this, 1 square per face? Or a 2D UV texture? When you say 3D, could you give an idea of the way you would like the effect to be spread across a 3D surface?

I feel like the easiest way to think of this is to have a grid of square gradients and when you use a greater than, you can change the size of the square. Think of it as changing the height that you cut through a pyramid, at the top the cross section would be small but at the bottom, it'll be large.
To make your grid of squares we can do a little bit of vector maths. I'll be using the UV coordinates as this will let you unwrap your cube so each face gets the whole effect.
I am scaling the UV coordinates 20x so that we get 20 squares and then breaking it into a grid with Fraction. I then centre each space by subtracting 0.5 and use absolute to make each space symmetrical. This is the easiest way to get a square grid. I then separateXYZ and use a maximum node in order to get our little pyramids for each square.

If we add a math node set to Less Than at the end, you'll see the threshold will change the size of all the squares. To make this wipe down like your animation, we need the threshold value to be a gradient.
Branch off from the Scale node and add a separateXYZ followed by a math node set to snap. Take the Y socket into the math node and set the increment to 1 (this is to match the fraction node which also repeats at 1).

We now have a gradient and that we can manipulate to control the animation. To change the position of the gradient, add a math node set to subtract, and then follow that with another math node, set to multiply. The multiply will act as the falloff control. Use a small number like 0.1 for now. If we plug this into the threshold of the Less Than node, you'll see the square gradient how you want. You can change the subtract value to move the transition up and down.

Finally, to animate the sequence, we need to bring the frame number into the shader. Add a value node and type #frame into the value field. This will create a driver that takes the frame number. We want to have a loop so we're going to add a math node set to modulo. We need to use the loop length twice so add another value node that we can use and plug this into the bottom of the modulo. Set the loop length value to something like 80. Follow the modulo with a map range and plug the modulo into the first value and the loop length value node into the From Max socket. Set the from Min socket to 1. Our To Min and To Max socket slightly depends on a few things such as what scale value we've used and what the falloff is set to and the loop length so the settings for a scale of 20 and falloff of 0.1 are:
To Min: 20
To Max: -5
Plug this map range into the bottom of the subtract node to control the position of the wipe.

I'm still working my way through this, but it's very helpful! I'm new to visualizing how UV coordinates work so this exercise is proving quite educational in that regard :)

My basic theory was that if we could do it once we could scale it up and give it any number of controls, and if it's based on UVs then it should be able to be applied to anything.
I have just a plane here, I've separated out the UV coordinates and set up some Math -> Compare nodes with a Value node that we can drag back and forth to fill up the square.  The square is completely filled at .5, so we're using a Math node to normalize this value between 0 and 1.  This is important for later.

So now we can divide up our coordinate space with a Vector Math node set to Modulo, but this actually creates a dependency between the value we divide our plane by, and the values coming out of our separate XYZ node.

We can solve for this by using one value node to drive the whole operation.  We divide by this value to do the Modulo operation, and multiply the values from our Separate node to bring back up to the 0 - 1.0 range.  At the end our node graph looks like this.

We can make changes to either of these value nodes and see that they are working, the square expands from the center of each box.  We also see that whatever maps we send into these Epsilon values are what creates the visual pattern.

Since we've been careful to normalize for values between 0 and 1, we can use the output from almost any of the procedural textures.  I've made a few examples here.  I recommend trying these inputs and sliders but the possibilities are endless.

The subtract node does exactly what you asked for in the question, I think.

Here's the .blend file.

thank you, this is incredibly useful! if I could mark both answers thus far as correct, I would have ;_;

It was a well formed question, and a good exercise for me, so I thank you for that.


text:
Class Method as Application Handler
I'm trying to use a method of my class as application handler for when the scene's frame is changed. For that I'm using bpy.app.handlers.frame_change_pre.append(my_handler). My approach is the same as described on the Blender documentation with the difference that my function is a method of my class:
import bpy
class MyClass(object):
    def my_handler(self, scene):
        print("Frame Change", scene.frame_current)
my_object = MyClass()
bpy.app.handlers.frame_change_pre.append(my_object.my_handler)

However, I am getting this error message:
TypeError: my_handler() takes 2 positional arguments but 3 were given
When I do my_object.my_handler(bpy.data.scenes[0]) I correctly get the frame number whenever I change the keyframe.
Where am I going wrong?
Why does the function get 3 arguments passed?

Add the depsgraph.
Since 2.8 most handlers take both a scene and a depsgraph argument, the latter is generally a kwarg.
If set up as a simple function this is fine
import bpy
# test clear
bpy.app.handlers.frame_change_pre.clear()

def my_handler(scene):
    print("Frame Change", scene.frame_current)

bpy.app.handlers.frame_change_pre.append(my_handler)

However if using a method of some instanced class, the way blender is wiring this up under the hood requires the extra argument defined for depsgraph. (Even if it is always None in FCPre)
Code below, same result as code above.
import bpy
# test clear
bpy.app.handlers.frame_change_pre.clear()

class MyClass(object):
    def my_handler(self, scene, depsgraph):
        print("Frame Change", scene.frame_current, depsgraph)

my_object = MyClass()
bpy.app.handlers.frame_change_pre.append(my_object.my_handler)


text:
Set object origin for all frames in the animation
I have a mesh sequence imported into Blender using Stop Motion OBJ. I also inserted a Bezier circle to the scene which I set as the target of a Follow Path constraint attached to an Empty (cube), which is the parent of my camera that has a Track To constraint to the object (mesh sequence) so that I can keyframe the Offset parameter and move the camera along the Bezier circle in my animation. See the scene in the attached image.
However, as you see in the image the object origin is by default at the bottom of the object, so the camera looks at the feet of the object. I want rather the camera to look at the center of the object during the whole animation. Now I can set this for one frame using Object > Set Origin > Origin to Center of Mass (Volume) but I can't figure out how to do this for all the other animation frames. How can I apply the desired object origin setting to the whole animation?

Do you have a different object every single frame or is it just one object but the mesh changes each frame?

Also, can you share the blend file?

It is a moving human model i.e. 350 OBJ files with the corresponding texture maps. So those are different meshes (mesh sequence) but belong to the same object. The Stop Motion OBJ plugin I mentioned enables loading them into Blender.

Sorry, can't share the blend file, it is huge (over 500MB) because of the imported mesh sequence.

Makes sense. Anyway, if it's just one object during the entire animation, you could add an empty, place it to where you want the camera to look, parent it to the object and make it the target of your camera instead of the object.

Great, that is a practical solution and it works for me. Thank you.

I'm glad I helped.

You can create a Vertexgroup from the object and use this as target. Maybe this helps.


text:
More efficient usage of the computing resources by running several Blender instances
I'm using Eevee to render a mesh sequence imported with Stop Motion OBJ in "Streaming" mode.
I only have 1 or 2 such mesh sequence in the scene. I play the sequence(s) while the camera is moved around according to camera poses read from some pre-recorded traces (CSV files). The camera poses in the trace files are generated from another source. Then I render and save the result for each frame as a PNG image. I also apply some image processing and do calculations on the rendered images using the Python interface.
Now I'm doing this for several such traces and for different mesh sequences, so I have to perform hundreds of runs/experiments and render each frame. My problem is: if I do this one-by-one for each trace, only a small amount of CPU and memory resources are used, and the amount of time necessary for all experiments is unacceptable. I'm already rendering at the minimum possible resolution and cannot seem to get the rendering faster by further optimization of the renderer parameters.
I found sort of a workaround by starting multiple Blender instances in parallel in background mode (on the same machine) and distributing the traces to different instances i.e. data parallelism. To do this, I simply start a tmux session and run multiple instances of Blender from the command line, in different tmux windows. However, still the CPU/memory resources are not even halfway exhausted on my 64-core, 32GB RAM machine. I think that the best way to speed up the whole thing is to start as many instances of Blender as the number of different camera traces, until I hit the boundaries of CPU or memory resources.
Does my approach make sense? Is there any more elegant way of scaling up the rendering for such simple scenes that consume very few resources?

Your approach makes sense and as far as I know there is no more elegant way.  You could use render farm software to help you automate the process and you might investigate using SheepIT as a render farm but I wouldn't call those approaches more elegant.

I ended up using subprocess.Popen to run the whole thing in a more automatized way. Here is the relevant part of my Python script, in case someone needs it in the future:
data_dir = /path/to/csv_files
f_list = glob.glob(str(data_dir / "*.csv"))
cmds_list = [[blender, '--background', 'my_scene.blend',
                  '--python', 'scripts/process_data.py', '--',
                  '-t', fname] for fname in f_list]

# stdout should be redirected to /dev/null, otherwise filling up the OS pipe buffers and blocking
procs_list = [sp.Popen(cmd, stdout=sp.DEVNULL, stderr=sp.STDOUT) for cmd in cmds_list]
for proc in procs_list:
    proc.wait()

After a little experimenting, I figured out the necessary amount of processes to almost fully utilize my CPU and memory resources, so I tweak the batch size in data_dir accordingly.


text:
Changing the focal length has no effect on the render
When I change the camera's focal length, I can see that the view changes in the camera perspective but there is no change when I render the image. The object that the camera is pointed at, stays at the same size regardless of the focal length.
Also, the input field "Focal Length" has an orange background; I'm not sure if that was always the case or indicates something.
I'm pretty sure I'm selecting the right camera (there is only one), and also didn't observe this behaviour before. I must have accidentally messed up with something but I can't figure out. Any ideas?

The Focal Length value is orange, it means that you've already keyframed it, and the render you do take this keyframe into account, not the one you try to enter currently. Take a look into the Timeline and you should see a keyframe, simply remove it.

Perfect, worked like a charm. I must have accidentally keyframed it, now everything is back to normal after clearing the keyframe. Thanks!


text:
Star filter effect in Blender?
Is it possible to achieve a realistic 'star filter' effect procedurally in Blender? I think the glare node in the compositor might help me, but it doesn't seem to have the rainbow color effect that I'm looking for.

Possible isolate the highlights, then add glare and use a colorramp node with RGB in it to control the color of the glare?

Have a look at the flares wizard addon.


text:
Apply a pattern of objects to the outside of some other geometry
I have a pattern of objects I intend to represent in Blender as cameras (so I can simulate viewpoints from where the objects would be).  The pattern is defined by angular offsets around a circle, i.e. one at 0 degrees, one at 20 degrees, one spaced 100 degrees after that, another 120 degrees after that.
Over time, this pattern is going to need to be placed on several different imported geometries (probably from STL files).  All of them are going to be some kind of solid-of-revolution (cylindrical or conical or some tapered round body).
I would like to able to

Define the pattern such that I could change the angular offsets between the pattern elements if needed
Define a plane through this geometry where the pattern should lie
Define what direction the pattern starts from (i.e. the 0-degree line)
Have the pattern conform to the surface of the imported geometry

Is there a method of doing this?
I'm inexperienced enough with Blender that I'm not totally sure how to phrase my question, so help with that would also be appreciated.


text:
Blender 2.79b errors with addons
I keep getting errors installing addons in Blender 2.79b this is the most recent for IK-Particles addon. Any help would be great. Thanks

Voting to close as off-topic: For pay to use addons suggest using the support provided.

Agree with above comment, but it seems a "file not found" or "platform mismatch" about some dll, seeing https://stackoverflow.com/questions/19019720/


text:
Mesh Boundary Option Sculpting
I’ve never had luck getting the mesh boundary option to work as seen in these GIFs. Turning it on/off under advanced brush settings has no discernible effect, even when increasing propogation steps. I’ve tried activating it with Alt-A to load the pie menu - and there are inconsistencies between the pie menu and the properties panel about if its even activated or not also seen in the GIF. Any ideas on how I can get the Mesh Boundary option to perform like how it does in Pablos videos? - In particular - I want to be able to sculpt on the interior of the mesh without it affecting the margins. Thanks!

About the inconsistency: I didn't know the Auto-Masking (Viewport header > dropdown menu or Alt+A > pie menu) but this is not the same as the auto-masking in the brush settings (Tool Settings > Advanced). The first options are global, the second are brush-dependent. Both Mesh Boundary options work for me with the Cloth brush (Drag, Radial) and the Deformation brush in Blender 3.5.

I played with it more - I realize now the issues were showing up after using remesh modifier on the plane, which makes it double sided. My understanding is that this makes the plane incompatible with mesh boundary - mesh boundary only works on single sided meshes. Using SubD modifier keeps it a single plane and mesh boundary works, Thanks,


text:
What techniques are the best to make a gradually curved surface for the side of a model train? (photo attached)
I would like some advice before I start a new build. I am trying to work out the best way of gradually curving the sides of a train as per the image below. The sides (on most trains these are typically flat) are slightly curved and feature windows inset into them which I will need to model. I was wondering what the best way to achieve this would be in Blender? Would a bevel work and if so then are there any tips that could help as I have found that beveling things to get coplicated if there are a significant number of curved surfaces.
Any help would be very gratefully received.
Thanks

https://blender.stackexchange.com/questions/64589/how-to-round-this-edge-model-is-intended-as-a-game-asset also related https://blender.stackexchange.com/questions/81167/adding-edge-loops-around-airplane-window

Personally I would not use a modifier to do this, but block it out low poly at first.
This was created (very fast) using extrude E, creating loop cuts ctrl+R then beveling these cuts Ctrl+B (using the mouse wheel to control the amount of bevel).
Windows are created with Ctrl+I to insert faces, then F3 to repeat the same insert amount for all the windows.

the side curve are created with a single loop cut Ctrl+R, and scaled on the width and beveled it out Ctrl+B to get the rounding.

Please use Ctrl markup for writing keyboard keys.


text:
Import volumetric video (OBJ sequences)
I have a set of OBJ files (1000+) with the associated texture maps as JPG files. I want to import those into Blender using the Python API either sequentially or all at once and play them while changing the camera location and rendering views from different camera positions. Is this possible using Python?

It's possible. My suggestion is for you to sequentially break down your workflow and look for things in order. (eg) 1. import obj file 2. import multiple files 3. Change camera locations 4. Render. All these keywords have multiple answers associated on this website alone. Cheers

Have you tried this Blender plugin? https://github.com/neverhood311/Stop-motion-OBJ It does exactly what you are looking for.

@rafapages Thanks, that looks like a very promising tool. I will give it a try.


text:
My UV mapping changes when switching from edit mode to object mode
I'm trying to create a bottle with a label I made in illustrator. I exported the Label as a Png, and then wrapped it around a section of the bottle. I really like how it looks in edit mode, but when I switch to object mode, it warps and looks different. Anyone know why?

My first thought might be non-uniform scale - try selecting the object in object mode, then press Ctrl+A and select "Scale"

Looks like Subsurf modifier on the mesh object. When switching to object mode its effect becomes visible due to setup you have. No general solution to that, in some cases just add a loopcut into area without any ones (like you have in the bottom of the label), or can be necessary to use another approach to modeling or unwrapping


text:
square to cross? best way?/just an annoyance
Something I find annoying or maybe I'm just missing something? Quickest way to make a square into a cross? My current way is to extrude two opposite edges then scale them out. Repeat the process for the other two. Is there a quicker way?

hello maybe begin with a cube, select all the vertical faces and Alt E > Extrude Individual Faces?

Valid... thx. don't like starting with a cube and delete to get a plain but yeah it works. :)

Yes but I'm not sure there's any other solution  :(

the "solution" is an extrude edge normal that works like extrude face normal... but that's not in there yet. i have hope!

Begin with a cube, select all the vertical faces and AltE > Extrude Individual Faces, then activate the Auto Merge option and scale on Z (SZ0):

Auto Merge... yuck. getting to complex. :))

or select all and press M > Merge by Distance   ;)

Create a grid, 3 x 3, go in edit mode, face select, select 4 faces, x

UPDATE: i don't wanna disappoint moonboots:

or

or (because mesh booleans are evil and slow):

Man, were you not supposed to propose the GEONODE solution?????!!??? I'm so disappointed   O_o

nice approach. thanks.

@moonboots: i updated my answer

@Chris  mmmmh i feel much better

You should split these into separate answers.


text:
Displacement breaks model
I am having issues with displacement blowing up my model. Here is the file link https://pasteall.org/blend/3a30add0510d4884829a7afcb4d08c62

You have to specify a texture for the Displacement modifier. Your model has flipped normals (https://blender.stackexchange.com/a/216140/107598) You need to correct them else you get shading issues (https://blender.stackexchange.com/a/118555/107598). What is the purpose of the Solidify modifier? Just asking because with the level 4 Subdivision Surface modifier this will generate a lot of extra vertices.

@Blunder Thank you so much! Solidify is there because I am making the model thicker for resin printing purposes! Ill give the face changes a try when I get home. Thank you again, this is my first time using blender and im just trying to clean up a 3D model of my MMO character to print.


text:
Get the Array Modifier Count when Fit length with Python
I want to output a list of all my objects in a collection and how much of each there are.
But for this I need the number of how much the array modifier has added, but I dont see it when I use "Fit length" type.
Is there a way with python to get this number?
BR

Hmm I don't think this is exposed to the API but you can approximate it by calculating the curve length and dividing by the offset, but it will work only for simple arrays and you'll have to account for unapplied transforms if any...

@Gorgious so if I have to calculate it for every object I have, because they have different dimensions. Or is there an easy way to do it for every object at once?


text:
BPY toggle viewport visibility of modifiers
I want to save the dimensions of an object in a script before and after the viewport visibility for the modifiers has been switched off.
 for obj in bpy.context.selected_objects:

            # Get the selected object
            selected_object = bpy.context.active_object

            filled_x    =   obj.dimensions.x
            filled_y    =   obj.dimensions.y
            filled_z    =   obj.dimensions.z

            # Temporarily disable the array modifier
            bpy.context.selected_objects.modifiers.show_viewport = False

            unfilled_x    =   obj.dimensions.x
            unfilled_y    =   obj.dimensions.y
            unfilled_z    =   obj.dimensions.z

            # Calculating dimensions as specified, rounding up
            dimX = math.ceil(filled_x / unfilled_x)
            dimY = math.ceil(filled_y / unfilled_y)
            dimZ = math.ceil(filled_z / unfilled_z)

This is my very basic code to try and do this. But the viewport visibility of the modifiers is still on.
What would be my best solution to try and fix this problem?

this is one of the questions, i am asking myself: did you just spent 3 minutes on it or less? Did you run your code at all? or just asked chatgpt and copied it here? If you run this, you will get an error, it says: AttributeError: 'list' object has no attribute 'modifiers'. So it should be clear, the selected_objects (which is plural) is a list, and multiple objects of course don't have modifiers, because exact one object just has a modifier.

keep in mind: you want help for free in our spare time - so you should at least spend 5 mins with this question and have at least the code run one time before asking. Thanks.

Hello, as Chris mentioned this line bpy.context.selected_objects.modifiers.show_viewport = False is where the problem lies, but it's impossible to fix without further info from your part. it mentions the array modifier but we need to know either its name or its location from within the modifier list

    for obj in bpy.context.selected_objects:

        # Get the selected object
        #selected_object = bpy.context.active_object
# you don't need to get the selected object, because you are already looping over them, so the "obj" is (!) your first selected object

        filled_x    =   obj.dimensions.x
        filled_y    =   obj.dimensions.y
        filled_z    =   obj.dimensions.z

        # Temporarily disable the array modifier
        # bpy.context.selected_objects.modifiers.show_viewport = False
        # selected_objects is a list. Lists don't have a property modifiers. A single object can have modifiers. So you could get the first modifier and set the show_viewport there.

        obj.modifiers[0].show_viewport = False

        unfilled_x    =   obj.dimensions.x
        unfilled_y    =   obj.dimensions.y
        unfilled_z    =   obj.dimensions.z

        # Calculating dimensions as specified, rounding up
        dimX = math.ceil(filled_x / unfilled_x)
        dimY = math.ceil(filled_y / unfilled_y)
        dimZ = math.ceil(filled_z / unfilled_z)

This will help you, but i would recommend watching some beginner python and Blender API tutorials.
And my "correction" is far from being perfect.
you should

ask whether a modifier is there at all (else my code will crash)
add another loop over the modifiers inside your loop so you can disable all modfiers


text:
Import Array Offset Slider into custum GUI
I want to code a Addon to simplify my workflow. I need to change the offset of my Arraytool regularly, so I want to import the regular slider from the Array Tool into my GUI.
Is there any way to do that?
BR

Yes, but you'll have to find a way to get the object's modifiers and it's easier if you know in advance the modifier's name and are sure it won't change.
import bpy

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

    def draw(self, context):
        layout = self.layout
        obj = bpy.data.objects.get("Cube")  # Case sensitive !!
        if not obj:
            return
        modifiers = obj.modifiers
        array_modifier = modifiers.get("Array")  # Case sensitive !!
        if not array_modifier:
            return
        layout.prop(array_modifier, "relative_offset_displace")
        layout.prop(array_modifier, "constant_offset_displace")

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

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

if __name__ == "__main__":
    register()

Result :

Here's a second solution that relies on the active object and automatically adds the information for each array in the object modifiers :
import bpy

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

    def draw(self, context):
        layout = self.layout
        obj = context.active_object
        if not obj:
            return
        modifiers = obj.modifiers
        array_modifiers = (m for m in modifiers if m.type == "ARRAY")
        for array in array_modifiers:
            box = layout.box()
            box.label(text=array.name)
            box.prop(array, "relative_offset_displace")
            box.prop(array, "constant_offset_displace")

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

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

if __name__ == "__main__":
    register()

Say you have 3 array modifiers :

Result :

Hey there, the second version seems to be the perfect fit for my usecase. Thank u VERY much for the help.

Cheers ! Note you can add any property you want that way, just make sure to enable developer extras in the preferences and hover your mouse over a field, it will tell you the python attribute name you can reuse in the layout.prop expression

Developer extras are already enabled. I've been trying to get this work for over a week and have gotten nowhere close to a final result. So thanks again mate.

Yeah it's really hard to grasp everything at start. I suggest you study the python templates in the Text editor (Templates > Python) and try to understand how things are linked, begin with the simple ones at first. Good luck !


text:
Automate Array Modifier
I am looking to use blender as shelf planning tool and I want to automate the array modifier.
So when I place the packaging onto a plane, it should automatically fill the plane (like that: )
Is there any way to do that, or do I have to do it manually every time?
Thank you for your help :)
BR

One of the options is to use "fit type - fit curve".
You can fit the curve to your "shelf" or add some geometry to the curve so that it becomes the shelf.

Another option is to add a "driver" to the "fit type - fit length - length" parameter which will determine the length of the shelf.

The driver might be more complex than that, for example it might determine the size of the object's parent and fill it automatically if parenting is considered as "putting a package on the shelf".

Hey :) thanks for the help - the option with "fit curve" seems to be the option for us. Thank you very much for the help