text:
Creating a shader for a non-directional metal material
I'm creating renderings of the products we sell for our website. All of our finishes are non-directional, meaning we use a circular palm sander on the metal. So it is essentially brushed but in a randomized, radial movement. I am new to blender but it would be very helpful if I could create these materials. The photos below are what I am shooting for. I'd love for the renderings to be as realistic as possible.

here is what I have come up with so far. Any tips for me to get it closer to yours?

A metallic material with low roughness will get you there. What is your question exactly ?

I guess I'm just so new to blender that I could use a little direction with that. I've been playing around with it but it still looks a little too much like a rendering in my opinion.

You'll need to add some textures to control the reflectivity of the metal, which can be found online for free. This one from this site is pretty decent. There's also textures.com and other places to find them. You'll want to add some to the roughness input on your material as well as maybe fiddling with the Anisotropy (the "brushed" look). Using an HDRI to light your scene will also help contribute to realism as well.

It seems to me you might be in a position of making yourself some higher quality reference material than you can easily find online. Is it possible for you to take some high quality, high resolution photographs of the material finish? Preferably some in a more complex natural environment and some with even color reflections from different angles as well as larger area or the material so low frequency patterns can also be visible.

Hello and welcome. This site is not a regular forum, the answer section is reserved exclusively for answering the OP question. To add details to your question, simply [edit] your question instead of using the answer section.

Calling those finishes "non-directional" may be an internal/marketing term you use, but IMO it's not physically accurate. The circular brush is making many anisotropic swirls. They are all directional, they just change direction such that the overall surface has no uniform direction.

