text:
Why can't I find text when using the multiprocessing module in blender?
I wrote a multiprocessing module to extract one of the selected bones and perform the task of finding the closest bone.
import bpy
import multiprocessing

bpy.ops.object.mode_set(mode='EDIT')
seleb_n = [i.name for i in bpy.context.selected_editable_bones]

actob_n = bpy.context.active_object.name
#head_bn : {tail_bn : distance}
headtail_dic = multiprocessing.Manager().dict()

# if i input bone_name, then process find the most nearest tail of bone to head
def find_nearest_head_co(actob_n, bn, bn_l):
    target_vector = bpy.data.objects[actob_n].data.edit_bones[bn].head
    for fbn in bn_l:
        tail_vector = bpy.data.objects[actob_n].data.edit_bones[fbn].tail
        distance = ((target_vector[0]-tail_vector[0])**1/2 + (target_vector[1]-tail_vector[1])**1/2 + (target_vector[2]-tail_vector[2])**1/2)**1/2
        headtail_dic[bn] = {fbn:distance}
        print(headtail_dic[bn])

jobs = []
for bn in seleb_n:
    p = multiprocessing.Process(target=find_nearest_head_co, args=(actob_n, bn, seleb_n))
    jobs.append(p)
    p.start()

for proc in jobs:
    proc.join()

print(headtail_dic)

When I run the script, the error message is displayed on the terminal:
'FileNotFoundError: [Errno 2] No such file or directory: 'C:\\script_name'

How should I fix it?

Blender Python doesn't support multithreaded operation. You can use multiprocessing to do stuff outside of Blender, but you can't access the project in multiple processes. You could perhaps run separate Blender instances and open the same file in each of them, but I don't see anything like that in your code.


text:
How to add specific camera view using numbers to the script?
I currently have this script, and I am trying to add an upper right view of my character to the scene but it's only looking at the feet of the character. Ideally, the upper right camera view would be above the current right camera angle, just that it's elevated and rotated downwards. I'm new to Blender, and just started using it this week, could someone help? I'm quite stuck on this.  The one I am trying to add is called "uppright". Thank you!!
import bpy
import math

def set_camera_view(view_type, LeftRight_adjust, Closeness_adjust, Height_adjust, Camera_angle):

    # Get the camera object
    camera = bpy.data.objects.get("Camera")
    #camera1 = bpy.data.objects.get("Camera.001")

    # Adjusting the camera axis to be the same as the movement
    camera.track_axis = 'POS_Y'
    camera.up_axis = 'Z'

    # Get the object
    target_object = bpy.data.objects.get("Cube")

    # Get the location of the target object
    target_location = target_object.location

    # Adjust the camera angles
    camera.data.angle = math.radians(Camera_angle)

    # Define camera parameters based on view type
    if view_type.lower() == "front":
        rotation_angles_degrees = (90, 0, 180)
        camera.location = (target_location[0] - LeftRight_adjust, target_location[1] + Closeness_adjust, target_location[2] + Height_adjust)

    elif view_type.lower() == "right":
        rotation_angles_degrees = (90, 0, 270)
        camera.location = (target_location[0] - Closeness_adjust, target_location[1] - LeftRight_adjust, target_location[2] + Height_adjust)

    elif view_type.lower() == "back":
        rotation_angles_degrees = (90, 0, 360)
        camera.location = (target_location[0] + LeftRight_adjust, target_location[1] - Closeness_adjust, target_location[2] + Height_adjust)

    elif view_type.lower() == "left":
        rotation_angles_degrees = (90, 0, 90)
        camera.location = (target_location[0] + Closeness_adjust, target_location[1] + LeftRight_adjust, target_location[2] + Height_adjust)

    elif view_type.lower() == "uppright":
        rotation_angles_degrees = (70, 0, 81)
        camera.location = (target_location[0] - Closeness_adjust, target_location[1] - LeftRight_adjust, target_location[2] + Height_adjust)

    else:
        print("Invalid view type. Please choose 'front', 'right', 'back', or 'left'.")
        return

    # Set the rotation of the camera
    camera.rotation_euler = [math.radians(angle) for angle in rotation_angles_degrees]

# Default
LeftRight_adjust = 0
#zoom out function is closeness adjust
Closeness_adjust = 5
Height_adjust = 1
Camera_angle = 60

set_camera_view("uppright", LeftRight_adjust, Closeness_adjust, Height_adjust, Camera_angle)

Hi there. Welcome to Blender! If you want someone to be able to help you, you should provide a complete working demo script and a few words about the required setup. What is needed? What do you expect? What doesn't work? There are several issues here: The indent of your script is wrong, the import statements are missing, the export_video function is irrelevant, there must be a target object named "0000", and there are 2 cameras used in different cases...?! Anyone who wants to help you must fix these things first. Why not change the script so it works with the default cube and camera?

I've changed the script so it works now with the default camera and cube. The result of the script is that the camera points to the "feet" of the cube. But it is also facing away from the cube. This is probably because your camera1 and the "character" have different positions than camera and the default cube. -- Just wondering, are you sure you need this script? If you want to make the camera point at something you can use a Damped Track constraint and an Empty as target.

source: Stack Exchange

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

sort: votes


text:
is it possible to map images to a color ramp node?
I have just finished this tutorial by Ilir Beqiri 'Dynamic, Recursive Subdivision With Geometry Nodes'. It has moving pieces that have different colors on them. I have managed to get image texture on them by using the UV map output on the grid node. But I would like to have  multiple images on each square instead of one. He did this with a Color Ramp node. Is there a way to do this using image textures?

Here is the blend file with the picture using the UV map. I basically would like to be able to have multiple pictures on the grid but I'm not sure how...

Could you provide your blend file with https://blend-exchange.com/ ? How do you want to place your images for one color ? Each square contains one full image VS squares are only the same image all together VS something else ?

As you can see the Color Ramp only has a Fac input which only accepts float values (which will be greyscale when coming from an image) in the 0 to 1 range. So it does not take color images as input (well it does, but converts them to greyscale). The sliders you can set can only be given a single color value for each slider. So the only thing I can imagine is using a stepped greyscale output which is then used for mixing different textures. But the Color Ramp itself cannot output image textures.

 here is the blend file with the picture using the uv map. I basically would like to be able to have multiple pictures on the grid but im not sure how...

Thank you for taking an interest Lutzi and thank you Gordon at least I know now I cant use the color ramp to do it

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


text:
Objects Disappear on Camera View - Pressing "0" Key
I'm puzzled why my ojects disappear whenever I press "0" key to preview camera angle. I've set my camera to 50mm and LOCK CAMERA TO VIEW. Cannot figure it out. They all disappear when I zoom out.
By the way, I have set my unit of measurement to IMPERIAL. Is this a problem?

Try to decrease the "Start" value and/or increase the "End" value in Clipping section of your camera settings.

okay, figured it out. your were right @ExConfessor thanks


text:
Switching Center to Objects

Here's an interesting situation I'm facing right now. During modelling, I know that you make it easier to focus on an object by PRESSING PERIOD on your numpad. That way, the rotation will be oriented within that object.
My problem now is that my fullsize keyboard has gone caput and I'm now using a replacement keyboard with no NUMPAD at all.
So, during my modelling, I am having difficulty manimuplating the 3D space because I cannot control or place the CENTER to a specific object.
Is there a solution within the KEYS themselves?
Thanks

Change the hotkey to something you can use.  Keyboards send codes for specific keys, if your keyboard doesn't have that key it can't send the correct code.  Remapping is your only option, other than buying a new keyboard.

In the header of a 3D view, right-click on the View > Frame Selected menu item, and add it to your Quick Favorites and/or create a new keyboard shortcut for it.

THIS IS THE ANSWER I AM LOOKING FOR. The next thing for me is to REMAP this to a key combination or whatever.

This is personal preference but I never use the period key to focus on things, turning this options ON are all you should need when modeling. This are under Blender preferences -> Navigation. Try it out, might change your life :). Some people like to have the orbit around selection option turned on but I find it slows me down.


text:
Why Is My Transparency Shader Not Working
I just installed the Released Candidate version of Blender and noticed that a couple of things are missing. Im using CYCLES as render engine.
First, I can no longer make the TRANSPARENCY SHADER to work properly. My goal is to KEYFRAME the FAC so that I can make the object disappear at a certain point. (Please see video:
https://www.youtube.com/watch?v=VAEdu0Qeuts&feature=youtu.be) But as you can see, when Played around with the values of the FAC, it will create this weird shapes and not fully disappear.
Thanks

Please ask only one question per post. Your second point has been asked before and already has an answer, so this might get closed as duplicate of https://blender.stackexchange.com/questions/141144/where-are-the-outliner-toggles-in-2-8/141145#141145

Maybe try to increase the Transparency value in the Render panel > Light Paths? For your second question, you'll find all these option if you click on the key icon on the top right of the Outliner panel you show

@moonboots i tried setting it to 20 but nothing happened :)

I think you are only changing the material transparency for the heat spreader but not for all of the other objects. To me it seems that the heat spreader is disappearing fine, but not the other objects.

I'm not sure what happened but I was able to solve it.

I went to edit mode and found a weird formation on the faces that didn't disappeared.
I deleted those faces and recreated a new FACE.
Everything worked after that.

It looks to me that everything works normally, but you have a second material on those faces that doesn't turn transparent (and those faces just happen to form the observed weird shapes due to your mesh).
So to solve this you can either make all faces have the same material or have a transparency node and keyframes for each of those materials.
(If this answer does not work for you, please provide a .blend since other problems might show the same symptoms)
Happy Blending! :)

I did a thorough inspection and for some reason, a section at the top FACES of the IHS was not affected by the  TRANSPARENT SHADER.
I deleted them, and then created a new face from the same object and it work. That's the part I don't understand. Could be a bug?
Now it's working perfectly fine!!!
Thanks