As far as I can tell the realism of the material is in the texture of roughness and possibly other properties like variation in reflected color(although it's hard to tell without observing the material in real life).
I can get a bit closer to the look just by using some sort of noise:

However, as you can clearly see, it's not close to photorealism, because my quick procedural texture is not close to the one the actual material has. The variation in roughness has complex organic patterns that I cannot even see from the reference to be able to attempt to make it realistically procedurally(which is probably not very straight forward even with better reference). My belief is that if you want a good result, you need to recreate that texture with complex noise that has subtle and specific variation in detail, shapes and scratches. I think the best approach would be to experiment with a large sheet of metal with that exact finish and see what uniform single color background it could reflect in a way so that the texture is visible, photograph it and extract the texture from the photos. If that is not possible, more reference would still be needed and it might be possible to achieve better results by attempting to make the texture in image editing software like Photoshop, Gimp or Krita. You would need to observe and identify various kinds of noise patterns to do so. Frequency separation techniques might be helpful there. I think that would require a lot of experimentation and effort either way.
Oh, and I assume you would model the product to exact dimensions - I think I got the slopes of the bottom completely wrong, they are probably more shallow.

The patterns might be in part related to corrosion, so you might look into other metals like copper where they are way more clearly visible. They might be similar in texture but differ in color and contrast only.

Thanks Martynas, This is much more realistic than what I have been able to come up with. I copied your nodes and my version looks a lot different. I realize a lot of that can depend on lighting and scale and what not. What kind of lighting do you have and what type of background?

It's some HDRI from HDRI Haven. It is important for the look - you are right, because most of what you see in metal material like this is reflections, so you need something to reflect.

Is there a way I can upload a photo on here so I can show you what I have and get some feedback of what I need to do? Do I need to answer my own question so I can add a pic?

If you have an answer to your own question it's considered to be a very nice practice to post it as an answer here even if it's your own question. Then the solution you ended up with will remain for others who might be searching for an answer to a similar question in the future.

i use sharex, but theres other software. you take a photo of what you want to share, then it makes a url for you to post. the comments allow you to create links to images.
Info Link

also, anisotropy is an essential setting for some metals where the specular gets smeared. gets really cool when you plug some scratch textures into it. though might not be applicable here. link

have you tried the anisotropic property?
You can use a texture map to fine control rotation.
Example of a random scratch texture controlling anisotropic rotation.

Anisotropic reflection is clearly visible in your shared image, but it's not visible at all in the images shared by OP. Why would they try something that does not apply to the situation?..

So one thing that might be worth noting is that when I import my stl file I scale it down to .12 in order for it to fit under the camera properly. Would this be affecting my outcome of materials?

Another question, @martynas, How did you get those cross brakes in the basin. I assume it was something to do with altering the mesh, but that looks nice and my drawings didn't have those.

@MartynasŽiemys his material could very well take advantage of anisotropic for realism, just not to the degree that im using it in my photos. ive got very similar results to his using a bit of anistropic + microscratches

@ColinHildenbrand if your referring to my photos of the metal, its just the anisotropic setting in the material. then i added a black and white scratch texture to randomize the anistropic rotation.

Sorry John, I was referring to @MartynasŽiemys on how he made the cross brake lines on the bottom of the sink basin. I would like to do those on my file.

@JohnCheathem, well, if one observes any on their reference, they should use it. There might be some on the material - it's not visible in this case. Anisotropic shader is not for scratches though and your renders look nothing like the reference in the question so in this case, it should not be used and this answer may be confusing. It's good idea to get better reference(for the millionths time! @ColinHildenbrand) and look closer if some anisotropy might be there.  Cross indentations at the bottom are in the geometry of the model. Play with HDRI rotation to see what gives nicer reflections.

IMO, buffing any metal with a circular palm sander, unless it's using the very softest cloth, is going to cause anisotropic regions. It seems to me that OP's photos definitely do show this, variations in anisotropic reflection angle causing a non-uniform appearance.


text:
Cannot apply lights to points using Geometry Nodes
I am trying to model a grid of lights using geometry nodes. I combine several nodes like grid, instance on points, etc. as depicted in the following figure:

I can attach instances of any mesh to the points, but it does not work for light.
Any clue ?
Regards.

I would guess because light has no geometry it won’t work. Same problem with normal array modifier, which don’t work with lights either.

@Chris Is object node in the roadmap of everything node ? Or will it somehow add light at a point (like curve, point cloud and volume isn't geometry but still is in geometry node)

i have no idea what the roadmap is... ;)

I had to look this up, but.. from the manual, it seems you have to check the 'As Instance' field of the Object Info node:

As Instance:
Output the entire object as single instance instead of
realized geometry. This allows instancing non-geometry object types,
because the output will contain an instance of the object.

It also works, if you put the light in a collection, and use the Collection Info node.

You can't Realize Instances, it seems, because the lamps are not geometry, and they disappear if you apply the GN modifier.

Robin this just helped me immensely and saved me a ton of time and frustration. Thank you!!

Enable instancing in Object Properties, then parent a light to the object:

Of course if you want to parent the lights to only some vertices of the object, you need to duplicate the object, delete vertices that aren't supposed to instance lights, and disable instancer rendering in the options visible in the first screenshot above.

source: Stack Exchange

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

sort: votes


text:
Resetting origins with animation nodes
Just a quick one - I've created an array of objects by transforming instances of a mesh along the x axis but need to reset the origin of each object back to the grid centre.
How can I do this?  I can't see a node that supports that kind of reset.  I'd need to embed it in the subprogram so that each instance would be reset as it's created.
Thanks for your thoughts.

Why do you need to do this? If you are trying to rotate/scale around the origin, you can use Matrix nodes to rotate around a different point.

Well i generally have a hell of a time with origins which always seem to be solved by 'applying' location/rotation/scale after moves.  In this particular situation, i'm developing a form of Zack Hixon's tile flipping animation that creates an array of tiles on a generated mesh of vertices, a tile centred on each vertex.  I just know it will all go to hell once i try to apply the tiles becuase the mesh array has offset centres.  The screenshot below shows what i mean.  Thanks for your help (not sure i'd know where to start with matrix nodes to cause rotation).

You probably don't need this, there is a better method for whatever you are trying to do. You can may be try to ask that in a question directly.
In case you just want to know, this can be done by transforming the mesh data instead of transforming the objects, easy as that.

Thanks Omar but surely that only transforms vertex, edge and polygon data and not the object origin?

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


text:
Random selections with animation nodes
Me again.
Have progressed with my project and now have a group of independent items (quarter-coloured spheres) and now wish to have an animation that rotates spheres at random through one radian.

I've put together animation node trees (started with a loop subprogram before realising the error!) and now have one that responds to the frame position and should select from a random list of my group objects.
I have a node string that tests to see if a sphere has already been rotated (it should skip that object if it has) and still need to adjust frame data to get the frequency of selection/rotation correct.
However, the problem i have is that all spheres rotate in unison, there is no attempt to select them at random.  I've tried everything but can't get it to behave - what's the obvious thing i'm missing?
Thanks in advance.
Firstly, huge thanks to Bfoot and Omar for all the effort you've put into my education - just wish i'd been a more worthy student!! This stuff is a real challenge for me.
Attached is a screenshot of my latest node tree:

AN array - v2.blend
It works wonderfully with the interpolation i wanted etc - except all spheres rotate at the same time.  My difficulty is that the invoke subprogram node seems to be passing the entire list to the subprogram and the rotation calculation then works on all of them at the same time.  What i need is for the subprogram to pass a single object to the rotation calcs, they rotate it and then passes on to the next object, and so on.
My inclination is to nest another subprogram with the first so that the first loop passes an object to the second loop for rotating, which then passes back the results to the first loop.  The first loop then moves on to the next object and so on through the list.  Does that make sense?  I've tried all sorts of nesting structures but none of them work.
I know i'm leaning on you guys a lot but i'm almost there and just need the final key.
Thanks again, it's all a massive help.

You want the spheres to start rotating at random times and stay at their final orientation?

Omar, I think that's what he wants. I can't help him with his rotation issue (comments below) but I believe you could easily.

Euler Mixing
First, I want to tell how to mix between two eulers (Animate one euler into the other). The mixing factor will range between zero and one where zero means the first euler and one means the second euler and any factor in between zero and one is a linear interpolation between the two. It is clear that the factor for our animation will be the time, but lets worry about that later. The equation for the mixing (linearly interpolate) between two eulers $e_1$ and $e_2$ using the factor $\alpha$ is:
$$
e = (1-\alpha)e_1 + \alpha e_2
$$
Which is easily implemented in Animation Nodes as follows:

Now if I use the output as the rotation of an object and gradually increases the factor, I will get an animation like this where the $y$ value goes from zero to 180 gradually:

Now, if I want to utilize this to create an animation, I would use the current frame as the factor, but since the frame will change from zero to one in $\frac{1}{24}$ of the second, which is very fast. To slow it down, I will divide the the current frame by 24, that way, it will reach the maximum value (1) when the frame number becomes 24, because $\frac{24}{24} = 1$, so you see that the dominator of the division is actually the duration of the animation in frames. I will also add a minimum node to make sure the factor don't exceed one:

Now what if I want the animation to start at a certain frame? To achieve that, we have to make sure that the factor of mixing is zero for all the frames that preceeds the required start frame. To do that, we can subtract the start frame from the current time, making all the frames before it negative, if we then clamp the output to zero, all negative numbers will be zero and we would have achieved what we wanted, here is an example where we set the start frame to be 24:

Animating Objects
We are now ready to animate the list of objects you have. Lets say we have this setup:

If we want to animate the objects, we will multiply their matrices by a rotation matrix with an animated euler (Euler we computed in the foregoing section), like this:

If we want the animations to start at different frames, all we have to do is subtract those frames just as we learned before:

Since we clamped the factor, the objects will stay at their final orientation after the duration of the animation is finished.
If we want to change the rate of change of the animation, we can evaluate the factor at some interpolation having the same derivative as the one we want, for instance, to create an ease-in-out effect, we can evaluate the factor at a sinusoidal interpolation:

Omar, that is a really helpful explanation, thank you.  I shall have to spend a day or two getting my head around both this and the response from Bfoot, you've both been very supportive.  One minor question - on your node set up, how would i ease the rotation both into and out of the motion?  Many thanks.

Omar, i've spent a bit of time on this - still more to be done! - but have a quick comment.  As mentioned above, i have a random array of objects that i would like to select at random to rotate so that each reveals a separate image.  I will not, therefore, be using matrices or object instances as my array is already in place.  Just got to work out how to pass the euler data to a loop that selects random objects.  Thanks again.

@StephenSamuels I added an extra example for easing. If you already have the objects and are not using matrices, then use the Eulers directly in the Object Transforms Output Node. There is no need for the instancer or the matrices. Is this what you are asking about?

You DO need a loop in there somewhere if you are going to rotate the spheres individually and not all at once. One problem you had is you put your output for the rotations from the objects before they were randomly selected.
And if you want to randomly select and change the random selection, you want to put your changing frames into the seed of the random generator.
When I tried the above it seemed to work for me (if that's what you're looking for). To reverse the rotations and start again, just change the Math function under the Already Rotated frame from Add to Subtract.
[EDIT]
So without knowing geometry very well I looked at the looping and made a couple of changes (image below).

It's a good idea to save initial transformations before manipulating objects through code. This allows you to always get back to your objects original positions.

The animate euler node had an unused slot for time. This was needed in order to figure out how to interpolate the rotation. You had no input so I created a parameter in the loop to pass the frame values. Now when you play the timeline the spheres will rotate 180.
There is still the problem of being jerky. The smooth in/out is being applied to the animation overall the 100 frames. So the first few movements and last few are smooth. But the middle is linear and jerky. I'll look into this.

Bfoot, again you come to the rescue!  I was really struggling with how to combine frame driven processes and list loops.  Will need to get my head around what's going on here - like why use the frame count as the random seed? - but you've certainly moved me on.  One thing - in order to get 180 degrees of rotation I had to multiply the pi constant by 10!  Baffled by that!  I also want to ease the rotation and thought sinusoidal on the animate euler node would do it but it just goes haywire.  Really appreciate your help with my education - huge thanks!

Here's how I believe most random nodes work. They will produce a random list based on a seed value but it will be the SAME list through out the execution of the node tree. The random function is mathematical and uses the seed to produce the random output. So if you want to have the random list change over time, you need to change the seed and using the frame value is great for that. If the random values are changing too fast (every frame) then place a math node between the frame and random nodes to divide the frames by a value, e.g., frames/10 will change the seed every ten frames.

Thanks Bfoot, really appreciate your support with this.  Will wrap the cold towel back around my head and wrestle with it some more!!

Well after a bunch more internet searching and head scratching, i've finally got the answer!  And it's very simple - just proves there's beauty in economy when it comes to animation nodes, use as few as you can.
Thanks immensely for all the help and support received, it's added greatly to my knowledge even if we didn't get to the right answer.
Final tree shown below:

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


text:
FK/IK controls in Rigify control too much
I have my rig set up, but when I move each part, it controls the wrong section of the character; for example, when I move the FK knee of my left leg, it will warp everything around it, actually moving my right leg more than the left. I'm new to this, so I have no idea what might be causing this, but I have a hunch that it's weights. My model was created as one large mesh from a single plane, so it's a single object, and I parented it using Automatic Weights. Any help is appreciated.
BLEND FILE: https://www.dropbox.com/s/ygop2n4h6ba8uem/frogman.blend?dl=0

Can you add a blend file and images of the problem to your question? As it stands it sounds like you have weights from the left leg bones on your right legs.

@Sazerac just added a blend file.


text:
When using spotlight as a projector, the projected image is consistently slightly offset in rendered image
I am attempting to simulate structured light 3D scanning within Blender (v2.78c), however have encountered an unexpected alignment issue that I have have not been able to resolve thus far.
I have isolated the issue in a simple blend file which has:

One simple plane surface to scan
One camera

2001x1080 resolution (and retested with 2048x1080)
49.134d FOV

One spotlight

49.134d FOV
same position and orientation as camera
distance of 10.44 that lies on the plane
constant falloff
blend of 0

The assumption was that rendered outputs from the camera would produce single lines captured exactly corresponding to the images projected, however the center of the captured lines appears to be consistently offset.
The simple blend zip file also contains three images to be projected, and their rendered captures, each is black with a single pixel vertical line at x=500, x=2000 and x=1500. Here are the captured lines, zoomed in:

The gray column to the left of the center of the captured line is consistently darker than that of the gray column to the right of the captured line, meaning once sub-pixel accuracy is calculated, the column is always computed as being located slightly to the right of the actual column. The expected output is gray columns of equal intensity either side of the captured column, given the same location/orientation of the camera and spotlight, and the same FOV.
If anyone could shed some light (pun intended) on the possible cause and/or resolution of this issue, it would be most appreciated.
EDIT: Here are the captures using a camera resolution of 2048x1080, unfortunately the issue persists in an updated blend file.

I suspect that this is due to rounding - the Image coordinate would naturally vary from 0.0 to 1.0. Your image width (2001) is a tricky number to represent in binary (all values are held in binary in a computer) so there will naturally be a rounding error - however small. In a perfect situation you'd expect anything below 0.5 to round down and 0.5 and above to round up but, due to the error in precision, values aren't held exactly - so values very close to, but below, 0.5 might actually be represented as slightly higher and actually round up when they should be rounded down. This would mormally be balanced by opposite rounding at the other end of the range (ie, values slightly less than 0.0 being rounded up) but since image coordinates are limited to the range 0.00000000 - 1.00000000 this doesn't occur (since they are never less than 0) so the rounding is slightly biassed to one side - ie, 0.0 to, say, 0.49999 are rounded down but 0.49999 to 1.0 are rounded up. The extra 0.00001 causes the discrepancy.
Note that I haven't any evidence for this - just my thought regarding how values are held internally and how rounding occurs. Written as an answer rather than a comment as too long-winded for comments.
A good test would be to use an image width of 2048 (a power of 2) and see that each side is shaded the same (ie, pixel 1024 should match 1025 precisely.

Thank you for the feedback, rounding had occurred to us as a possibility, however we found this same issue happens at other resolutions also. Have updated the original post retested with resolution 2048x1080 where unfortunately the issue persists.

@EvanDekker What happens if you rotate the camera and/or the plane? Does that give any clues as to what's going on? eg, rotating the plane 180 degrees, does that reverse the pattern?, does rotating the camera 180 degrees reverse the pattern?, does rotating both 180 degrees reverse the pattern? - this could identify whether it's the camera space, object space, world space that this is related to.


text:
UI Update issue PropertyGroup UIList Item 'name' prop's update hook?
This is hard to explain but I will try.
I have a panel UI that I use to generate a geometry but lets call it a parent group object.
I have a PropertyGroup List with a PropertyGroup for the Items so each generated object is stored in the list, so where you select the item in the list the UI in the same panel updates with the different objects properties and name that it's given. This name is the Geo's name in the Scene Property viewer as well as the name in the item in the list, which is the only thing I display there in the list.
When I rename the actual object not in my panel I have a complex solution where a watcher is monitoring for name changes and looking to update the panel.
I can simply update the item.name from the list to the new name and it is visually seen to update, but when it comes to the field that represents the name in the properties panel I can in theory update it but it doesn't change visually no update.
This is StringProperty that does not have an update function or anything like it but probably should I just don't know how to trigger it.
If I try to create a 'name' StringProperty in the List PropertyGroup it won't let me so I'm unable to assign an 'update' function.
If I create an extra property called geoName and assign an update function, then I can set it's value to the StringProperty via myProp = self.name.
I guess I'm looking for a way to assign an update function to the 'name' property that is part of a list via
listGroup = props.PointerProperty(type=ListGroup)

So the UI shows it this way
ro.template_list("ListGroup", "Group_List", listGroup, "items", listGroup, "idx")

That is a UIList that has a draw_item function
class ListGroup(bpy.types.PropertyGroup):
    idx = bpy.props.IntProperty(name="Index", description="Index for ListGroup", default=0, update=listItemSelected)
    items = bpy.props.CollectionProperty(type=ListGroupItem)
and this

class GenSourceItem(bpy.types.PropertyGroup):
    #items like StringProperty are here

is the set of properties where you can not seem to add the update function to the name property because it already exists so I can't set the field in the UI that is for creating them. The name field is also a way to edit it (which works and renames the geo and the list's name), but again if I edit the name of the object and the list updates it can't update the StringProperty in the panel without having an extra go between value I've assigned an update function to.
Said another way for clarity: since the UIList item has a 'name' and I can change/update it but I can't be notified it updated and reflect the change in the panel. How might I assign an update function to the List Items name property? or tell a StringProperty in a Panel to update. That parts wierd because I can update it somewhere in this watcher watching (continuously for what should be a geo name update event), and it seems to change it there, but I guess it must be out of the display context somehow (I guess because that geoObj name change is happening in the official Scene tree viewer)?

When defining a PropertyGroup one can define a StringProperty 'name', overwriting the internal name property.
Any interaction with the name will use this new Property.
This can be used in conjunction with a second StringProperty to create an update-hook like this:
import bpy

class Test(bpy.types.PropertyGroup):
    # there's allways "name" as a StringProperty.
    # we may overwrite it though, to add callbacks
    def _upd_name(self, context): # this will handle our update
        if self.name == self.old_name: return # abort: no change, no update
        print("changed name from '%s' to '%s'" % (self.old_name, self.name))
        for item in context.scene.test_collection:
            if item.ref == self.old_name:
                print("...updating ref in element:",item.name)
                item.ref = self.name
        self.old_name = self.name # update our old name
    # the _upd_name function must handle all callbacks.
    name : bpy.props.StringProperty(update=_upd_name) # our public name
    old_name : bpy.props.StringProperty() # helps us with our update
    # lets get a property to update
    ref : bpy.props.StringProperty()

def register():
    bpy.utils.register_class(Test) # register it and assign it
    bpy.types.Scene.test_collection = bpy.props.CollectionProperty(type=Test)
    # lets give it a test
    scn = bpy.context.scene
    A = scn.test_collection.add()
    A.old_name = A.name = "A" # setting both at the same time suppresses update.
    for n in "BCDEFGHI":
        item = scn.test_collection.add()
        item.old_name = item.name = n
        item.ref = A.name
    A.name = "A" # no real update
    A.name = "my-chosen-name" # update

if __name__=="__main__": register()

Note that this will lead to a second entry inside the rna_type.properties collection:
print(list(bpy.context.scene.test_collection[0].rna_type.properties.keys()))

Ideally we'd like to add the update function to the original item, but that seems to be impossible. Notice that you can not patch a hook to the name of objects either, as they are done internally. You'd only loose the ability to change the real name as your interface starts using the new name.

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


text:
Create Mesh op in a certain collection?
If you have a python script in Blender 2.8 that uses a primitive mesh generator like bpy.ops.mesh.primitive_ico_sphere_add(collection="???")
It will be created in the active selected (in outliner) collection.
You can create and 'Empty' and 'parent' it to that, and even 'link' it into that newly created group 'Empty' (for hierarchical reasons).
ob.parent = EmptyGroup

bpy.context.scene.collection.objects.link(ob)

The problem is the newly create mesh has not been added to the current collection until after this function completes.
I tried to create a function to purge it from all other collections but as I mentioned that won't work because it's not registered there until after the creating function completes.
def cleanUpCollectionMess(ob, trgColl=None):
    if trgColl == None:
        trgColl = bpy.context.scene.collection
    obs = trgColl.objects
    if ob.name in obs.keys() == False:
        trgColl.objects.link(ob)
    colls = bpy.data.collections
    for coll in colls:
        print("cleanUpCollectionMess: check collection:" + coll.name)
        if coll != trgColl:
            obs = coll.objects
            print("cleanUpCollectionMess: check for:" + ob.name + " in:" + str(obs.keys()))
            if ob.name in obs.keys() == True:
                print("cleanUpCollectionMess: Found unlinking:" + ob.name)
                obs.unlink(ob)

[I am editing this code but it doesn't work for the reasons I explained besides the fact that it doesn't seems to find the ob.name in the obs.keys()
If you take the True out it works??!!
res = ob.name in obs.keys()
type(res)
<class 'bool'>
denominator:<attribute 'denominator' of 'int' objects>
imag:<attribute 'imag' of 'int' objects>
numerator:<attribute 'numerator' of 'int' objects>
real:<attribute 'real' of 'int' objects>
res == True
False

]
Okay so this works better now...
def cleanUpCollectionMess(ob, trgColl=None):
    if trgColl == None:
        trgColl = bpy.context.scene.collection
    obs = trgColl.objects
    if not ob.name in obs.keys():
        log.info("cleanUpCollectionMess: linking:" + ob.name)
        trgColl.objects.link(ob)
    colls = bpy.data.collections
    for coll in colls:
        log.info("cleanUpCollectionMess: check collection:" + coll.name)
        if coll != trgColl:
            obs = coll.objects
            log.info("cleanUpCollectionMess: check for:" + ob.name + " in:" + str(obs.keys()))
            if ob.name in obs.keys():
                log.info("cleanUpCollectionMess: Found unlinking:" + ob.name)
                obs.unlink(ob)

Object is not yet found in the collection when it runs but appears there unwanted after execution completes finished.
It would be nice to have all Mesh creating Ops primitives
bpy.ops.mesh.primitive_*
have an argument that is what 'collection' (by name or object) it should be created in.
I am uncertain how to tell it to select the newly created Empty as a Collection since again I'm not sure it exists yet. Maybe the only option in 2.80 is to set a timer to clean up the mess these new collections have caused existing code I am trying to fix in regards to when python scripts are generating geometry.
Any input on this would be greatly appreciated. Maybe I've done something wrong but again this all worked fine prior in 2.79 [until the nightmare of collections came to be.]
Again so simple if the primitive generator operator functions had an argument to assign new meshes upon creation, or something similarly intelligent.

These problems may have also been related to the primitive geometry generator being in Edit Mode for Beveling, etc.?

I think should not 'if ob.name in obs.keys() == True:' but 'if ob.name in obs.keys():' (same thing with False, of course)  Not only formalism but probably the cause of your issue


text:
Access property by argument name (dot and bracket notation not equal)
Here we see two ways to get a UI property stored in the Scene
>>> print(scn.repGroups)
<bpy_struct, RepGroup("")>

>>> print(scn['repGroups'])
<bpy id prop: owner="SCScene", name="repGroups", address=0x0000003F0CE7D278>

Typically I'm use to accessing a property like in JavaScript by passing an argument that is the string that holds the value that is the property like
def findIt(propName):
   scn = bpy.context.scene
   return scn[propName]

I would like to access the scene/scn property by name but get returned the item like you do in a normal reference (bpy_struct NOT bpy id prop).
Please advise?

Defined properties use ID properties as storage
A defined property bpy.types.Scene.xxxx = bpy.props.BlahProperty(default=default)  is stored as an ID property scene["xxxx"] once it is set (non default). See get set example
>>> bpy.types.Scene.xxxx = bpy.props.IntProperty(default=11)
>>> C.scene.xxxx
11

>>> C.scene['xxxx']
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
KeyError: 'bpy_struct[key]: key "xxxx" not found'

>>> C.scene.xxxx = 12
>>> C.scene['xxxx']
12

You see a struct printed for the property scene.xxxx if it is a pointer or collection, or an int for IntProperty, a str for StringProperty.
Henceforth, rather than scene[propname]  a more generic pythonic way would be using
getattr(scene, propname, None)

to return, if propname == "xxxx",  scene.xxxx if it exists, else None.
for the defined default
>>> C.scene.bl_rna.properties['xxxx'].default
11

Right okay thanks! That's working. It's a PropertyGroup with a PropertyGroup and index for Items and List in a multi list selector in the UI. If that makes sense just to add to my confusion. Normally in Python it works like JavaScript so kind of weird to see this seems to initially appear scrambled and inaccessible in Blender?!

IMO the idea here is to only save non default values in the blend file.  Not sure re normally in python .. type.prop = property(get, set)  works for both ob.prop and ob["prop"]


text:
Create a spiral of shapes with increasing scale using Geometry Nodes

I want to achieve this effect using geometry nodes in Blender so that I can see how the spiral changes by changing the size of the starting isosceles triangle or the proportion between the triangles in the array. I tried to achieve it using instance of point and linking id to power and then to scale and rotation and then multiplying the rotation by the angle of the triangle but I couldn't

Hello and welcome. Please use a title that matches the content of the post. It should read like a question, be descriptive but succinct, unique and identifying, summarizing the problem so that anyone searching for similar issues is likely to find this. Remove anything superfluous, avoid using words like "this", "help with", "issue" or "question about", instead describe what "it" is. Remember, your title is the first thing visitors see, answers you get depend heavily on it. See What is the problem of asking “How do I do this?"

Basically you need an isosceles triangle object pointing down with the origin at the center of the base edge. Then you need to know the length of the base, the legs to base ratio and the base angle.
The shape is created by iterating the following steps: moving the next triangle over half the length of the base so its origin is at the corner, then rotate counter-clockwise by the angle in that corner and scaling the new triangle the ratio of two times the leg length:

These values can be calculated for any given isosceles triangle if we first get the height and width from the Bounding Box by subtracting the Min from the Max vector.

From these dimensions all necessary values can be calculated. If we only take half of the isosceles triangle by splitting it on the height of the base edge, we get a right triangle.
For the leg length c we have the Pythagorean theorem, all we need is a which is half of the X width and b is the Z height. The angle for the rotation then is the arccosine of a divided by c or the arcsine of the height b divided by c, whichever you prefer (later multiplied by -1 for counter-clockwise rotation).

And these steps have to be done for each iteration, this is where the Repeat Zone in Geometry Nodes comes into play.
In the following setup I use a triangle pointing down, the origin at the center of the base (the edge opposite the right angle). Apart from making the calculations I have explained above, the Repeat Zone is built so that the original triangle is put in 2 Geometry inputs: the first to get the original triangle, the second to get a triangle for transformation. Then the original geometry will be joined by the transformed geometry to built the complete construction and becomes the output of the Repeat Zone. Then the transformed geometry alone will be fed into the second geometry output for the next iteration of transformations. Sounds complicated, I know.

And the result of it will look like that:

Now I know this is not exactly like the original and spreading out a bit more, because as I later realized the reference triangles have their pivot point on which they rotate not in the center of the width. Which means, they are moved a little less to the right and therefore have to be scaled less. This is a bit more complicated and I will see if I find the time to implement something like this later.
//EDIT: I've now made a second version where you can manually set an absolute value as offset how much you want the new triangle to be wider than the original triangle (in the first step, afterwards this value of course will be scaled as well).
Moving the triangle over is a bit different now as well since the ratios have changed and the translation is no longer half the width etc.
It was a bit complicated since the rotation did not work as I wanted it, however with a Set Position node where I can move the individual vertices, using a Vector Rotate node where I can set the corner as Pivot Point to rotate around it worked.
All in all this is a bit messy, this can surely be made nicer maybe even with custom nodegroups for the basic operations which are used in both nodetrees, also maybe with connections to the Group Input to be able to enter values comfortable from the modifier.
But since this was not supposed to be a tutorial, just one possible way of doing it I hope you get an idea how to go on from here.

And this is what it looks like:

I have updated the file as well, there are now two GN nodetrees available:

Here you can change the angle the triangles rotation by changing the height of the triangle:

Or you can change how wide or narrow the spiral is while keeping the rotation angle by changing the offset (how much wider the second iteration should be):

(Using Blender 4.2.0)
Analysis
The structure is made of isosceles wedges rotated by the angle between a leg and the base. The right side of the structure shows that 5 wedges are making half a turn, i.e. 180°. Consequently, the angle between a leg and the base is 36°.
Classical laws to control the size are arithmetic progression and geometric progression. The following figure illustrates both, with the same factor (1/20) between first and last wedges. The arithmetic progression seems better suited.

(legend: arithmetic progression (left) ; geometric progression (right))
Approach
An Instance on Points node provides the duplication loop to spawn scaled and rotated objects. The following figure shows the "Spawner" Group Node.

Dark pink nodes: Let $\alpha$ be the Angle between a leg and the base. For the first object $(i=0)$, the rotation angle is 0 ; for the second object $(i=1)$, the rotation angle is $\alpha$ ; for the third object $(i=2)$, the rotation angle is $2\alpha$. This arithmetic progression is generalized as $i \times \alpha$, and it is computed by a Multiply Math node.
Dark red nodes (geometric progression): Let $r$ be the Ratio applied to reduce the size, and $i$ the index of an instanced object. For the first object $(i=0)$, the scaling factor is 1 ; for the second object $(i=1)$, the scaling factor is $r$ ; for the third object $(i=2)$, the scaling factor is $r \times r$. This progression is generalized as $r^i$, and it is computed by a Power Math node.
Dark green nodes (arithmetic progression): Let $R$ be the Ratio between the first and last object sizes. The Linear variation of the scaling factor between 1 and $R$ as a function of the instance Index is computed by a Map Range node. The last index is recovered by subtracting 1 to the Point Count of the input geometry.
Dark blue nodes: To control the Shading of each object, its instance Index is saved using a Store Named Attribute node.
Results

Resources

Blender file:  (Blender 4.2.0+)
Shader: see Procedural Border Detection on a Flat Object

GeometryNodes modifier
Overview

Input parameters:

Count: how many wedges to spawn.
Height: height of the first isosceles triangle (wedge width also by default).
Angle: angle $\alpha$ between a leg and the base of the isosceles triangle.
Ratio: scaling factor $r$ for geometric progression or overall size ratio for arithmetic progression $R$ ; values lower than 1 yield decreasing size.
Progression: law controlling the size variation.

The overall process is a sequence of 3 steps:

Dark red nodes: scaling and rotation of one leg of the isosceles triangles, considered as independent objects.
Dark pink and blue nodes: computation of the position of the center of the wedges.
Dark green nodes: positioning, scaling and rotation of the wedges.

Wedge builder

(3D Viewport legend: leg (blue), $\alpha$ angle (red), height (green))
Dark pink nodes:  The generic wedge is made from a Cylinder with only 3 vertices. End faces are equilateral triangles ; consequently, the Height is 1.5 times the Radius, i.e. the Radius is $\frac{2}{3}$ times the Height. The cylinder vertices are translated with a Transform Geometry node such that its origin is set at the apex.
Dark green nodes:  The base is chosen as the edge aligned with Y axis. It has to be scaled to deform the equilateral triangle into an isosceles triangle. The scaling factor, preserving the Height, is the ratio between the Tangent of the equilateral angle (i.e. 60°), and the Tangent of the isosceles angle (i.e. $\alpha$).
Dark red nodes: Then the cylinder is rotated by 90° around X axis such that the isosceles triangle is in the (X,Z) plane. Eventually it is rotated by 90°$+\alpha$ around Y axis to align one leg with X axis. Scaling and rotation are computed by a single Transform Geometry node, because Scale is applied before Rotation X, applied before Rotation Y.
Dark blue nodes:  A different Material is set for the faces whose normal is aligned with Y direction, i.e. the isosceles triangles.
Building sequence

1. The generic wedge leg is modeled with a Mesh Line aligned with X axis. Its length is computed from the Height and $\sin(\alpha)$.
2. A second Mesh Line is initialized with as many vertices as required wedges. The position of these points is irrelevant, as long as they are not colocated. It is conveniently aligned with X axis, with a spacing 10% larger than the length of the generic wedge leg.
3. Both Mesh Lines are input into a first Spawner group node whose output is turned into edges with a Realize Instances node.
4. The result illustrated in the 3D Viewport is a collection of edges, one per wedge, with the right length and orientation.

5. For each edge, the vector connecting its start point to its end point is computed using a Mesh to Points node set in Edge domain. It is to notice that this vector is also connecting the origin of one wedge to the origin of the next.
6. The position of those points is recovered through an Edge Vertices node.
7. The result illustrated in the 3D Viewport is a collection of points. The vector connecting the object origin to such a point is the displacement to apply to move from one wedge origin to the next one.

8. The displacements computed at step 7 are added together using an Accumulated Field node recovering the points Position.
9. Then each point is moved to the position defined by the summation of all previous displacements (excluding itself) output by the Trailing socket of the Accumulated Field node.
10. The result illustrated in the 3D Viewport is a collection of points located where the wedges origin is.
11. Eventually, wedges are instanced calling a second time the Spawner group node, with the right position.

Sorry for this short answer, unfortunately I don't have much time, but I still wanted to share it here:
Here is an index-based solution that, in principle, simply scales each additional triangle added by a certain value and places it at the position of the acute angle of the previous triangle.
Angle and scaling factor can be individually adjusted here and the extruded objects are aligned flush, as can be seen in the example image.

(Blender 4.2.0+)


text:
Store an attribute for each point on a geometry, driven by the scene actual frame
I'm using geometry nodes to create a configurator for one of our products and one of the aims is to be able to tell if any mechanical interference between it and the moving parts exists.
I already created all the node tree to do the calculations and it works ok, it is based on a repeat zone as it has to evaluate each one of 300 points. The problem is that currently, the repeat zone is driven by the scene actual frame so in order to understand if a calculation gives the expected result I have to play the timeline for all the frames from 1 to 300. My need would be to calculate each value separately and save it into the point domain.
What I need to do in the end is:
a) being able to animate the movement afterwards (could be also through python) and stop whenever the calculated value ("Interferenza testa") becomes negative (something which is indicated by the mesh becoming red)
b) extract the index (in the 0-300 range) in which the value becomes negative (through an attribute statistic?) so to present it through value to string or by using python. May also not happen that it becomes negative.
Currently, all the points on my mesh are populated with the same value so in order to understand if it's becoming negative I have to scroll through the timeline, which is not convenient.

Video available here: Video of the current setup

I guess you can try to use a "simulation zone" node. It works similar to the repeat zone, but it works with frame ranges. Maybe you can use the frame number as name for the stored attribute.

Thanks Daniel, I'll try.

I guess I don't understand the question very well... why do you repeat based on the frame number? If you are at frame 30, do you really need frames 1 to 29 to participate in the calculation? Do you really mean 300 points or you mean 300 frames? Why are you iterating frames instead of points?

I started with using frames because the final result will also feature the animation from frames 1 to 300. I thought that I could refer an index for each frame (e.g. index 1 for frame 1, index 2 for frame etc.) and store it in the points domain and then be able to make statistics on them. I'm relatively experienced in blender but totally new to GN and also not that good at python (just bought a course so that hopefully I can get better at it). Most probably it could've been done in Python, but I wanted to make dinner GN practice as well

In addition, should one of the parameters (= mechanical dimensions/sizes) change, I should always be able to recalculate all the points values, so using frames and starting the timeline play seemed a good way to do it

So, could you clarify the objective in the question? Do you need frames or was it just an attempt? If you need frames, does that mean you want to perform the analysis for every animation position? How many values do you need? (300 = 1 per point; or 300 = 1 per frame; or 90000 = 1 per point per frame). Are these 300 points part of an actual geometry or just a dummy geometry to store 300 values? These answers may help a lot to propose a working solution.