text:
Sun Mesh with Corona - Alpha Transparency Affects Appearance
I have a Blender scene with a Sun mesh and a Corona mesh around it. The Sun mesh looks as intended when I render the image with no alpha (black background). However, when I try to render a transparent image, the Corona's appearance fades away. I need help understanding why this happens and how to preserve the intended look of the Sun and Corona in a saved transparent image (if, at all, possible). Any advice or suggestions would be greatly appreciated!
Upd: I added the project file.
The render engine is cycles, no compositing.
The blend file:

Render (viewport):

Transparent PNG:

Search “PNG” here. It’s a broken encoding.

There can be many reasons. Please answer atleast a few of the following questions. Which render engine? Can you provide the screenshot of your shader nodes as well? Have you done any compositing work? If yes can you also share a screenshot of those nodes as well? If it's possible best way is to share the file itself.(You can use blend-exchange for that)

Added the file and answered @Akshay2005 questions. Apologies for the inconvenience.

I checked out your file. When I rendered out a PNG with transparency turned on, I had no issues. I was able to render a visible corona with the transparency as well. Mabye you had acidentally turned off the corona collection during the render. Please check again. If everything's ok and you are still facing the problem, check out what troy is saying about the broken encoding.

Did you save the rendered file as well? It breaks on save.

https://blender.stackexchange.com/questions/41574/render-semi-transparent-volume-with-cycles https://blender.stackexchange.com/questions/32900/how-to-properly-render-smoke-on-a-transparent-background https://blender.stackexchange.com/questions/222837/blender-does-not-set-the-alpha-channel-correctly https://blender.stackexchange.com/questions/34002/glow-effect-invisible-on-transparent-background https://blender.stackexchange.com/questions/43977/composite-blur-effect-cut-off-at-edges-with-transparent-background

Hello and welcome. This question seems to have already been asked in various forms over time and already has a multiple answers, but you never acknowledged any of the existing posts. We are not sure if you aware of them but none of the described techniques fulfil your particular requisites, or you simply didn't do any research at all. Could you [edit] you post and clarify how your question differs from the suggested duplicates? Otherwise could you rephrase it to focus on a particular step you are stuck with?

@DuarteFarrajotaRamos, apologies for the inconvenience. Indeed, I didn't search for the similar issues here thoroughly, mainly because I was struggling with articulating a search request. Some of these titles refer to color desaturation or semi-transparent volume which didn't occur to me as a valid search request because my corona mesh is not a volume, nor did I think about it as a color desaturation issue. I thank you kindly for the links, they should probably help.


text:
I don't understand stencil painting in texture mode
New to blender. I'm trying to "project" an image into a 3d model I have. I thought I could use stencil mapping mode. However when I try to paint, the model is not painted. The texture image is painted instead, and in random places. I have seen people using it and they can paint on their objects, but I don't know why in my case it doesn't work the same way.

The following are my settings:

Hello what does "The texture image is painted instead" means? You first need to unwrap your object, give it a black image texture, then paint with the texture you want. If it doesn't work please pack your images and share your file?

@moonboots what I mean is that when I try to paint with my pen/mouse, the texture image I'm supposed to project on the object gets modified with the strokes and not the 3d object. Like if I was painting the input image in an image editor. It even gets modified in the texture preview on the right.

you need to project another image on your character than the one you'll use to paint, is it the case here? Or please share your file

Please share your brush tool settings and if you are using a mask texture as well. Stencil should be loaded up and the brush color should be set to pure white to transfer the colors of the stencil pixels. Do you have the brush texture loaded as 'stencil' in the brush mapping in the tool, or do you have it loaded into view as reference instead?

@moonboots what I mean is that I want to paint my character's face. I have a 2d image of it. I thought I could use stencil to place my character in position and then start projecting the 2d image onto his face as I paint. But instead of that it appears I'm painting on the 2d image, not the character.

@CraigDJones I'll share my settings when I can but last time I checked, yeah, I had set brush mapping as stencil. I also tried with different colors, including white, but the behaviour was the same, it doesn't paint the character but the strokes appear in the image I'm using as texture (the character's face).

You have two different images in your brush settings - one mentioned in the image and one mentioned in the source there in the texture panel. They should be the same.

I managed to solve my issue. Turns out I had to switch the mode from Single Image to Material.

Yup, that'll do it

Stencil is a great way to add textures to your model, but there are a few caveats. You have to make sure that you have your texture for stencil projection loaded as 'Brush' in the Texture Properties panel. You need to then assign it as 'Stencil' mapping in the Texture panel of the Brush. Then, press Image Aspect to make sure any non-square images is presented as its original aspect ratio.

An alternative for some textures is to use the Clone Tool and set it to clone from texture slot. The image texture for this is added a s an image node in the node tree but doesn't need to be added into the original image. Best way to do this is to figure out if you want to use UV to map it or use Box mapping with blend turned up to get a more uniform application.

Thanks for the answer. I have checked but my settings seem to be right, I edited my question to add a couple of images. One observation I've made is that, every time I stroke it, the image form in the texture properties adds two buttons "Save" and "Discard" like if I made some changes to the texture and prompted me to save them.


text:
Character Rig - Knees Bending Incorrectly
I've been working on a custom character rig for my online image for the past while now, and I've managed to model my character with a decently working rig and somewhat-reasonable control blocks following this tutorial online: https://www.youtube.com/watch?app=desktop&v=1khSuB6sER0.
However, the problem occurs when I go to bend the knees using the IK constraint on the feet, where the knees bend inwards despite me having pole targets to prevent that.  Moving the pole targets moves the knees side to side, but the bones themselves remain pointed inwards.  In other words, the bones do not hinge properly like they should.
It's a little difficult to explain in words, so below are images and a copy of my blender file representing the overall model/rig (please forgive the control blocks, I have little knowledge on rigging so they may be abysmal lol), the model with its knees bent, a leg moved backwards, and the overall bones respectively;

I don't understand what is causing these problems.  The closest source I can think of may be an inherent flaw in the model itself causing these problems, but I am unsure.  I also would rather not have to re-group the model again, I do not have the knowledge or experience to do something like that in this stage of the project and it would be tedious for me to redo all of this work only to find that it may not be the problem.
This is a copy of my blender file:

P.S.  If there looks like there are missing bones like ones in the kneck or segmented spine bones, those are likely on purpose for the level of animation capability I want (rigid body structure with the head being able to move everywhere, amost like the Youtuber FUNKe's character).

please share your file, read the instructions here: https://blend-exchange.com/ if it doesn't work use another platform like workupload

Gotcha, just added the file link.

In your case, you have to lock the X axis of your calf and thigh bones.
For that, go to your Bones settings > Inverse kinematics > Lock X

That should do it, and if needed you can also tweak the Pole Angle of your IK constraint (but it doesn't seem necessary in your case).

Thanks!  I'll go fix that right now.


text:
Attach "variables" to objects to be used in Geometry Nodes
I'm currently working on a node-based building generator. It's purpose will be as background in an animated short-movie.
I have a set of blocks that I'm using, separated in collections :

Then, I can generate a building with multiple choices :

My question is as follows : how can I add to the "stories" part a boolean that will tell me in my GN if I can use a small balcony or not ?
These are objects outside of my building generator, so how can I transfer like "variables" from an object to another object's Geometry Nodes ? My idea would look like that, for each block, attach a bunch of fields that will be accessed from the outside (here the boolean + an extended concept with multiple values) :

My ideal requirements

No Python
Only some of the objects need to have a variable, currently only the stories part
I want to only have to touch the current block object and the building generator, whenever I'm adding a new block
I want to set these values when working on blocks (yes, in the building generator I can manually go through the indexes of objects and manually set for each one the values I need. But that's a pain.)

Current blend file

Any guidance on the best workflow to achieve that would be greatly appreciated. Thank you for your time :)
Simplified setup and issue (with blend file)
According to Chris answer, I've set an attribute on my objects that are used as instances, in the viewport. Problem is, as soon as I use Instance on Points with these objects as instances, I'm loosing their attribute.
The idea is :

Spawn a cube, pyramid or sphere
If sphere, then spawn a torus on top
Else, spawn a flat sphere on top
The constraint is : I have no mean of knowing which object I've spawned and I need to access myValue to know what to spawn on top of it.

I think the issue here lies somewhere around the domain of attributes. The geometry contains the myValue on vertex domain after Instances on Points, but we access it as instances and so we can't reach the attribute. I'm not sure.

it would be very helpful if you could add a very simplified blend file to your question so we can help you with that. Because now we have no idea how you made it....

My question is only : how do you attach a value to an object, to be used in another object's GN ? I can link my blend file but my question is high-level almost conceptual and I don't see how it would help to see the details. I'm afraid it will steer people off course.

(Using Blender 3.6.12)
The proposed approach is a workaround for Instance on Points node not transferring attributes from "input instances" to "spawned instances", unless a Realize Instance node is inserted. It is taking advantage that attributes attached to "input points" are transferred to "spawned instances", and that instances in a collection are always picked in the same alphabetical order. From that, a lookup table is built to gather user-defined attributes in relation with instance indices.

This view illustrates that only instances are generated, as required. The "RNGType" column is coding the index of the spawned geometry picked in the "Instances" collection. It is matching the alphabetical order of the "Name" column.
Resources:
(Blender 3.6.12+)

GeometryNodes modifiers

This GeometryNodes modifier is attached to each object in the "Instances" collection to set the value of the user-defined attribute "myValue".
1. This attribute is stored in the Instance domain, as a global variable the same for all vertices.
2. To do so, the Geometry has to be converted to an Instance beforehand.

This is the core GeometryNodes modifier with the cascading Instance on Points nodes.
1. Instead of plugging directly the Random Value node drawing the Instance Index into the first Instance on Points node, its returned value is cached in the attribute named "RNGType". To do so, a Store Named Attribute node set in Point domain is inserted after the Subdivide Mesh node.
2. Consequently, a Named Attribute node is plugged instead in the Instance Index socket of the first Instance on Points node. It is to observe (e.g. plugging a Viewer node) that the "RNGType" attribute is transferred from the Point domain to each instance returned by the Instance on Points node, along the "UVMap" attribute.
3. From this node, the "RNGType" data is travelling along the path highlighted with white stars. It is crucial to compute the Instance Index required by the second Instance on Points node. It is to notice that the Instances to Points node is transferring the "RNGType" and "UVMap" attributes from the Instance domain to the Point domain.
4. The lookup table is initialized as a Point Cloud made of as many points there are instances in the collection "Instances". This count is returned by a Domain Size node with Component set to Instances. The Position of these points is set from each point index $i$ to $(i,i,i)$, i.e. (0,0,0), (1,1,1) and (2,2,2) in the demonstration case. This index is again cached in Point domain in an attribute named "IDinCollection".
5. Through a third Instance on Points node followed by a Realize Instance node, a single occurrence of each geometry stored in the collection "Instances" are joined together into a single mesh. Along this process, the "IDinCollection" attribute (resp. the user-defined "myValue" attribute) is transferred from the Point (Cloud) domain (resp. Instance domain) to the Point (Mesh) domain. Consequently, each resulting vertex keeps the trace of the original geometry it belongs to through the "IDinCollection" attribute, as well as the trace of any attribute attached to the same original geometry. This can be observed by plugging a Viewer node after the Realize Instances node (see the section "Additional results about the lookup table" below).
6. To finalize the lookup table, the Position of these vertices is set from their "IDinCollection" attribute $i$ to $(i,i,i)$, collapsing the whole mesh onto the Point Cloud created at step 4. Only one vertex per original geometry in the collection "Instances" is kept using a Merge by Distance node. (NB: The Set Position node can be removed if the "Scale" is set to (0,0,0) in the Instance on Points node).
7. To query the lookup table, firstly a Sample Nearest node set in Point domain is used to recover the Index of the lookup table vertex the closest to the sought index stored in the "RNGType" attribute.
8. Then the value of the stored attribute "myValue" is recovered from the lookup table using a Sample Index node set in Point domain.

Additional results about the lookup table

The Spreadsheet Editor shows the lookup table under construction after step 4. It is a Point Cloud where each point is coding one row of the table. The main feature is the Position that is used afterwards to query such a row based on its index with a Sample Nearest node, independently of Blender internal indexing of vertices.

The Spreadsheet Editor shows the lookup table under construction after step 5. It is a Mesh collecting all the vertices of every instanced geometry. These vertices are carrying the attributes attached both to the Points (i.e. "IDinCollection" here) and the Instance (i.e. "myValue" here) they are spawned from. It is to notice that the Instance on Points node is transferring the attributes attached to the Points, while the Realize Instances node is transferring the attributes attached to the Instance. Both nodes are required to complete the transfer.

The Spreadsheet Editor shows the lookup table under construction during step 6, before applying Merge by Distance. Vertices are moved to the position defined by the index of the instance they are spawned from (i.e. "IDinCollection" here).

The Spreadsheet Editor shows the final lookup table after step 6. It has the same structure as after step 4, notwithstanding that it is a Mesh instead of a Point Cloud. The main addition is the column storing the user-defined attribute "myValue".
NB: A Point Cloud could be set from this Mesh where Blender internal indexing of points were matching the "IDinCollection" attribute, using the same process involving the Sample Nearest node. This way, the Sample Index node at step 8 could be linked directly to the Named Attribute node returning the "RNGType" value. The underlying logic is the same, but the performance could be better for large collections.

No worry thanks for your answer ! For now I have found a workaround I could live with, so tranquille :)

is that what you want to achieve?

so you could add an attribute:

and set that for one balcony to 1.
to set it, select your object, go to edit mode, select all vertices and then:

by the way, of course you could also set it by just adding a geometry nodes tree to each object/balcony with just a store attributes node set to 1/0.

Not really, I want to transfer a value from instance object to this GN. Thank you !

ah, do you mean from your collection info object?

I'm not natively speaking english so I'm probably badly explaining my issue. What I want is variables/field/value/data on my instance objects, to be accessed inside of the geometry nodes of another object (the generator). Of course I can lay down rules about indexes manually in GN but that's a huge pain. I need something to do on my instance objects (outside of this geometry nodes) where I can see things and not spend too much time playing with index.

no problem, maybe i am just to silly.... ;)

Wait I'm the one being silly ahah : you can access attributes from other objects ? And I've never seen this panel ! I think you may have just resolve my question.

yes, you can add any custom attribute to points/edges/faces and use that. That's pretty powerful and a lot of add-ons use that. But "normally" you could use a custom property on object level, but i think you cannot read that in GN - this is a bit too much because it is vertex level - but it works ;)

But how do you "set it to 1" ? I don't see any option about setting values (in your last screenshot as well as in my Blender).