I agree, the question is not clear. The title isn't clear, the question body isn't as well, the node tree shows only a small part so it doesn't convey much info. Ideally you would conceptualize the problem, prepare a minimal reproducible example that shows the concept in its purest form, but also describe your actual project to avoid an xy problem

Ok Markus and Daniel, perfectly understood. Here you can find a stripped down blend file: https://drive.google.com/file/d/18Npx9d7zVfaD2tvUqifMeJwO0QmwpOi3/view?usp=sharing containing the complete node tree.
The aim of this setup (amongst other things) is to calculate the angle at which the gate opener and the leaf collide (provided that it happens). It also calculates the maximum opening angle based on the quotes you can see in the "configuratore battenti" tab in the N panel.

The aim of this setup (amongst other things) is to calculate the angle at which the gate opener and the leaf collide (provided that it happens). It also calculates the maximum opening angle based on the quotes you can see in the "configuratore battenti" tab in the N panel.
What I need is to be able to calculate all the "head interference" values (separately and independently from the play head position), so to understand which is the first one where the "head interference" value becomes negative. This will allow me to show a warning containing the related "opening angle".

E.g. based on the quotes, the maximum opening angle may be 92 degrees. However, just like in the saved example, around 45 degrees the operator and leaf collide. So the maximum opening angle is not 92 degrees anymore, but it will become 45 degrees.
Being able to also animate the resulting movement, just like it's done now with the play function, is a plus and would be very welcome, but I understand that I may have started from the end instead than from the beginning.