i updated my answer. And i don't know why you cannot set that on right click on that attribute. That's not very intuitive :(

Geez you've unlocked a dozen trillions neurons in my brain. You just solved multiple things I had in mind. Many thanks !

you are welcome!! I learned as well a lot of your answers here! (and comments)

I'm unable to make it work. Problem is, the balconies now contains the boolean in each vertex, but the balconies are used as input of the Instance on Points which kills the attribute of the Instance input and only keeping attributes of the Point input.

did u use realize instances like i did in the image?

I can't, I need to keep them as Instances. I've updated my question with a simpler setup.


text:
Compositor in Viewport : footage and render misalignment
I'm trying to add elements to a footage. To be able to align the elements in real-time, I'm using the viewport option Compositor > Camera. My issue is that the footage and the render don't align most of the time. In camera view, as soon as I move the view or zoom, what is aligned in the compositor is misaligned in the viewport. I've tried every settings of the Scale node with no success.
Here is my compositing nodes :

So I'm compositing together :

A HD footage (1920x1080)
My scene
A mask to define what part should be replaced

With trial-and-error, I've come to the conclusion I need a Scale node for both the footage and the mask. But I'm unable to find a setting that works in the compositor and the viewport.
Here is an example of how the elements are misaligned, in the viewport (camera view) :

As you see here, the yellow circle (a lamp gizmo) should stay at the same place in the render but it doesn't. To summarize the issue, here are the different possible settings for the Scale node of the compositor when panning or zooming in the camera view :
No scale node

Scale : stretch

Scale : fit

Scale : crop

What settings should I use, so that the footage follows correctly the camera view in the viewport, and stays aligned also with the mask ?
The solution may be super simple, but that's the first time I'm really using the compositor in the viewport.

what version of blender are you using?
I had a similar issue compositing real footage with cg.
in my case, i think the issue was only with the real-time compositing, and when rendered, everything scaled and moved correctly. I think the realtime part was fixed for me in blender 4.1 or 4.2.

@JohnCheathem I'm on Blender 4.2.0. Everything works fine for me when rendered, it's really about having the same result in the viewport in camera view.

ah i see, i ended up putting an emmisive plane in the background alligned to the camera view perspective and size, and had the video on that for real-time previewing. kinda hacky.

@JohnCheathem Good idea ! Not perfect but works. Thank you

Happy to help! i think there is a free add on for blender to auto create planes perfectly alligned with the camera at any distance. might be helpful.


text:
Weird Blurring Effect When Moving Model in Viewport Shading
My mesh keeps having this weird blur effect in viewport shading whenever I move it or animate it.  I used the materials properties tab to color the model since I am not using any complicated textures, but whenever I move the object in viewport shading the colors will "shift" or blur then become sharp once I stop.
It's hard to explain, but it worsens when I zoom out, sometimes to the point of becoming unrecognizable with smaller details.  I've recorded a short video showing the problem with the central area of focus being the glasses and other head details.
I cannot find anything online for a solution, and have searched multiple times for similar problems but have drawn a blank.
Video link: https://youtu.be/SZZd8GDIPb8
File:

You're using a pretty old version of Blender (2.92) and have you checked that you have the latest graphics drivers installed for your machine?

I've updated both Blender and my drivers.  If anything, it's actually made it worse.  Is this a problem with me using the materials manager to color the parts, or is it maybe a setting I have turned on?

I've never seen anything like it using Blender to be honest. Maybe share your Blend file using File > External Data > Pack Resources first to see whether it happens on anyone else's machine here? If the packed file is smaller than 30 Meg you can share it via https://blend-exchange.com/ following the instructions there to copy the link on that page. Then edit your question here and paste the link into it. Alternatively use an external file sharing site.

Alright, I'll do that once I get back to my home computer, thanks!

Adde the file to the post!

I agree with @Kid with Glasses that it's probably just the speed of your machine graphics trying to render a fast-moving object. For what it's worth it doesn't do it here on this fast PC and in any case I can't see that it would be noticeable during normal animation.  Just for your information the normals on the left fingers and the face of the glasses are inverted on your object. (Red with Face Orientation enabled on the Viewport overlays menu.) Select All in Edit mode then Shift-N to correct. The right lens will have to be flipped using Alt-N > Flip.

Thanks, I'll try that.  If it's connected to the issue, I use a 1070 I believe in my computer as a grahics card.  Also, unfortunately it does occur during animations as well, it was actually during mid-animating that I noticed it :/

If I understand you correctly, that is the Eevee engine that powers the material view processing. It might be rendering the samples slowly enough to make it to where you see each individual sample being rendered. With each sample the render gets clearer, but on the first sample, it usually is a little blurry, especially with high scale or detail in a noise texture for the material.

I tried changing the graphics engine but it didn't alter it, I'm wondering if this is just a computer hardware problem.  Although, my Yoga i7 laptop does it, too, so I am unsure.

Is there a way to nullify those effects?  It's the biggest problem I'm having right now and is stopping me from creating animations.  I could try my laptop, however I feel that my PC is stronger than the specs it has.

@SmartToaster4K I'd have to suggest disabling any extra checkboxes in the Render properties, and then just turn them back on when you render. That won't eradicate it completely, but it might help (a bit). Another thing I'd suggest: in the material properties, scroll down to Viewport Display, and make a preview color (no image or bump mapping). This will show that color (only) in the Solid viewport, which would, theoretically, eliminate the blurring you see. In the end, it would probably be faster to switch to Solid viewport mode to animate and then switch back when you are done.

I just tested out swapping to the Solid viewport and it seems to have entirely eliminated the problem, thank you!  It won't have the level of appearence the Viewport Shading has, but I can what I can do with it.  I could try animating in the Solid viewport and swapping back, but when the animation plays it still blurs.  I'm probably going to mess with the first method and see if the result looks good, and then I might see if I can test this problem on one of the better computers at my house to determine if it could also just be a graphics card issue.


text:
Faces visible through other objects when viewed at a range
I'm trying to render a building, and the top of the building is partially showing through the platform on the roof when I pull back the view. The platform is already .1m above the roof. I can make it no longer show through if I raise the platform more, but then the platform is in the wrong place.

When I zoom in, there isn't a problem. Is there a setting I'm missing or something?
The building is 300m tall. The clipping goes away when I space it 1m from the roof. This example shows clipping at .1m. The camera is about 500m from the building.
The surfaces aren't overlapping, so I wouldn't think that z-fighting would take place, even though that's what it looks like.

What is the Scale and Dimension of the building an roof?

Does this answer your question? Cause of black artifacts in render?

Check the clipping-range of your camera is appropriate to the  min and max camera -> feature distances during the shot. (In extreme cases, you can  key-frame those)

@Leander, these faces are not overlapping, so z-fighting shouldn't apply, unless I'm hitting a resolution limit I'm not aware of.

Yes, probably the latter. Listening the Robin Betts' advice will redistribute the buckets considered same depth, so if you decrease the clipping range, the visible range will be smaller and so each bucket will be smaller and it will be less likely for two faces to end up in the same bucket.

It is still z-fighting caused by the limited precision of floating point numbers. Did Robin Betts' suggestion solve your problem.

So, funny thing, I was looking at the object in the viewport, not through the camera. When I switched to the camera, the artifacts went away. Was not expecting that.

Viewport can have different clipping range than camera.

@MarkusvonBroady, so it would seem. My apologies for bugging you all with a noob issue. Would one of you like to post that as an answer, or should I take a whack at it? I can alter the question with details as necessary.

https://blender.stackexchange.com/questions/5201/how-do-i-increase-the-render-distance https://blender.stackexchange.com/questions/1385/shadows-along-edges-of-mesh-in-3d-view https://blender.stackexchange.com/questions/8553/why-does-part-of-my-model-disappear-when-i-zoom-in-on-it-in-the-3d-viewport

Thanks, @DuarteFarrajotaRamos. The issue seems to be that there are numerous pieces of information that need to be combined to solve this problem. "Z-fighting will produce these artifacts," "Clipping needs to be set separately for viewport and render," and also "Broader clipping range can induce z-fighting" None of the listed questions actually combines these, so I'll write my own answer.


text:
How do I change a light's power with two bones using drivers?
I have a rig that has two bones named "cover" and "panel", to simplify lets say these two bones go from 0 to 150, I need it so that when cover is 150 and panel is 150, the light's wattage is 150, if cover gets turned to 0 but panel is 150, then the light's wattage is 0. Vice versa for when panel is 0 and cover is 150. What I have in my drivers is :
0 if (cover == 0) else panel*500 if (cover == 0.167 and panel < 0.3) else cover*898.201

0.167 being the maximum "cover" can go and 0.3 being the maximum "panel" can go.
panel*500 and cover*898.201 just makes them both equal 150 when at max distance so ignore that.

What my problem is that operator "==" does not seem to work at all in blender for whatever reason.
It always will give me cover*898.201 as the output even when the bone, "cover" equals 0.167, which should be giving me panel*500 as the output.
Edit: To put this into context, the rig is for a device that has a flame on it, cover controls a cover that closes around the flame (aka, at 0 is closed and at 0.167 is open) and panel controls a sort of focus for the flame, where if the panel is open or “unfocused” (aka, at 0.3) then a point light (the light I want to control) is at 150 watts, and when panel closes or “focuses” (aka, at 0), the light is focused and the point light is off and then a spotlight is turned on. What I want is that so when cover is closed, the point light is 0w, when its open, the light is 150w. When the panel is focused, the light is 0w and when unfocused, its 150w.
Also I didn’t include in my original post that I need it so that when the cover is say, closed half way at 75w, and panel is then focused, then it would now go from 75w to 0w instead of 150w to 0w like if cover was fully open

Asking for cover to be equal  to 0.167 in floating-point world is a bit  much to expect. You would be better off asking for cover to be in a small range around 0.167.  But that might make your expression rather long-winded. If you can explain what you expect the functions of cover and panel to be.. their behaviour, we might be able to simplify it.

Added more context to the post to hopefully give you a better idea of what I am wanting to do.

Is this something like where you want to go?

That is actually exactly what I am wanting to do. This works perfectly! Thanks a ton.

Great  I'll make an answer of it.

With the posted approach, your expression winds up a bit tangled. Although it might cost us a few more driver-connections, perhaps it can be simplified by breaking out the parts.
It seems we're looking for two controls, maybe named more suggestively: Focus, and Dimmer. They can be defined as 0-1 float Custom Properties on the Spot component of your light-combination.

Focus will drive the intensity of the spot, as a multiplier of its maximum  strength.
1-Focus will similarly drive the intensity of the point component. (So Focus becomes the 'Fac' in a linear mix between the point and spot)
Dimmer multiplies the intensity of both components, (effectively, the intensity of the mix)
For a more even transition between spot and point-lighting, Focus can also be used to control the 'Size' and 'Blend' of the spot.

If you're not happy with the strictly linear relationships, you can adjust the (Driver on X,Driven on Y) f-Curves associated with the driver expressions, in the Driver Editor.

(In this .blend, the Custom Properties are themselves driven by the location of the triangular slider-objects)


text:
All material went black when Material output set to cycles
When I change my Material Output from all to cycles, the material went black
This is what I want to do How to EXPORT MATERIALS from Blender to Unity 2023
When rendered with cycles the material appears normally
How do I fix this, Thank you
with eevee

with cycles

As Rich says in his answer, the default is having the material output set to All. Using only one of them almost always only makes sense if you want to have different material settings for Cycles and Eevee. But since you linked a tutorial as what you were trying to do, I wonder why on Earth did you change it from All to Eevee or Cycles later? They have it at All in the tutorial as well, there is absolutely no need to change the default.

I thought I have to change it to cycles because when I bake it everything it renders is black but I just choose the wrong bake type

The Material Output node can be set between All, Eevee and Cycles and defines which render engine the material output is intended for. This allows you to set up multiple material outputs that are tailored to a particular render engine’s strengths.
The default (all) is active in both render engines. The ‘Cycles’ setting is only active when rendering in Cycles while the ‘Eevee’ one is only active when rendering in Eevee.
However, one thing to bear in mind is that Material Preview mode is always rendered using Eevee. This means that by only having one Material Output node and with it set to ‘Cycles’ only, you will effectively completely disable that material in Material Preview mode.
You could add another Material Output node set to ‘Eevee’ and set up that so that it renders a suitable Eevee-friendly substitute material to use in Material Preview.

Thank you, I now understand


text:
Is there a way to do a boolean union on many objects at the same time?
Is there a way to do a boolean union on many objects at the same time?
I've recently finished the donut tutorial series and want to do a 3D print of the final product. I'm planing to print the donut as one object and the icing and decorations as a seperate one (I have made the decoration instances real). In order to make this work I'm trying to union the icing and decorations collection, but blender will not acept the collection as the target for the operation, though it will let me do it on one decoration on it's own. Is there a way of doing a Boolean on a colletion?
Thanks for the help. Both the solutions surgested work :)

There is an Operand Type > Collection in the Boolean modifier, is it not working with your collection? Only from reading your words I'm not sure if I understand what's going on there to prevent it from working...

Ohhh. I hadn't noticed that option face palm yes it works if I set it to collections, thanks

An easy way to quickly combine multiple different objects with union boolean operations is with Blender's handy pre-installed Bool Tool addon.
To activate the addon, simply go to the top left of the Blender window, select edit, and from the drop down menu select preferences at the bottom. Then go to the Addons panel of the preferences menu, and type "Bool" into the search bar.
Activate the Bool Tools addon, select the triangle drop down to expand the addon info, and make note of the shortcut/hotkey to use the addon.

Now with it turned on, you can then select all your objects you want to combine. Use the hotkey (in my case on mac its Ctrl+Shift+B), then select union.

You should probably mention that this is the destructive way of doing it, already applying the Boolean modifier and deleting the other objects - which might not be desired. And using the non-destructive way with the Bool Tool does it with each object individually, not with a collection - which is much more handy if you want to add objects to the collection afterwards.

Boolean has Collection feature, just add boolean to "solid" object with intersections in it and switch to Collection type in boolean.
It will automatic cut of all intersections (more dense mesh more time to compute).


text:
Baking Multiple Overlapping Textures With Transparency (Cycles)
I am running into an issue with baking. I have a large number of overlapping quads, each using a texture that has some transparency. However, when I try to bake them all onto an object, it only takes the outer-most quad, clipping all of the quads below it, instead of combining all overlapping quads based on their alphas. Here's an example of what I mean:

Is it possible to bake like this? I have tried baking normals, emission, diffuse, and combined, but it seems no matter what I try the bake only prioritizes the outer-most quad.
Here's my mesh:

And here's what it bakes out to:

There should be a lot more overlap in the baked texture, but instead the transparent parts of the quad overlap.

I don't think you can bake it. If your case is based on planes (faces) covering sphere (and they overlap or are on top of each other) baking wouldn't work.

Baking to the same object
... takes a pixel at that location and bake it to a new image texture.
Baking to another object
... I assume you are using Selected to Active with Cage enabled, since original mesh are planes distorted on sphere and you are baking to another sphere. The baking ray is shot from cage surface in face normal direction and when hits a surface ray stops there and bake a value from that point. It means Alpha is not included in ray distance calculation only geometry.
Note: The pieces of colors in your second image of baked Normal map (that didnt blend in overall gradient) are probably texture seen through a gap between planes on the opposite side of sphere (a bake ray goes between meshes and hit a surface on opposite side).


text:
How to fix all the flicker when rendering
I made something in Blender today. But when I rendered it has some black streaks flicker around the faces of object. I'm not sure how to fix the problem, I tried a few methods but it didn't work out for me.
This is the gif and images:

Here is my render setting and my geometric nodes:

Are you using the denoise? If so, what does it give if you disable it, or change its settings, or increase the Sampling?

You might need to provide a lot more information about your rendering settings -- perhaps a screenshot of the render panel with several fields showing.  I agree with moonboots that "denoise" can be one source of this aberrant result.

Seems like it would be overlapping faces

@AllenSimpson I agree, looks like overlapping faces to me as well . But since I don't know how the object was created I cannot suggest a way to avoid them, only that they should be avoided.

@moonboots Thanks for your suggestion. I'm not sure but the denoise that you're talking about is the viewport denoise, right? If so, I tried to untick the denoise and increase the sampling but it doesn't really change.

@james_t Thank you. I just added some screenshots of my rendering settings above, I did try to tick off the denoise but seems like it doesn't change.

@AllenSimpson Thanks for your comment. I made the objects with geometric nodes (I just added the screenshot of my geometric node above). I also think it overlapping too, but that is the main thing about the object. Is there any way to change it?

@GordonBrinkmann Thank you for your info. I created the object with geometric nodes, the same way to create the city. I just added a screenshot of my node above. I also believe it overlaps faces as well but I can't really change it because it is the whole point of this object. Do you have any suggestions to remove the flicker things or reduce them?

the gif is too small to really see what's going on. The screenshots make me think about z-fighting.


text:
Blender to Godot scale
I downloaded a 3D truck and a semi-trailer from a 3D Graphic web site and loaded it into Blender. After separating the wheels into a separate Blender file as well as the truck body, I then exported these files as glb to use in Godot.  They loaded into Godot perfectly. My aim is to do a physics animation.
The issue is that the new truck is many times bigger than a Godot vehicle.node tutorial I had used for a car that came with the tutorial. The Godot wheel node radius was 0.5, but my imported truck wheels are 1.952m.
One thing I am concerned about is that if I shrink the truck I might have problems. When I did a Blender tutorial of a steel ball swinging on a chain to knock down a pile of blocks the tutor pointed out that the chain links and the ball were a several meters in size according to Blender measurements. He said he had to make them that size because Blender couldn't handle the processes at real sizes. The graphics would get all tangled up if he tried.
So how would you handle this? I need room for some parts of the semi-trailer that is attached to the truck. The functioning of these parts is important. Could Godot handle this? Should I shrink the truck and trailer in Blender or Godot? Reset the measurements in Godot?

In my experience, it is best to get the model as "right" as possible as early as possible. So I'd do all the scaling in Blender before exporting.
To do so, it is best to set Blender scale units to "metric"

(if not already so) and then scale everything to real-world size.
The most important step is now to

apply all transformations. Then, your exported geometry should come into Godot the right size so your physics will be all correct.
As for your concern that blender physics could not handle real world sizes: This may be somewhat true if the real world objects are very large. If you want the truck to behave realistically, it should have its real size.

Thank you haarigertroll!  What properties can we add in Blender that will successfully export to Godot and which format? What about weights?

AFAIK, physics data like weight is not transmitted in any exchange file format (best use GLTF) between Blender and Godot. So get your geometries right in Blender, import them in Godot and set your physics properties over there.


text:
How do I delete an accidental Loop Cut?
I have accidentally inserted an edge loop using "Loop Cut".
To remove it, I click an Edge, then I choose Select Loops -> Edge Loops.
Then I press Del on the keyboard, then Delete Edges.
This removes something else.
What am I doing, and how could I delete just the accidental edge loop?

Select the whole loop you want deleted (loop select, alt RMB on loop for me) then delete (x) -> edge loops.

@Nathan It doesn't work for my blend file. It leaves some artifact edges, and I don't see why.

If it's not a continuous loop, it will turn borders into triangles in preference to turning them into ngons.

@Nathan I am pretty sure that before my accidental loop, the "hole" was without the 2 edges.

Deleting edges operator was never expected to leave faces in place, it deletes edges and faces if those deleted edges were holding faces. X > Dissolve works just fine, in this case as well. Edges left are not "artifact" edges rather edges necessary to support the indent in the center since Blender doesn't support Ngons with holes without any edges holding those holes

Select the loop cut, press X , and select Dissolve Edges.

This doesn't really work. It leaves some artifacts. You can see that when you try my blend file.

You can press 2 on the keyboard and press Cmd and x (or X and dissolve edges).
These artifacts that you get are necessary for the hole, so that Blender knows that there is a hole there.

@user92758 I am pretty sure that before my accidental edge loop, the hole was there without any edges around it.

Then you have to do 2 times a edge (ctrl and j) between a Vertices of the hole and a Vertices not on the hole


text:
How can I have all my animations attached to the same object/mesh in unity?
I am following this tutorial on gun animations Blender FPS Rigging & Animation Tutorial and in the video for exporting the animations, he demonstrates exporting the mesh with only the animation, the reload. Due to the fact that the gun drives the motion of the arms, I understand each animation may need to be exported separately from blender. And also because each animation has a different number of keyframes.
However, when I import the FBX into Unity, I would like to have a single mesh with the walk, reload, shoot, idle animations on the same mesh. As it is I would have different meshes each  containing a single animation. This is not ideal at all. It's fine having the gun separate from the arms, that's no problem, but I would have to have multiple guns and multiple arms just to have these few basic animations.
How can I have the arms and gun in unity with all four animations on the same objects, one arm mesh and one gun mesh.
Is this possible? Thanks is advance!

I would have though that should be a question for a Unity forum rather than a Blender Q&A site?

Oh I wasn't sure, I thought it would be ok to ask here as I am using blender for the animations and exporting. Could you still offer help ? else I will ask on unity forum

I don't know much about animation and exporting to fbx files, but it might be worth looking for tutorials on Blender's NLA (Non Linear Animation) editor.

Can't check it right now, but maybe try the "Alembic" format? It is a bit more powerful, afaik.

I've been looking up about NLA and Alembic and I don't really know how to apply or use them for my specific problem. Thanks for the suggestions and I will continue to investigate. If anyone has done a similar animation, could you please explain how it's exported for use in Unity. Sure it's a common thing, but hard to find answers.


text:
Solved - Combine multiple render regions with different sampling values
I'm trying to render twice the same scene, the first time with few samples, the second time with more samples but cropped for faster rendering.
Then I want to combine them in the compositor in a blank scene.
The problem is that the cropping doesn't work even though I checked "Render region" in the Output properties tab:

And if I render from the cropped scene, everything gets cropped:

Is there any way to selectively activate the cropping?

How do you 'Activate' the cropping?

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 do not understand your compositing at all because with fac == 1 in alpha over you will only get the 2nd render for further compositing. Is this really what you want?

@CoolCoder I just used CTRL+B

@Community I was trying to get more rays on some parts of my image without recomputing everything.

@Chris yes indeed it is intended as I the cropped rendering is transparent apart from the rendered zones.

I also have to be in the compositor view when I render it to make it work
:)

I turned on 'render single layer' in the view layer proprieties and it worked:

Thank you so much @Nick ! By ticking 'Render single layer' and by using the Film icon on the Render nodes instead of pressing F12, it worked perfectly!

Actually I was trying to get a faster rendering of my image with few rays in general and more rays only for certain areas. With the solution provided by Nick, I'm twice faster globally with a perfect definition for my point of interest.
Here is an example, voluntarily extreme :


text:
Why doesn't "selecting similar faces by area" work in my case?
When trying to select faces by same area, all the faces get selected instead only the similar ones.
I don't understand if I'm doing someting wrong or if the option has limitations/bugs?
See the snapshot below and file enclosed if needed.

If you have the answer, accept and upvote it or if you find it on your own, post it as the answer yourself. You should not edit the title with the answer. The title should be short and informative and summarize the content of the question. "Why could selecting similar faces by area not work?" would be a great title for this question, because that's essentially what you were asking.

Modification done!

Your object is very small, lower down the threshold:

I had never seen that option ^^'. It worked! Thank you!


text:
Can't pass UV map from geometry nodes to material
I want to apply an existing material to an added geometry from the geometry nodes.
This might seem an already answered issue but following different tutorials and browsing existing questions, I can't seem to make the 'classical' approach work.
For example I tried How to get UV for the generated grid in geometry nodes? without success.
Here is my setup below with the UV map passed as attribute. It's very basic but whatever I do I can't get the right UV map in the shader.
What am I doing wrong?
EDIT : I'm using Blender 3.6

...the node Set Material is missing. Without it, no material is assigned to the geometry created in Geometry Nodes.

It is already there. It's the Set Material Index that you can notice.

There is a difference between Set Material and Set Material Index. When you create a new geometry with Geometry Nodes, no material is assigned yet and therefore you cannot set an index. ...or does the object itself already have one or more materials?

...maybe helpful: https://blender.stackexchange.com/questions/279136/

Indeed, Set Material was the solution. That's actually very misleading if Set Material Index doesn't 'Set' anything but is only able to 'Pick' something preexistent.
Thanks for your answer!

And yes the object already had a material (top left corner).

"Join Geometry" works similarly¹ to object joining in regards to materials. After joining, all faces still point to the same material they pointed to before joining, but the material indices get updated to minimize the number of such indices. For example:

Mesh   1
Mesh 2
Result of Joining