text:
Render error with Cycles using GPU
I am new to Blender so forgive me if I am missing something obvious, but here is my problem : everytime I try to render a scene with Cycles and GPU Compute, it crashes after a few seconds, even with the default General new scene (just a cube). I usually get an error message like this one :
Error: CUDA error: Hardware stack error in cuCtxSynchronize(), line 1862

Or this one :
Error: CUDA error: illegal address in cuCtxSynchronize(), line 1862

I am running on Windows 10 with :

Nvidia GeForce GTX 1050 (latest driver v446.14)
Intel(R) Core(TM) i5-7300HQ CPU @ 2.50Ghz
8 GB RAM

I tried to reinstall Blender (using v2.83), reinstall my graphic card driver, but nothing does the job so far. Any suggestions ?

Try posting this on https://developer.blender.org/

Uninstall "Nvidia Gforce" experience: https://blender.stackexchange.com/questions/96878/cuda-error-launch-failed-in-cuctxsynchronize-line-1372 or edit the registry.  http://artificialflight.org/blog/2013/cycles-crash-cuda-tdr-error/

Does this answer your question? CUDA ERROR: Launch failed in cuCtxSynchronize()” and “cuCtxCreate: Launch failed” when Rendering in Cycles using GPU

I still got the "hardware stack error" after uninstalling Gforce experience, unfortunately.


text:
Why do I have this weird colored static in my animation for a test stinger transition?

When rendering it shows the animation as it should look. when I play it back in vlc  media player or some player I found on the Microsoft store it shows this weird static.

its a transition for streams its a 2d animation Just from some planes with keyframes. it only appears when I play the file back and not when Its rendering.

im using ffmpeg video codec 1 and eevee

It looks like a corrupt file, or an error in decoding. so let's try this again,  what codec are you using? (ffmpeg is not a codec). And what app are you using for playback? does it happen in a different app

Im using vlc media player also how do I check the video codec? I'm not sure if its corrupt file because I have tried rendering it multiple times, relaunching the program, my pc, and as I said moving objects in case it was the planes being on the same y level that was causing a rendering issue. As the video is rendering I see it play through it fine but when I open it in vlc it shows that. Is there a way I could send you the project .blend file?

Have you tried playing in a different app? What happens when you open the rendered video file in blender?

I tried it in some video player I found on the microsoft store and had the same issue, how would I launch it in blender?

im trying to use webm right now

use the Video Sequence Editor,

I used webm and it worked fine but when I used ffmpeg video codec it did the static do you know why it might have done that?

Again, ffmpeg is not a codec. It is possible that your video is using a codec that VLC cannot decode correctly that is why It is important to evaluate in different tools. But you can try to change the container and codec used to render into something that will play correctly with the app of your choosing.

Im not sure about that because it plays a few seconds of the animation then cuts to the static. Also how do I check my video codec?

The codec is in the output section, once you select ffmpeg (the set of tools to encode video) it shows Container and Codec.


text:
Why I'm getting burning marks of the sun on render?
I'm getting this burning marks in the sky and i don't why and how to get rid of it.
I have no composition, just sky texture Nishita. Previous project i had also some issues, didn't use sky texture, it was a HDRI, and same problem on the Final Render.
I'm using 2.90 version
Here is a image:

How can i fix it?
Here is the blend file:

Thank you

It is hard to understand what it is you are showing in the images. Consider sharing your project with the images packed into it so that others can inspect it and help you.

Thank you, i already put the blend file

I can't reproduce the error with the supplied file. I wonder if that is an issue caused by the drivers on the GPU, what kind of system are you working on?

I'm using RTX 2060 6gb, CPU AMD Ryzen 2700X, 16Gb Ram

Try updating (or downgrading) the drivers for the GPU.

It Worked! I updated the drivers for the GPU. Thank you