0 red
0 no material
0 red

1 no material
1 yellow
1 no material

2 red
2 blue
2 yellow

3 yellow

3 blue

So first the materials from first mesh are added, then from the 2nd mesh, 3rd mesh, 4th mesh etc.

Red
Empty slot
Red
Yellow
Empty slot
Yellow
Blue

Then for each material check if it is a duplicate (i.e. also exists earlier on the list) - if so, remap all faces using this material index to the index of the first occurrence of this material, remove this material slot and shift following material slot indices to the left:

Red
Empty slot
Yellow
Empty slot
Yellow
Blue

Red
Empty slot
Yellow
Yellow
Blue

Red
Empty slot
Yellow
Blue

In your case you have a starting geometry with some material, and a new geometry without a material:

Mesh 1
Mesh 2

0 some material
0 empty slot

Then you set all faces of Mesh 2 to material slot 0, which is a no-op, because they were set to that by default. And finally you join:

Mesh 1
Mesh 2
Result of Joining

0 some material
0 empty slot
0 some material

1 empty slot

Upon joining, the faces of Mesh 2 have their material slot updated to 1, because without the update the material they point to (None) would change, which is not a desired behavior.
Keep in mind, setting the material index to 0 would work, if you did it after joining, by e.g. capturing a boolean attribute and using it as a selection.
¹ - the difference is object joining keeps repeated materials of the active object.


text:
Problem when adding shaders to simulate glass
I am trying to get better dispersion glass and was exploring different solutions.
When I tried to do light addition with Principled BSDF shaders, I got a weird lighting as if it were emissive.

When I did it with glass shaders, it was better but very dark in cavities.

Which I assumed is the good old 'infinite ray depth' issue in glass and can be fixed by adding a threshold for transparency :

The normal glass shader looks like that for comparison.

My questions :

for my knowledge, why is the Principled BSDF exhibiting such behavior?
why are additive glass shaders behaving worse than the original? Is it the randomness of rays in the solver not fully matching for each primary color (R,G,B)? But then how to improve it?

it's not just the shader, it's also the light and the light path -> how high did you set the transmission/transparent light path?

For the first case, everything is in the snapshot, it is only Princ. BSDF with 100% transmission.
For the third with the Light path, I considered the physics of reflections and transmissions occuring naturally in glass, up to infinity. See this image (I don't know how to put images in comments) : https://www.researchgate.net/figure/An-important-scatter-path-is-shown-here-which-is-caused-by-multiple-reflections-within_fig8_252687360

Complementary comment : the Light path setup considers that after a certain number of reflections/transmissions not so much details are added and that it would require to increase a lot the number of maximum bounces of transmission and glossy, so an arbitrary cutoff is applied after 6 interaction in this case to make the ray transparent instead of becoming dark due to not enough bounce computation.

pls provide blend file so we can check it out and improve it. thx.

File added. Thx.

is this what you wanna achieve? [1]: https://i.sstatic.net/CbbxQWSr.png

Kind of. Above all, I wanted to understand with the PBSDF has this emission-like effect and how to better converge when adding glass shaders after separating light in primary colors. If your image is the answer to this questions, then yes.

ok, sorry, i just hoped you wanna make glass look good ...i am no expert in these "theoretic questions" - sorry for that. I added some light and texture and increased light path ...and then ended up this: [1]: https://i.sstatic.net/Tp54RZhJ.jpg

Yes, it's more theoretical indeed. But your image looks very nice! Happy to discover your node setup anyway. Thanks for your contribution!

I have to point that out... You have a weird way to select colors: https://i.imgur.com/xlIzv7v.png

This setup is meant to be able to separate any glass color in the 3 primary colors. It is used in many glass shaders. In this example it is not essential indeed, but not weird nonetheless.

But you can put any color in the glass shaders' color inputs themselves, no need to use two extra nodes just to make sure you have a pure red when you can already put a pure red in the color input. It's like if you used math nodes to make 1 - 1 instead of writing 0 in the Roughness input, it's the same thing at the end, but you wasted resources and you make it harder for you

In order to make a dispersion glass shader (as shown in the accepted answer for example), it is needed actually. You can't just send the main color to the 'red' 'green' and 'blue' glass shaders. As I said, in my question above, it was superfluous, but for the targeted case, it is absolutely necessary.

Oh yes in the case you don't use pure white as main color indeed, my bad.

-- No worries  ;)

Why does your shader with Add Shader is darker ?

By adding together the 3 colored Glass shader, you are asking from Blender to :

Let only red light pass through
And let only green light pass through
And let only blue light pass through

The result is that no light passes through, unlike in the case of a white glass shader. The only light reaching the shadows will be indirect light bouncing from other surfaces, not refracted light.

Why does adding 2 Principled BSDF is emitting light ?

Disclaimer : I'm not 100% sure about that one.
Principled BSDF also have a glossy component. You could bypass it by adding roughness (then glossiness is 0), but then you'd loose the clear glass refractions you currently have. So by adding the shaders, the object emits 2x more light from glossy lightrays.
Custom prism shader
I've build 2 easy shaders. The first one is simple, it works but RGB will be separate and not really realistic. The second one is a bit more complex, using White Noise texture as a base to blur the IOR (credits to this video).

The mapping node is only to translate the white noise for each channel and be sure we don't have some kind of overlap. I think it's useless because of the different IOR.

The first shader is actually exactly the one I mentioned in my question and I also know the second one, but I wasn't asking for shaders proposals. In any case, thanks for the explanations in the first part as that's exactly what I was looking for.

So all the shaders of my question behave how they meant to. It's not a bug.

@JagJB That's right I don't think it's a bug. Cycles is already some years old now, I would expect that kind of bug to be detected by now. But I'm only 80% sure of my answer.

I know it's not the answer, but you wanted my node setup:
here it is:

The "rest" as i wrote in my first comment, are "other" things.
these are my render settings:

light path:

i know, that they don't have to be all 60, but it renders fast anyway.
important are these:

transparent + transparent glass
then i just gave that plane a shader, added 3 lamps and a background hdri.
result:

if you need a blend file, let me know.


text:
Getting BMesh Face Index from UV Face Index
I want to iterate over the square blocks of the UV map from left to right (and then top to bottom) and find the index in bmesh of the face(s) contained in each of the block (one block can contain multiple faces and vice versa).
Is it possible?
Edit:
Even better would be to be able to find the bmesh face indices corresponding to the UV islands.

Uv data can be found in the bmesh custom data loops.

The APIs mentioned here start from bm.faces and map to UV. My need is starting from (or iterating over) UV and mapping on to bmesh.

Each Bmesh Face has it's loop of vertices. You get to the UV coords through them:
uv_layer = bm.loops.layers.uv.active
for face in bm.faces:
    for loop in face.loops:
        print(loop[uv_layer].uv)

There is no UV Face Index, this is all that is exposed from python API. You don't get access to what is displayed in UV editor.
You can make your own class of UV_Face and populate an array with it. Each UV_Face will carry the index of Bmesh face and UV coordinates of its vertices. Then you can calculate a median center for each UV_Face and sort the array based on that to have it in left-right top-down order if you need.
If you need UV islands, you will have to match UV coordinates of same values, see what UV_Faces touch at least in an edge, and construct the islands from there.


text:
Orthographic coordinates
In my script, I need to find the screen coordinates (2d) of some points in the viewport. The condition is that the relationship between the points from 3d has to be maintained in 2d as well (like parallel coordinates should also be parallel in 2d).
With location_3d_to_region_2d I get the right coordinates only if the view is in orthographic mode. But if the view is in perspective mode, the perspective correction causes distortions. How do I get the orthographic coordinates regardless of whether the view mode is perspective, orthographic or camera?
(I also tried changing the view mode to orthographic through the script itself. But for some reasons, the location_3d_to_region_2d call returns the coordinates of the old mode.)
Edit: Here's an illustration. The two lines are parallel as can be seen in the orthographic views. The screen coordinates of the orthographic view maintain this parallel relationship between the lines (the same slope for 2d lines) whereas the perspective view doesn't (different slopes, the lines are clearly not parallel). I need the screen coordinates of orthographic view, even if the viewport mode is set to perspective.

Hello. Could you add some pictures to clarify about the relationships you want to maintain?

@lemon I have added an illustration and clarified the requirement further.


text:
Finding maximum coplanar points
I have got a set of points and I need to find the plane that would contain the maximum number of these points. Is there a simple way to do this, without trying out all permutations?
Update:
I am giving an illustration below:

The red dots are the points that exist in 3d space. There can be several planes like A, B, C, D that would contain 3 or more of these points. However, the plane A contains the maximum number of them. I need to find this plane (or to be more precise, the points on this plane).
Update2:
I am giving below the code I had tried earlier. This coincides with the approach suggested by @hatinacat2000 and looks to be the best available option:
import bpy
from mathutils import Vector
from itertools import combinations

def main():
    o = bpy.context.object

    # Take sample test points from Bezier curves
    # (you need to create curves having coplanar points
    # by subdividing 2d segments for example)
    bps = [bp for s in o.data.splines for bp in s.bezier_points]
    loc = [bp.co.copy().freeze() for bp in bps]
    l = list(combinations(loc, 3))

    # Map of {normal vector: 3 point combination for that normal}
    # Normal rounded to 3 decimal places
    normalsCos = [[Vector((round(((c[1] - c[0]).cross((c[2] - c[0])).normalized())[i], 3) \
        for i in range(0,3))).freeze(), c] for c in l]

    normals = [n[0] for n in normalsCos]

    # Map of {count: normal}
    nmap = {normals.count(n): n for n in normals}
    maxCnt = max(nmap.keys())
    normal = nmap[maxCnt]
    coTriplets = []
    for nc in normalsCos:
        if(nc[0] == normal):
            coTriplets.append(nc[1])

    # These are the required points
    planeCos = set([c for t in coTriplets for c in t])

    # And the remaining points...
    remainder = set(loc) - planeCos

Update3: Please see the answer from @lemon. It has got a huge performance improvement over this code (this is more of a POC), and also considers parallel planes.

What you have is no easy problem. It is called Least-Squares Fit and I'd suggest using some already made library to solve it, like for example the Ceres solver: http://ceres-solver.org/index.html.

Also I don't think finding exactly co-planar is what you need, because in a set there could be only 4 co-planar points giving you some random plane, while the rest of the points would sit almost on a plane but not quite.

@JaroslavJerrynoNovotny Thank you for the input! Maybe I was not clear enough in my question. I am not looking for a plane that will be nearest to all the points. I don't know the math, but I guess that's what Least-Squares fit will give (and I may be totally wrong). To illustrate my problem, let's say there are 7 points, and there exists a plane - A - that contains 5 of them. There would of course be other planes that contain fewer than 5. I just want some algorithmic way to find this plane A.

Are there any additional constraints, for example the distribution of the points or distance between the points on the plane?

@rjg The coordinates of the points in 3d space are available, so the distance between them can be calculated. There are no constraints, these points are just randomaly distributed in space. And there is no plane as such, just the points. I want to find out the plane that has the maximum number of them. Or in other words, from the given set of points I need to find out the maximum of them that are coplanar. (In the worst case there will just be 3 such points.)

@rjg Please see the edit, if that helps.

@Leander This is to be done in Blender, in a python script. So if there are any ready APIs that do that, it would be great. If not, maybe some way of achieving it using mathutils package of Blender.

@Blender That makes sense, don't think there is much though. Is this supposed to be for 2.79 or 2.8? Could you upload some example points, perhaps as csv code in the question? Are there sets of 3+ collinear points? Are there duplicate points at the same positions?

Btw, what is this data based on. If the points are chosen randomly, it would be unlikely to have more than 3 points on a plane anyways, right?

@Leander I appreciate your taking the time to think over the problem. I need this in 2.8. I don't have any data. But the points belong to multiple 3d curves, so the probability of more than 3 points sharing a plane is higher than if they were totally random. And yes, there can be collinear points or points located at the same position.

Seeing the edit with code, I think you'll need to consider collinear points which lead to null normal (and don't define a plane).

Which amount of vertices is to be considered here?

@lemon Yes, that's right. Collinear points and parallel planes condition is not considered in the code. You can create the sample vertices by createing a 3d curve with a couple of 2d segments. Then subdivide the 2d segments to create multiple coplanar points. Or you can subdivide one of the faces of the default cube. But then the code will need to be modified to consider mesh vertices instead of the curve bezier points.

There is no "simple" way to do anything in numerical analysis. However, the tasks can be laid out straightforwardly.
EDIT: This idea is a brain-fart because it doesn't distinguish parallel planes. The Internet must never forget though. Pile on, people.
How about this: generate an array of normalized normal vectors (not vectors in the dynamic array sense; in the math sense. A 1x3 array representation of a floating-point ordered triple is fine. I guess you can make an object but why bother) for every 3-point combination (not permutation) of the n points you have in your set. This list will contain nC3 normal "vectors".
If no plane that can be made contains more than 3 points in the set, then your list of normal vectors will entirely contain nC3 unique normals.
If any plane exists with 4 vertices, you will have 4C3 = 4 identical normal vectors in that list.
If any plane exists with 5 vertices, you will have 5C3 = 10 identical normals.
If any plane exists with k vertices, where 3 < k < n, you will have kC3 identical normals.
You would just need to quantify the normals that are the same, identify the largest value, and deduce what k was.
EDIT: Thanks to Rich Sedman for pointing out comparison should be done with dot-product. Weeding out parallel planes is another task that would need to be done optimally in the worst case scenario (a stack of parallel planes).
Doing all this would require knowing how to do a 3D cross product, how to normalize a vector, how to find a dot-product, and how to solve this equation:
k!/(3!(k-3)!) = count, Or:
k(k-1)(k-2)(k-3)!/(3!(k-3)!) = count, Or:
k(k-1)(k-2)/6 = count,
where count is the number of duplicated normal vectors,  which you will have already counted before solving this. This is just a 3rd degree polynomial.
Note also that if the set is randomly chosen, and even if the range and precision of floating point values are small, it is very unlikely that you will have more than 3 points in any plane. The list would need to be curated to have more than 3 coplanar points in order to make good use of this work.

This wouldn't distinguish parallel planes? You'd still have to check for some shared vertices to extract coplanar triangles?

A plane has 2 sides. What direction do the normals of a plane point at?

@Robin Betts crap, you're right...I went to sleep thinking I was going to win the Nobel Prize, lol

I will agree with you, though, that if the distribution of points is random, the probability of the OP's worst case is nearly 1.  Even with  a reasonable epsilon (maximum perpendicular distance). The fourth point has to be on/ near the 1 plane defined by the first 3, from an infinite / near infinite number of possible planes.

I like this solution, and the direction of the normal shouldn't matter - to compare normals, simply use the dot product between the two vectors (which will determine how close they are to pointing the same direction), take the absolute value (so we flip those in opposite directions), then check whether equal to '1' (which indicates in same direction). To account for floating point precision, you could tweak this to check for being close to 1 (eg, above 0.9999) - provided all the points in space aren't too distant. Then just need to check for parallel planes.

That is an excellent point: there should be few (if any) parallel planes so only those planes whose norms have the same dot products to a reasonable precision would need to be more closely examined

I had tried this approach earlier. I did not consider the parallel planes though. Have updated the post with the code snippet I had written. I am not sure if you need to solve the equations with factorials. Just max count of the same normals should do. I was hoping to avoid the combinations part but looks like it's unavoidabe. I am marking this as the right answer. Thank you!

Technically, the combinatorics part is just for determining time complexity. Checking for coplanar points and planes will (presumably?) not require combinatoric computations. The combinatoric equation shown in my post will reduce to 3rd degree polynomial equation

The good answer stays for hatinacat2000.
Though, the implementation could be optimized from the code given in the question, and stay in $O(n^3)$, but does not need to allocate combinations (and that can spare a lot of memory if there are many points).
It considers parallel planes as we progressively check best plane containing first point, then second point, then third, etc.
The code is commented below:
import bpy
from mathutils import Vector
from itertools import combinations
import random
import time

# For Bezier objects
class BezierPoint:
    def __init__(self, spline, point):
        self.spline = spline
        self.point = point
        self.co = Vector( point.co )

# For mesh objects
class MeshPoint:
    def __init__(self, point):
        self.point = point
        self.co = Vector( point.co )

# Get the point from object (either Bezier or mesh)
def points_from_object( name ):
    obj = bpy.data.objects.get(name)
    if obj:
        if obj.type == 'MESH':
            return [MeshPoint(p) for p in obj.data.vertices]
        elif obj.type == 'CURVE':
            points = []
            for spline in obj.data.splines:
                points.extend( [BezierPoint(spline, p) for p in spline.bezier_points] )
            return points
    return []

# Round vector coordinates
def round_vector( vector, decimals ):
    return Vector( (round(vector.x, decimals), round(vector.y, decimals), round(vector.z, decimals)) )

# Find the plane that contains the biggest amount of points
def find_plane( points ):
    best_plane = None
    # Go through all points
    for a in range( len(points) - 2 ):
        # Initialize possible planes containing a
        planes = {}
        pa = points[a]
        # Go through all pair except a or previous
        for b, c in combinations( range( a + 1, len(points) ), 2 ):
            pb = points[b]
            pc = points[c]
            ab = pb.co - pa.co
            ac = pc.co - pa.co
            # The rounded normal of a b c
            normal = round_vector( ab.cross(ac).normalized(), 4 ).freeze()
            plane = planes.get( normal )
            if not plane:
                # If no previous plane with this normal initialize it
                plane = set()
                plane.add(pa)
                planes[normal] = plane
            # Add the point to the plane
            plane.add(pb)
            plane.add(pc)
            # Check which is best plane
            best_plane = plane if best_plane is None or len(best_plane) < len(plane) else best_plane

    return best_plane

print( '---------------' )

points = points_from_object( 'BezierCurve' )

start_time = time.time()

best_plane = find_plane(points)

elapsed_time = time.time() - start_time

if best_plane:
    print( 'found', len(best_plane))
else:
    print( 'not found' )

print( "elapsed", elapsed_time )

Some enhancement in the code that should gain about 15 to 20% of performance (but with same complexity).
Only diff parts are indicated below and differences are commented:
def round_vector( vector, decimals ):
    # returns a tuple so that we avoid to allocate a new vector
    return (round(vector.x, decimals), round(vector.y, decimals), round(vector.z, decimals))

def find_plane( points, precision_decimals = 4 ):
    best_plane = set()
    planes = {} #One allocation for the set and the set is now a raw Python set
    for a in range( len(points) - 2 ):
        planes.clear() #Clear instead of allocating again
        pa = points[a]
        for b in range( a + 1, len(points) - 1 ): #Two loops instead of combinations
            pb = points[b] #Get once for all 'c'
            ab = pb.co - pa.co #Calculated once for all 'c'
            for c in range( b + 1, len(points) ):
                pc = points[c]
                ac = pc.co - pa.co
                normal = round_vector( ab.cross(ac).normalized(), precision_decimals ) #No freeze needed as we have a tuple
                plane = planes.get( normal )
                if not plane:
                    plane = {pa} #Immediately allocated raw set structure
                    planes[normal] = plane
                plane.add(pb)
                plane.add(pc)
                if len(best_plane) < len(plane): #Avoids if else assignation
                    best_plane = plane

    return best_plane

Should exist a better approach... will try to update later...

Thank you for the improved code, I ran it with 65 points and the difference of execution time between my code (about 22 secs) and yours (0.11 sec) was staggering! But of course there is a lot of scope for optimization in my code (I need not have created an entire map just to find the max count for example). It was more of a Proof of Concept of the approach. And both the approaches, I guess, are more or less the same. That is, taking 3 points at a time finding the normal; the normal that repeats the maximum number of times gives the plane. I look forward to the better approach.