text:
Face glitch on the back of Black Plasma rig
I have just started to use Blender and when I wanted to add a character into my scene using Black Plasma Rig V2 (https://drive.google.com/file/d/1BqROFnoZTpTu5X09v-SPYaYlZqjMINDh/view). The back of the head is supposed to have hair but it has a face instead. This only happens when the facial features are activated on this skin. This only accrues with this skin too, I test around 10 skins. I also test with deleting the 2nd layer and using a skin without a second layer and still no luck. I have looked at people with similar question but the only solution that might still help would be going into edit mode and moving the eyes and mouth out but I couldn't find a way to do this.

Please use the [edit] link at the bottom of your post
(https://i.sstatic.net/lXFuK.png) and upload images that show your
current setup and illustrate the problem.See How to upload an image
to a post?

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

Why have you removed the link to the blend file? External links are fine, they just shouldn't be the only source for information.

The Black Plasma Rig is a 2.79 blend that needs a few adjustments for Blender 2.8+.
There are two issues:
1. Fixing the Missing Transparency
As shown in the screenshots of the question the model is shown pitch black in Eevee and Material Preview mode. To fix this, go to the Material Properties > Settings and set Blend Mode to Alpha Clip. Done this, the model is textured properly and you can see the second problem. The character has a face texture on the back of his head.

2. Fixing the Double Face Head
To fix this you need to separate the mesh of the character's face and head and remove the UV Project from the head mesh.
Note: If you prefer the Blender 2.8 layout you can create a new workspace with the [+] at the end of the main menu/workspaces list. You can also enable the Restriction Toggles in the filter menu for the outliner (see the last screenshot).

In the outliner, expand the armature and look for Main Body > Face. (Selection is restricted if you haven't enabled it as noted but you can still select it with a click.) Select the Face object, and switch to Edit mode (Tab).
Switch the front view (Numpad 1 or use View > Viewport > Front), press T to show the tool icons. Now box select the character's face but unselect (Shift+click) the eyes on the back on his head so only his face is selected.

Separate the selected mesh with P, and choose Selection. This will create another object Face.001 in the outliner. Face is now the head without the character's face.
With the Face object still selected, go to the Modifier tab and remove the UVProject modifier from the head (=Face object).
The head is now fixed:

(Blender 2.8 workspace layout and Restriction Toggles enabled to remove the selection restrictions.)

Thank you for you help Blunder. I was able to fix the double face glitch with your help.


text:
Sculpt brushes working backwards (normals are fine)
Is there any reason my sculpt brushes would substract when add is selected and viceversa?
I checked the normals, but they're fine, I even recalculated them. I started using the inverted brushes but some of them don't work in these circumstances.
EDIT:
I tried sculpting on a remeshed cube, a completely new mesh, and the problem persists. I don't understand :( It even happens between .blend files so I don't know where I messed up.

Hello and welcome. Even if you said that the normals are fine, could you share a screenshot with face orientation on?

It is on, actually. It only makes the inner faces red though, is it supposed to show the other side too? Added a picture @Emir

It's strange, color of brush is opposite of selected option.

So I solved it. Apparently it was an error caused by my tablet (xppen deco 03) in conjuction with windows ink activating out of nowhere. I disabled Windows ink and rebooted my computer to solve the issue.

I had this problem, but it was only on one mesh. What was causing it was that the x scale was set to -1 for some reason. I fixed this by applying scale (Ctrl+A, Scale), then recalculating normals (Shift+N). I know that you always want to apply scale before sculpting, I had forgotten this step.


text:
Shading issues showing in rendered Cycles viewport but not in solid viewport
For some reason when I render the object in viewport 3D Render I see these lines that look like weird shading or geometry. But I have fixed this in the Solid Viewport where they don't show up. Also I noticed I only have this problem in Cycles if I turn the Engine to Eevee it looks normal. How do I solve this?

Can you post your wireframe?

https://ibb.co/zG1snnf
https://ibb.co/0Xjd4Jk
https://ibb.co/r4V1Lh9
https://ibb.co/xHdMs1Z
https://ibb.co/9p4Trn2

I uploaded the images here both in wireframe and with normals. The normals seems ok and I already used autosmooth and shade smooth on the object, but I tried reapplying it again to see if there was any change but nothing happend. I also tried flipping the normals but that just made it worse. The strange thing is also if I render the object in Evee it looks all perfectly smooth but when I change it to Cycles it becomes deformed like this in the viewport.

hello, could you please share the object? https://pasteall.org/blend/

https://pasteall.org/blend/2c732370d43a4870890836ba8c752050

Please add the wireframe images to the question body by editing it so people can see it and help.
Is the whole object one single mesh? By looking at the wireframes you linked it looks like the ofending face might be an n-gon in the shape of an upside-down L. Try connecting the 'loose' corner in the extruded part to the  vertex of the main cylinder. Unless they are separate parts, of course.

If you could upload the blend file I will take a look

I uploaded the file here https://easyupload.io/7y4nnc and the screen shots of the wire frame are posted in the 5 links I posted above.

Fixed the Issue through this post https://blender.stackexchange.com/questions/237527/shading-issue-with-object

It could be any number of things, if you post the wireframe, or the area in edit mode that could help narrow it down! :)
Some stuff to try, though:

Merge vertices by distance to get rid of any doubled up geometry.
Turn on Auto Smooth in the Object Data Properties>Normals area and mess with the Angle until it looks good and see if that helps. Probably not but sometimes auto smoothing can force things to work when they otherwise wouldn't.
Re-apply Shade Smooth - Seems simple but sometimes after changes, particularly when sculpting, but sometimes in other areas as well, the shading smooth needs to be reapplied to take effect on the altered area.
Check your normals.  In edit mode, use the overlay drop down as pictured and near the bottom tick the Face Orientation option and see if the problem area has any RED. If it does it means the face is not oriented correctly and needs to be flipped. Select it or the entire mesh while still in edit mode and hit Shift+N to flip normals.
Fix geo. This sounds obvious but these problems usually don't show up if the geometry is solid. Make sure there's no edges split, no loose vertices, non-manifold geometry etc.
Try adding the Weld modifier to the mesh or applying modifiers if you have any attached to the mesh in question, sometimes they can cause issues that may show up until they are applied.

Fixed the issue through this post: https://blender.stackexchange.com/questions/237527/shading-issue-with-object


text:
Floor constraint stop the bone visually but keep updating it's position
There's this weird behavior after I added a floor constraint. While it worked well visually, it didn't in the background. Even though the it blocked the bone from going beyond the plane, the mouse movement still add to it z position as if it wasn't blocked. I added the plane just to help me create animation, so once I removed it, as expected the animation is all over the place.
Is there an alternative to floor constraint, or am I doing something wrong. Thank you.

That's normal, but you should be able to check the Affect Transform checkbox in the constraint modifier to stop that happening.

I don't see it anywhere in the constraint panel, in blender 2.9.

Ah apologies. It was late at night here and I was looking at the Limit Location and Rotation constraint settings. :^(

No problem, though, you gave me the idea of using limit location constraint, but it has the same problem and affect transform doesn't change anything.

In that case I'm not really sure what you're asking. I assumed you were talking about turning off the effect detailed here at 30:35 in this simple rigging tutorial by Joey Carlino.

That's exactly it, it was just my carelessness. I looked at transform and saw numbers keep changing and thought it was the axis I specified. Thank you.

Just an illusion then! :^)


text:
Why is my viewport frame rate so slow?
My pc has a
CPU- Ryzen 9 3950X
GPU- Quadro RTX 5000
RAM- 124 GB of G.skill Trident
Motherboard- Giggabite Aorus x57
SSD- Samsung 970 Nvme M.2 1TB
in it. But, when I use the "Grassgwald" add-on, the frame rates in my viewport drop so much, I cannot rotate my model. There is a huge delay. There is a lot of grass in the seen, it is on a large plane depicting about 100x250 square Feet.
I have installed all drivers for my GPU and they are up to date. I have also made sure Blender recognizes the card. Since it is a Quadro RTX card, I have the option to use Optx as well as Qudo Cores in the options menu. I have tried both, neither changes performance.
To be clear, this happens when I am in the "shaded" tab with default settings. It also happens when I am in the "layout" tab with default settings.
I was lead to believe this GPU could handle this kind of load. Does ANYONE have a solution, or is it unrealistic to expect that much from my set up? please help. Thank you
-Alex

I'm not familiar with this add-on but it might not be well written or if it is it might be doing some task that is slowing down your computer

It is a reputible Add-on and paid for. how can I test if that is the case? is there a file i cn download with A LOT of objects in it?

Any computer can be bugged down by very complex scenes.

how do you work around this problem?

Simplify the scene, don't have to show all of it all the time, but the element you are workin' on

One of the problems with blender right now when using particles system is that it is not easy (or nearly impossible) to make the instances avoid each other and not overlap, and thus cover maximum space.
You Setup is great, I'm thinking that you have too much grass in your scene, probably more than you need to cover the surface. If you show me a screenshot of your scene or your particles settings at least, I can pinpoint (and I will update this answer accordingly).
PS: Also, just a friendly tip, yes Graswald is a good add-on, but do consider checking out Scatter add-on
https://www.blendernation.com/2020/04/03/blender-add-on-spotlight-scatter/
disclaimer: I'm in no way related to devs of either add-ons. So this recommendation is purely professional, unbiased.

Hi Ahmad, I have added a screen shot to the original post. also I need these scenes to have a thick coat of grass and there was not too much overlay.

Sorry for getting back late, hadn't logged in for last 2 days. Anyways, the count of grass doesn't seems to be an issue here, it is infact 'below average' of what most people use in  a similar size scene with way less powerful setup.

Please try to install 2.83.1 (its a stable version that came out recently, and has many bugfixes.. specially if you are on Mac). Also, try adding those grass without the add on, by creating a new particles system >> set it to hair >> tick advanced below hair text >> under render submenu .. select Object instead of Path >> adjust particles count to 50k, then move up or down to test. Test this and let me know.


text:
imported glb file is hollow, how to fix?
im trying to import this glb file containing texture, model and animation.
when i import it into blender (latest), it has this weird hollowed out look. the face is not visible until you appear it from inside.
anyways, hope somebody can help me how to correct render.
here is the glb file https://filebin.net/hwkmdsfpvzlmg5r5/Teisel_Bonne__Cutscene_.glb?t=g2bmzav0

you can see the texture is turned inside out in particular the face is hollow and the face texture can only be visible when rotating the model.how do i fix this?
I played with the normals but it still missing bunch of faces. I used mesh ---> recalculate normals outside.

@Timaroberts thx I edited the question to include screenshot.

Try to recalculate the normals. Also there seems something wrong with your materials... try to remove one by one to figure out the issue.

what do you mean by normals?

https://en.wikipedia.org/wiki/Normal_(geometry)

The problem you are having is easily overlooked, and is found in your material settings.
You have backface culling turned on, and not all faces are facing the same direction giving you the strange result you are seeing.

Turn off backface culling and this should fix the problem.


text:
How do I remove a cloth pinning at some point of the animation?
I'm quite new in the blender world.
I'm animating a balloon that has three fix points when it inflates/deflates and I want it to fly away at a certain point of the animation following the physics I already added, like the wind. I've seen that i can move the points and insert keyframes in edit mode but I want it to be realistic and just fly away.
Is there a way to remove or deselect a vertex group at some point?

hello, could you please show some illustrations or picture of what you want to do?

yes of course, tell me if you need something more to understand

do you mean this vertex group is used to pin the mesh during cloth simulation? then you don't want it to be taken account of?

yes exactly is what i'm trying to do

Hi. Please use the built-in uploader when adding images. See: https://meta.stackexchange.com/questions/75491/how-to-upload-an-image-to-a-post . Thanks.

Edit: you can used the Vertex Weight Proximity modifier.
Former answer that works as well, with the Vertex Weight Mix modifier, but there must be others:

Create your object, give it 2 vertex groups, one for the pinning, the second one must be empty. Give it the Cloth physics.

Create a Force Field > Force next to your object. Animate it: give it Strength of 0 until frame 49 for example, keyframe it at frame 49, at frame 50 give it a Strength of 30.

Give your object a Vertex Weight Mix modifier, put it above the Cloth in the modifiers stack. Choose Vertex Group A > the pinning group, Vertex Group B > the empty group, Mix Set > VGroup A or B. Keyframe the Default Weight A and Default Weight B values: A will be 0 from frame 1 to 49, then 1 at frame 50, B will be 1 from frame 1 to 49, then 0 at frame 50.

It seems to work as planned, from frame 1 to 49, the object collapse with the pinning hanging it, at frame 50 it is blown away by the force field.

The Vertex Weight Edit answer above is mostly correct, but partly incomplete. If you're pinning vertices because they're attached to an armature that is applying dynamic forces to the rest of the mesh, you may want to have the vertex weights set to 1 to avoid the cloth physics impacting the shape of the cloth attached to the armature. First, for remove group, set a keyframe at beginning of sim with threshold 0, and keyframe falloff to linear.

Duplicate this keyframe to the last keyframe where you want pinning in effect.
Then skip ahead 1 frame and set new keyframe with threshold 1 and a custom falloff curve with a control point mapping x=1 to y=0.

Finally, if you don't want to release all pinned vertices, you can use a mask group to limit the Influence.

Vertex Weight Edit above Cloth
Choose your vertex group and put weight in 0.999, then you have an option called Group Remove.


text:
Catch only object reflection alpha with glossy material
I have an object in a plane with glossy material. I wanted to do a render but only !

the object itself
the reflection of the object
the shadow of the object
the plane in full transparency (100% transparent <=> alpha 0).

I have tried everything, also render layer without success.
Glass Shader also didn't work for me (even with the transparent glass checked in film).
Below is an example with a sphere : I want to render ONLY the sphere, his reflection and all the rest with alpha transparency !

What I want :

Thanks for any hint.

Like THIS or like THIS ? The Original is THIS ONE

At first it sounds like only the reflection, but then it sounds like object + reflection with no ground plane or shadows?  Please [edit] your post with a little more clarity on what you want the result to be.  A crude mock-up often helps.

Hello, excuse me to not having been clear, in fact based on @Emir comment's last link (https://imgur.com/a/TEOFF6r), I want this BUT the plane needs to be totally transparent. The goal is to have this object integrated ahead of another background texture so I just want the object+shadow+reflection BUT NOT the color of the plane(which must be total transparency). Like a shadow + reflection catcher object property on the plane. Hope this can be more clear :)


text:
How do I record separate cloth simulations for multiple actions and combine them?
I am creating animations for my game character and have thus far created actions for idle, run, dash, and sprint. However, I want to add a cloak to my character using blender's cloth physics and record the cloak's movement for each action. I have four cloth bakes in the cache (one for idle, run, dash, and sprint), but I am not sure how to "combine" each of the bakes for the corresponding action. I want to be able to export to unreal engine and have single animation sequences that include both the character animation and cloak animation. I may be thinking about this the wrong way, but I would like help on the how to solve this problem.

I can't comment yet (not enough rep) so i'll  place my suggestion in an answer.
Firstly what game engine are you using? If it's UE4 then I have an alternative method for you below:
If you rig the cap with a simple skeleton (perhaps a few of bones on each side of the cape) and then import it into ue4 as a skeletal mesh you can run a really simple cloth simulation on you cape, like you might with a flag. Model your cape around your character as you normally would in blender, and the points that you want to keep solid so they don't flap around e.g. shoulders should be left unweighted when setting up your sim in ue4. For better clarity, give this a watch.
Once your cape is properly simulating, apply it to your character mesh in game, either with sockets, or as a skeletal component within the character blueprint. Now you get live, realistic(ish) fabric motion without the hassle of baking out extra anims.
Hope this helps.

Yes, I am using UE4. However, I am unable to troubleshoot an issue with the cloth not colliding with the capsule colliders of the physic asset. I've already made sure to apply all transforms to the model, scale was 1.0 when exporting from blender, and to use the tapered capsule for physic asset. Issue still persists.

Did you set your units up correctly in blender? Should be at 0.01 metric, as blender works in metres, whilst UE4 works in cm. The units need to be set before you start any modelling though, so I recommend starting a new file, adjust your units, then import your mesh and rig, scale by 100 and apply the scale

I'm experiencing another issue following your solution. After starting new file > adjust units to 0.01 metric > import mesh and rig, the scale of the rig automatically became 100, and applying the scale deforms the rig and ruins the animations.

@user12100564 are you appending from blender or importing an fbx?

I am importing a .fbx of the mesh and rig to the new file.


text:
Weight painting acting as if its 1.0, even when paint value is less than 1.0
I have imported this model into blender, and I notice that when posing the thigh bone, the mesh deforms too sharply. The weight paint of the thigh's vertex groups is acting as if it is 1.0 for all vertices, when the weight painting shows a more even distribution of weight values. How would I fix this so the weight painting is more even?
I've read on a similar post: Painting vertex with 0.1 but it acts as if it has 1.0?, but it doesn't seem to apply here as the other vertex groups do not share vertices and are assigned to a single bone and function properly.

Edit: after deleting the vertex group and re-painting with auto-normalize enabled, I find that the vertices responsible for the sharp deformation are painted red regardless of weight value.

@Crantisz Im still not sure of the solution. I've tried deleting the vertex group and re-painting with auto-normalize enabled, but this results in the vertices responsible for the sharp deformation being painted red regardless of weight value. I have edited the post to include an image for reference.

pls provide blend file so we can check it out

If the vertex is only part of one vertex group, even if the influence is 0.001, the bone will influence it 100%. This vertex needs to be part of at least one other vertex group if you want it to share the influence.

Then you set weight for a vertex, let say 10%, for 1 bone it doesn't mean that this vertex will move 10% with this bone. Not at all. Influence that bone has at the specific point equals its weight divided by the sum of all weights from bones. So if you want bone_1 vertex with 10% weight "acts as it is 10%" you have to have other bone_2 with 90% weight.

Edit: after deleting the vertex group and re-painting with
auto-normalize enabled, I find that the vertices responsible for the
sharp deformation are painted red regardless of weight value.

It is colored red because the auto-normalization maintains the sum of all weights at 100%. If you only have one weight group, it will be set to 100%, because that is the only way to get the sum of one number to 100%.

I see, do you suggest the solution to be weight painting the vertices on a different bone that doesn't move the armature, so the vertices are shared between different vertex groups to offset the ratio?

no, you have some bones in torso, you should use them to make vertices gradually blend between two bones.

I see, I will use the hip bone to blend between with the thighs bones. Is there a better way to re-paint with auto-normalize than to paint it manually?

Yes, automatic weights

It seems parenting the mesh to the armature with automatic weights does not work. Error log: Bone Heat Weighting: failed to find solution for one or more bones

@user12100564 this is known: https://blender.stackexchange.com/questions/15964/heat-weighting-failed-to-find-solution-for-one-or-more-bones


text:
Shadow from unknown source on my object
I'm new to Blender and still trying to figure a lot of stuff out.
I wanted to make some cloudy miso soup, so I added a noisy image texture to the soup object. There's a curved shadow on the soup that isn't produced by either of the lights (one overhead, one above and behind the viewer).
What might be causing this?

provide blend file so we can check it out

hard to know if we can't check the material you've used

In playing with your lights, it appears to be the light behind (Spot.001) that causes the shadow.  If I remove it or move it further overhead the shadow changes/disappears.  So it is a shadow cast from the front of the bowl lip into the back rear. Set you soup material Transmission to 1 (from your 0.407) to exaggerate the effect as you adjust the light.


text:
Image Overlay out of Sync with Timeline after Rendering
I am trying to overlay some images onto a video at certain times. When I watch the preview the images are showing up at the right time, but after rendering the images are appearing before they are supposed to. There is still a pause between images being shown, but they start to appear too early. It gets worse as the video goes on. Is there a way to sync up the images to the timeline? I'm trying to avoid offsetting the images in the timeline to account for the offset during rendering.

Is the original video at the same framerate as the project?

@susu It's 35.99 frames/second. I just added am image with more information about the source video. The project was set to 29.97fps. I'm trying out a rendering with the frames synced at the same speed.

@susu The render is still out of sync with the timeline when I changed the project's frame rate to 36fps.

Related: Can Blender VSE sync the video and audion with vfr strips?

https://blender.stackexchange.com/questions/80052/blender-reads-some-videos-frames-incorrectly-duplicates-skipping/80053#80053

Too bad you have spent all this time on something that blender is not good at.
Here's the issue: the framerate reported is a non standard one (let me guess, the video file is a recording of some game or online video, or video from an android phone).
Some software recorders put out a variable framerate to make the file smaller and not to choke the computer for other apps.
But blender cannot deal with video files created like that correctly, as it needs each frame at the same timebase (framerate).
You would need to transcode the video into a stable framerate that matches that of your desired output so that blender can deal with it correctly.
It is not popular in this site when someone says that the VSE in blender is not a robust tool, but what you are experiencing is the result of that.
So you have two choices: conform your video to a single stable framerate, or use a different video app that can handle your file as is.

I am using the built-in screen recorder on Windows to record a video of an application. I took the raw video and imported it into OpenShot and then exported it. I replaced the raw video in Blender with the new video and the render synced up perfectly. Thanks for your help!


text:
Object Active Selected With Python
I want to use this add-on, so the Python code has to be Single line
https://github.com/InamuraJIN/CommandRecorder
I was able to select Empty in this Python
bpy.ops.object.select_pattern(pattern="Empty")
However, this command does not select the object in Python as active
I don't want it
Python allowed me to select objects with matching names
But it's not Active Select.
I want to do.
Active selection of the currently selected object + specified Name Object

I use Google Translate

Hi! Having a hard time to understand what you'd like to do. You can get the current selection by using bpy.context.selected_objects and filter the selection by type via Object.type: https://blender.stackexchange.com/questions/132825/python-selecting-object-by-name-in-2-8/132829#132829 Alternatively: https://blender.stackexchange.com/questions/125114/how-to-get-the-class-of-selected-object-in-blender-2-8  Does that help? Otherwise please take your time, edit your question and explain in detail what you'd like to achieve.

Thank you.
I've just added the Image

No problem. Means you'd like to be able to select and highlight all objects starting with "Cube"? ...or only one object matching the "Cube" string? What's the reason using this add-on?

Active selection if the object name is an exact match to "Cube".
And we want to keep the currently selected object in the multiple selection state
I'm thinking about joining afterwards, etc.

Ok, thanks. You would have to set the active object via ViewLayer. Did you already tried: bpy.context.view_layer.objects.active = bpy.context.scene.objects.get("Cube") as suggested in the answer I've linked to? Also, if you'd like to join objects you can override the operator: https://blender.stackexchange.com/a/133024/31447 so no need to set the active object...

Thank you.
This code doesn't seem to be able to select Active
I want to run the state of the manual selection at the end of this video in Python. https://i.imgur.com/2V6GTqz.mp4

Head over to the scripting workspace and use the console to test (works).

This add-on, just like PhotoShop's Action, allows you to register and execute multiple simple tasks
I think this Active Select will help me in many ways

For some reason, it looks like only the pivot is selected

If so (the pivot is selected), you nailed it, done.

What's "Nailed"?”
Active object is not a selected mesh”
I get an error message like this

As we all know, cubes are meshes so it seems your cube is not the "active object" for whatever reason. Also, you most likely have to select it as well: bpy.context.scene.objects.get("Cube").select_set(True) depending on what you do...

https://i.imgur.com/quLTCLO.mp4
Thank you so much!
I put those two lines together and it was properly selected!
It's no problem if you can't do it, but is it possible to make these on one line?
By the way, you can't use ";".

I guess, you can not combine both lines - I'm not sure what the add-on is doing under the hood though. Can't test it really, the addon crashes all the time when running it on blender 2.83/linux.

Okay, thank you very much.
Oh. I'm Windows. can you see the error message?
I don't know if I can handle it, but I'd like to make it a to-do list


text:
What is the Python API for moving a collection?
I created a Python like this
bpy.ops.object.move_to_collection(collection_index=2, new_collection_name="Background")
But this code must have a collection called "Background" in the scene from the beginning
I want this.

If there was no collection called "Background", we would create one with Python and move the selected object
If the "Background" collection exists, just move it instead of creating a new one

And I'd like to go from ViewPort to Hide
I created this code, but I don't know how to specify the "Background"
bpy.context.scene.hide_viewport = True
Digression
With just these two lines, I was able to create Empty if it wasn't there and select it if it was there.
bpy.ops.object.select_pattern(pattern="Empty")
bpy.ops.object.constraint_add_with_targets(type='TRACK_TO')

=====Edit=====
I was putting up the wrong code.
bpy.context.scene.exclude = True
When I modified it in this way, I get an error
bg_col.hide_exclude = True

Please ask only one question per post to make Q&A useful to others too. Please read: https://blender.stackexchange.com/help/how-to-ask

Oh, sorry...
I'll be more careful next time.
Forgive me for just asking this question for a moment...

After trying to code the process, I accidentally found out there is a bunch of condition that should be handle correctly. The process is not that easy when coder is not familiar with the bpy structure. Then this question need to split in several question to make it more general (or module? Atomic question?) to help other reuse this Q&A.

import bpy

C = bpy.context
D = bpy.data
S = D.scenes["Scene"]

if not D.collections.get("Background"): #Get collection by name in data, and check if None
    bg_col = D.collections.new("Background") # Create a new one if not found
    S.collection.children.link(bg_col)
    # Add it to your Scene unless you don't need to see it in your scene
else:
    bg_col = D.collections.get("Background")

bg_col.hide_viewport = True #This is not the eye icon but the monitor icon hidden

Can error if background collection is not part of the scene in context.

Then the process will be done silently. Not Error but an intentional if Background collection is in other scene....I guess? Not sure if there might be an real Error when dealing with collection not in current scene

I'm sorry! I wrote the wrong code in my questionnaire.
I've edited the question.

You can save 2 lines with bg_col = D.collections.get("Background") then if bg_col is None: etc. and you don't need the else:


text:
Python code to add objects to the 3D Cursor
Python code to add objects to the 3D Cursor
I added a cube and looked at the Python Console
bpy.ops.mesh.primitive_cube_add(enter_ editmode=False, align='WORLD', location=(0, 0, 0)))

The code looked like this
When you run this code, it adds the cube to the first location you put it in, not the location of the 3D Cursor (location=(0, 0, 0))
I want to use this add-on, so the Python code has to be one line
https://github.com/InamuraJIN/CommandRecorder
How do I add an Object to the 3D Cursor's position?
Translated with www.DeepL.com/Translator (free version)

Cursor belongs to scene = context.scene then in operator location=scene.cursor.location  or alternatively use align='CURSOR'  See https://blender.stackexchange.com/questions/13828/precisely-move-the-3d-cursor and https://blender.stackexchange.com/questions/164734/how-to-move-selected-object-to-the-curser-location-using-a-python-command/164779#164779

Thank you.
I'm terrible at Python.The following code could not be executed
How should I describe it?
bpy.ops.mesh.primitive_cube_add(size=2, enter_editmode=False, align='WORLD', location=scene.cursor.location
and
bpy.ops.mesh.primitive_cube_add(size=2, enter_editmode=False, scene = context.scene, location=scene.cursor.location

bpy.ops.mesh.primitive_cube_add(size=2, location=bpy.context.scene.cursor.location) or bpy.ops.mesh.primitive_cube_add(size=2,  align='CURSOR')   Enter edit mode False is default. Defaults need not be included in call.

Thank you so much!
Now you can Add object to the cursor position
BTW, can I disable Cursor rotation?

Use first if only want to use location.  Can set cursor rotation to zero AFAIK can't disable it (could hide the UI)

It's done!
Thank you so much!

Sorry.
I'm new to this site and I'm not sure
How can I rate you as the Best Answer?

Add new object at cursor
Default values.
If you auto complete on the operator in the python console, it shows the properties and their default values.  There is no need to pass any default value to the operator.
>>> bpy.ops.mesh.primitive_cube_add(
primitive_cube_add()
bpy.ops.mesh.primitive_cube_add(size=2, calc_uvs=True, enter_editmode=False, align='WORLD', location=(0, 0, 0), rotation=(0, 0, 0), scale=(0, 0, 0))
Construct a cube mesh

To add a cube with location and rotation of 3D cursor
bpy.ops.mesh.primitive_cube_add(align='CURSOR')

To add at  cursor location.
bpy.ops.mesh.primitive_cube_add(location=bpy.context.scene.cursor.location)

or equivalently, align to cursor but override rotation.  Even though the zero rotation passed is default, just passing it (in tests so far) overrides cursor rotation.
bpy.ops.mesh.primitive_cube_add(align='CURSOR', rotation=(0, 0, 0))

Related
Precisely move the 3D cursor
How to move selected object to the curser location using a python command?

Very straightforward!
Thank you so much!

bpy.ops.mesh.primitive_plane_add(align='CURSOR', rotation=(-90, 0, 0))
If (0, 0, 0) the rotation of 3DCursor is ignored.
However, (-90, 0, 0) seems to add the rotation of 3DCursor and -90
What should I do?

Rotations in blender are radians.  360 degrees = 2 pi radians.

OK, I see.
It's hard to...
(1.5708, 0, 0) Is this correct?

close enough...

Thank you!!I think I got it!


text:
geo nodes - scale top faces / edges from center along the track line
ave gratis plenum
i need to scale top faces ( or edges ) of railroad track cutter
start mesh is .obj file exported from steam's rolling line game - railroad track mesh
track / terrain cutter is using geometry nodes

it cuts railroad track into terrain ( mesh )
using existing / imported track mesh - bottom ballast part ( mesh - track object in attached .blend file )
in 3d viewport edit mode track bottom ( ballast part ) is manually selected , duplicated [ shift-d ] & separated [ p ] into track cutter base ( mesh )
geo nodes ( gn cutter ) are attached to this track cutter base
gn cutter does :
remove top faces from track cutter base mesh - bottom faces remain
bottom faces represent track line , which i want to use for terrain cutting
from bottom faces , outer edges are selected & extruded upwards ( cutter height gn settings ) , making side faces
next side faces are extruded ( cutter width gn settings ) - cutter is widened , to get track width
next i select top faces / edges -> i want those faces / edges to scale outward along track line

i want to get V shape cut into terrain mesh , along track line = sloped sides , flat bottom , like shown on image below
tried many answers from many a sites , plus few days of trial & error :

used top socket from extrude mesh connected to scale elements node selection socket
tried various position & edge vertices & math & vector math node combinations , connected to scale elements node selection socket
also tried connecting various node combinations into scale elements node , center socket - i think this is where i should try to tell geo nodes to scale from individual faces / edges along track line

managed to scale it half-correct - it scales the top faces / edges on either side of track line , from the top faces center , but i need to scale on both sides along track line - outwards
q : with top faces of cutter gn selected , how do i manage scale elements node center socket to scale selected top faces ( or edges ) , along track line ( as center line ) , on each side outwards ?
<- track ( middle ) line ->
like zis :

EDIT : track needs to be widened - if long train wagons or locomotive is running on curve , it will ' cut the corner ' ( image below )

additional info is in attached .blend file
.blend file :
gn.terrain.b41-alpha.scale.top.question.blend
file is made in b4.1-alpha , can be opened no problem in b4.0.2
thank you for your help

Hi, this is not a commissions forum, please explain your issue within the question body - you almost managed, but it's not clear what geometry you start with. If it's a curve, all you need is to bevel it with a trapezoid profile.

Hi and welcome. Sorry, but it's hard to discern what you're asking here. Could you clarify what you're trying to achieve, what you've tried and where exactly you're having issues?

i added additional explanation as requested in above comments ; thank you for clarifying

Can you add a question sentence with a  question mark to the post please?

i clarified the issue - added question sentence , as requested ; thank you for clarifying

@MarkusvonBroady - this is my plan B - extract center line from existing track mesh edges , convert to curve , and try to use that as a cutter for terrain ; for now i stick to plan A ( issue as described in this question ) , want to learn how to use center socket of scale elements node

honestly , i am not sure if i am on the right track ( lol ) , probably there are other better ways to achieve cutting terrain , from existing track line mesh , but this is what i have at the moment

How to upload a blend file on BSE - good practices and advice - read this and also look around how other questions look on BSE, especially those highly voted up. How to ask - Preparing the .blend file to be as simple as possible to capture your problem (get rid of the parts of the track that aren't the part of the problem, just keep the duplicated part) will hugely increase the chances someone will actually help

This is your starting geometry:

Manually ⎇ Alt$\color{green}{█}\color{#888}{0█}$ click the edges on blue/red boundary to select the holes, and press F to fill them (on both sides!) so that you have a manifold hull:

Now you can take the advantage of the slopes on sides to have the growing profile, by simply extruding using the normals and selecting the faces pointing up:

You could alter this side slope by moving the (top) vertices up:

After adjusting the εpsilon for the 3rd time and using "Math: Divide" to easily adjust very small $z$ offsets, you can fine-tune the angle like this:

The end result with Merge by Distance added to deal with internal faces of the cutter, and of course the boolean at the end:

Of course if you wanted to specify an exact angle of the slope, you could - you would just pass that to the "Extrude" direction, calculate the angle of the normal from the vertical, and if it's not 0 (not the top face), then multiply the xy component of the normal by the ratio of wanted angle divided by current angle…

you are a gem . love the answer . however , i would still need this step : next side faces are extruded ( cutter width gn settings ) - cutter is widened , to get track width ; so i extruded side faces again , and got good results ; but the extruded sides will ' stick ' below the track level , which might be desirable ; i additionally tried to select outer edges of gn cutter (v2) with intention to raise those edge up on z axis ,which would flatten the bottom of cut-out track

i added an image of long wagon ' cutting the corner ' - this is why i need to widen the base of track

big thanks to
Markus von Broady
using his marvelous answer , i add 2 more nodes :

extrude mesh to widen the track
set position to move sides up / down

final solution :

it works like a charm , with additional cutting possibilities ...

have fun
EDIT : have no idea why .gif files are messy


text:
Has the shortcut for the Annotation Tool's eraser function been changed?
Previously, D+RMB would bring up the eraser tool, and rotating the mouse wheel in this state would resize the eraser.
But in 4.0 this does not work
What is the current shortcut? And is there any way to change it back?

EDITED
The keymap was there
But scaling the eraser range with the mouse wheel does not work

I can only confirm what @JohnEason wrote in his answer, the shortcut has not been changed - it still works for me and I've certainly not changed it to make it work like before since I hardly use annotations at all. Maybe there was a change made by accident? Maybe you have some third-party addons that need this shortcut and changed it? To change it back see his answer, to see if it is now attached to something else try switching the Keymap search from Name to Key-Binding and start typing "d right" to see if or what results come up.

@GordonBrinkmann Thank you
It appears to be set up the same as his
But the problem is still unresolved
Edited question

Blender 4.02 uses the same shortcut as version 3 here (D-RMB).
I've not tried changing it, but type 'gpencil.annotate' into the search field of Edit > Preferences > Keymap and the last entry under Grease Pencil seems to be the correct shortcut.

I checked and it looks like my preferences are set the same as yours

I've no idea in that case I'm afraid. As @GordonBrinkmann says it might be a third-party addon, or possible something external to Blender that has hijacked that key combination.

@Jhn Eason I found the cause
It seems the importer add-on called "Drag & Drop" was the cause
Thank you very much

Ah ok. It's always worth temporarily disabling external addons if you get unexpected results.