@BlenderDadaist, maybe I was presumptuous about "better approach". Though the code above can be optimized a bit with the same complexity. Will think a bit more about it before correcting anything.Though, I'd be interested to know the real amount of vertices you need in a real case. Is it around 100, or around 1000 or more? Note: there is a "big" difference between 2 codes: mine here considers parallel planes which is not the case in your implementation.

There would be around 100 points in practice. And I agree, there's a big difference between the two codes.

@BlenderDadaist, ok, I think for 100 points, there is no issue with O(n3)... (if it is ever possible to lower this complexity).

I really appreciate your help.

The way you could do this is by trying for almost all combinations of three points, choose the plane which contains the most points. It will run in $O(n^4)$ for $n$ points.

Thanks for your answer. I had thought about this brute force method. But this would be rather too expensive, that's the reason in my question I said 'without trying out all permutations'.

I'm not sure maybe it can be done in $O(n^3)$. If you know there is one plane, it should be fast.

"Is there a simple way to do this, without trying out all permutations?"

Not clear, that's the question.

If you don't want curved surfaces then points are on a plane when one of their (x,y,z) coords is the same e.g z (a horizontal plane). When a linear function f(x)=ax+b is involved the plane is rotated/sheared.


text:
How to make rigged vector shadows on 3d mesh?/changing Texture shapes based on lighting/ Making freestyle lines look more 2d like
I want to do flat 2d shadows on a 3d mesh for that cartoon effect in blender. The problem is, from my research, is the human eye can always detect when the shadow wraps perfectly around the mesh, giving it a 3d look and this becomes more obvious when it is animated. I first thought of using the shrink-wrap modifier to make a plane stick to another mesh's body then manually changing its shape based on camera angle to make it look flat, but that would become tedious the more shadow shapes that I need. Then I thought of rigging a texture or making a shadow texture on a mesh that changes shape based on lighting, but I don't know how to go about that....
Edit: I was going to ask 2 separate questions for this, but since they are related, I’ll put them both here. Here are two post inspirations I found for what I am looking for:
https://twitter.com/rukikuri/status/1227302701672935424
I wanted the cast shadows to change shape according to the lighting as well.
https://www.reddit.com/r/blender/comments/pa0dp8/i_made_a_100_procedural_and_realtime_sketch_like/
The sketch effect made the outline more streamlined, but it is still look too sketchy for what I am looking for, nevertheless still a start.

Notice how the models look flatter or more 2d after the edit.

Another point is, I want the inside to sort of lag behind or go in the opposite direction of the mesh volume like it is reluctant to part with the camera front view. This post Animated texture that depends on camera perspective
shows similar to what I want for the outlines/some shadow behavior as well, but instead of fully being projected or fully biased to camera front view, it also follows the mesh, just more slowly/half way/reluctantly so it is not completely static when animated. This effect I want with the outlines, any textures, shadow shapes, or any mesh shrink wrapped to the surface of the main mesh.

Are you just looking for a Toon/Cel Shader effect? If not, could you add some images to illustrate the effect you're trying to achieve?

Sinc you have not provided any images, I am not sure if this is what you want. You can use toon shading along with custom normals. Only thing is custom normals is a lot of tedious work. Basically you would need to make sure that all the normals create a shading that resemble an extremely smooth surface. This will remove, say, some bumps (can I call it?) and give you a shadow shape that is flat-ish(like something that is not wrapped around a 3d surface). People who do anime stuff in Blender usually have to go through the torture of custom normals. Believe me, I am one of them.

I edited the post so hopefully you guys get what I mean. Sorry for not making it clear before.

The entire reason that your first link talks about proxy shadow casters is because the author wants manual control of the shadows.  You've tried this and found it tedious to control them manually-- yes, potentially, it is tedious.  But if you want to do it procedurally, then the trick is fully describe how you want them to change.  We could make procedural shadow meshes; we could convert these to spline if desired; we could cast these onto the clipping plane to make them flat if desired.  But there would be no reason, because these would be the same shadows we'd get with rendering techs.

I think the reason why I wanted to emulate the post is because of the different shadow shapes you can achieve with it, as a problem I had with following anime style models is that the shadows look good in one pose, but when you ball a hand into a fist for example, it doesn’t look hand drawn. The question I ask myself is how would this shadow look if I drew it instead, and unfortunately I haven’t seen a way to do this even with normals( it becomes obvious when your animating the body). The edits I made were from 2d style films, but that 3D look is still there.

I also want to find a solution for the outlines and textures as mentioned in the post, because as I study actual 2d animation, I found that there is a mismatch between  the overall outer line movement of the mesh and the inner line /Texture movements not in perfect sync, as one lags a bit behind the other. In 3D, things perfectly move together, while 2d movement has bits and pieces morph more than others and has wonky overall model stability. This is a huge reason that separates 2d style 3D from looking truly 2d.


text:
Why does the Node Tree to Find the outer edges and outer perimeter of a mesh in Geometry nodes no longer works in blender 4.3?
Just like the title says, I have been using this node tree to find out the outer mesh perimeter, but this node tree makes the mesh disappear and no longer work in 4.3. I first tried to open a file with this tree in 4.3, but it refused to open (it still works in 4.0). Then I recreated the same tree in a new file in 4.3, only to find that it doesn't work. The screenshot of the tree is in the picture. I swapped out the "equal" in the compare node with "not equal" when I wanted the inner edges instead (for some reason using the node tree for the inner edges gives me the result of the outer edge, and I can't seem to find out how to fix the Inner edge node tree). Any help fixing or replacing these 2 node trees would be greatly appreciated.
This is the setup that still works in Blender 4.0:
Compare node: Equal (for outer edge)
Compare node: Not Equal (for inner edge)

Is your mesh sane? (Aren't there duplicated edges? If it's a flattened cube, for instance, it certainly will not work.

And maybe what you want is "separate geometry" instead of "duplicate"?

@Daniel Möller I had used a grid then deleted some faces. I don't know why, since it still works in 4.0, but you mentioned if there were duplicated edges. I decided to use the merge by distance node, and it suddendly worked like it's supposed to. Thank you, although I am still confused why it still works in 4.0 and not 4.3 without the extra node.

Are you sure you used the "same file" in both versions? Sometimes we edit the same thing and by accident make some mistake.

Yes, I did. I opened the same file without editing it multiple times going between the 4.0 version and the 4.3 version. It wouldn't open for some reason in the 4.3 version. When I appended the collection with the node tree from the unedited file in 4.3, blender crashed each time. I then remade the same node tree in 4.3, but then it didn't work until I added "merge by distance". Only this file's geometry nodes couldn't open for some reason in 4.3, while it worked just fine in 4.0.


text:
How to Remesh faces/dissolve edges based on mesh island area/or face surface area in geometry nodes?
I want to "procedurally re-mesh" a mesh based on how big I want each new face to be. For example, I have a grid with a total surface area of 580 square feet (it would be nice to find a node tree that tells me the exact surface area of the total mesh). I want to recursively re-mesh those 580 square feet (I say recursively because recursive subdivision can give a variety of shapes and sizes from large squares to medium rectangles similar to what I want, but I don't think I can use that since I want to make the grid faces bigger, so recursive decimation makes more sense) so each new face have a surface area ranging from 50 square feet to 150 square feet. The original mesh was a grid (before some faces were deleted), so I am not working with a dense or "difficult-to-re-mesh" mesh, that is if it was manual and non-procedural. The problem is doing it in geometry nodes, as you can see from the screenshots, I have 2 different generated meshes from different seeds (which is why I can't do it manually, as that would break once I change the seed). The blue lines I drew show how I would like them to be re-meshed. The one with the blue diagonal dashes is the one I would like to have an exception for (like any group of random faces where one of their edges is facing the -y direction will be re-meshed to 1 face with a smaller surface area of 28 square feet, instead of the bigger ones like the rest). Any help on how to achieve this would be appreciated.


text:
need help with finding volume data path to be used as a driver
i want to create a driver that uses an object's volume (not scale) to determine the size of another object.
I know the volume of the object, as i got it from the '3D-Print Toolbox' built-in addon, but when i calculate the volume of the object i can't right-click on it to obtain the data path, so i can't use it for a driver.
if anybody could help me find the right data path or provide a workaround that would be greatly appreciated.

The scale is a property of the object, but there is no volume property and no data path. The 3D Print Toolbox add-on calculates it.  If you check the source code you can see that it takes the unit and scale into account, creates a temporary copy with all the modifiers applied, and then uses the bmesh API method bm.calc_volume() to get the final result. I guess you could do something similar with a driver. Just make sure you call bm.free() to prevent memory leaks. (There are a few answers where it's missing.)

i don't really know enough about python in blender to do that, are than any other ways to find the 'true' size of an object?

Looks like you cannot run the Python script as a driver expression. But you can make it a custom function and register it (https://blender.stackexchange.com/q/51530/107598). There are two flaws: 1) bmesh.calc_volume() is a slow function and you get a warning about this. It seems to be stable if you ignore the scale and modifiers, and the mesh is not too complex. 2) you have to run the script and then update the driver each time you open the blend file. Maybe you could create a little add-on that provides the custom driver function.

For a simpler solution, you can obtain the Dimensions of an object from the side bar (accessible through shortcut N).
In a driver, the data path is dimensions[0] for X, dimensions[1] for Y, and dimensions[2] for Z.
Multiplying these together is a good approximation for volume, depending on the complexity of the mesh, and is a good way for determining the 'true' size of an object.


text:
Random UV offset on instances Geometry nodes
i'm working on a shingle roof with geometry nodes, using a few bezier curves to make the shape. I need to eliminate as much visible repetition as possible, hence the question;
how do i make it have a randomized offset to the UV map for the individual instances?

a person on the red blender discord gave me a suggestion, and it worked!
these are settings in the Shader tab