text:
Performing math operation on fcurve
I'm completely new to Blender and I'm currently in the process of analysing if this software is better suited than the one I'm currently using for my workflow. I'm currently using After Effect to create what I call "Motion Data", basically I use the powerful keyframe editor and expression engine of After Effect to create complex curve that rely on real world data. I'm not going to dive to much in the detail but Blender seems to be a much better alternative for my workflow as it would be easier to interface it with external sensor and device by writing script. It has all the tools I need except the one in this post title :
I absolutely need in my workflow to be able to perform math operation between multiple fcurve and see the result directly. For example multiplying / adding or pretty much any kind of linear math. From what I understand this is achievable in Blender using Driver, the limitations being that there is now way to "see" / "plot" the resulting output of the Driver. This make sense because the variable of the Driver function can be linked to the result of a time consuming simulation, so it wouldn't be practical to calculate all the output for every frame in order to display the graph. This issue is also mentioned here Possible to show Driver (scripted expression) output per frame like the graph editor does for "keyframed" parameters?
So far the only work-around that I could figure out after some research would be to create a script that would evaluate the Driver output for every frame, and then write the result as keyframe on a dummy property. But the script would have to be executed every time the Driver expression or the fcurve keyframe value change, which might pose performance issue. I'm not sure this implementation would be very practical.
Is this workaround is the only way to achieve this goal, or would it be possible to dive deeper in blender source code to add such feature to the Graph Editor and fcurve object ?
I'm open to all your suggestion.
Thank for the help !
EDIT :
As asked, I'm providing a toy example of the functionality I'm trying to transverse from After Effect to Blender.

Here is the After Effect 2023 Project : https://file.io/bwfjbo9kmLh3
A video showing the feature : https://imgur.com/xGYukEv
The Blender project to reproduce the feature : https://file.io/lPNSsCjhdGum

In the After Effect video, we can (barely) see that I have multiple property attached to a layer. One contains data that I've imported from an IMU, then I smooth those data in the second property. The next 2 properties contains hand-drawn curve made from keyframe, that will represent an Offset and a Gain that I want to apply to the smoothed data, and finally the last property contain the final result.
I made a Blender project that as kind of similar structure. There is a empty object (Single Arrow type) on the scene on which I created 3 custom properties. Using a python script I've imported the IMU data on the "Source Data" property, I've hand-drawn an fcurve on the "Gain" property, and the last one called "Output" has a driver that compute the "Source Data" * "Gain". But unfortunately I can't visualize the result of the "Output" property...
Why do that on Blender ?
For those interested, the goal of my workflow is the following :

Load and display data that come from an IMU that recorded the motion of a car for example
Manipulate the data to remove defect, inconsistent motion, increase or reduce motion amplitude ect...
Use those new data to have a live real-time control of a physical 6-axis device (A platform able to move in the 3 translations axis and 3 rotational one)

The end goal being to reproduce the motion from a real-world object on a 6 axis device.
Compared to After Effect, Blender would allow me to streamline the process by having a simulation of the 6 axis simulator that would be animated by those motion data, but it could also allow for a real-time control of the physical device on playback.

Looks like you are right. Due to specific task, I can't ready understand how it may happen. See, F-curve editor has an ability to add some math, like sin/cos functions, noise and linear functions. But there is no access to other f-curves. Drivers from this side much better, they can perform unlimited operations from different sources, but it never draws a F-curve.

You can add/subtract/multiply .. 'combine' existing tracks in the NLA editor.. or maybe generate a display of results using Geometry Nodes? Are you wanting to incorporate live input, or is this all keyed?

@RobinBetts I took a quick look at the NLA editor and it has some nice features but still doesn't allow to view the result of the blending operation. No I won't incorporate live input, it will all be keyed.

Maybe give us a toy example, to try. It's an interesting question.

@RobinBetts I updated the post with some example file and a bit more detail on the end goal of the project.

script that would evaluate the Driver output for every frame

You don't need to script this.  This is a "bake action" operation. You're correct in one limitation-- it no longer reacts to adjustments in the input parameters.  Another limitation is that is now sampled data, not the original expression.
A quicker alternative is "evaluate motion paths".  Doesn't write to f-curve, but provides visual description of your sampled output curve, and for whatever reason, it's a lot faster than a bake.  But, same limitations as baking.

if this software is better suited than the one I'm currently using

Blender is really good at dealing with sampled, spatial data.  It is not tuned for dealing with continuous, unsampled math; it is not tuned for having a huge expanse of time contained in memory all at once.
The sampled thing, there's no real workaround.  You can make your samples smaller, but you're not going to get around the fact that Blender is, inherently, about sampled functions rather than pure functions.  Even when dealing with time, Blender is really only concerned with the value at a specific frame.  I don't know if you can live with that.
However, the spatial thing is easily worked around by treating time as a spatial dimension instead.  Rather than making an f-curve, make a curve object.  Rather than evaluating your function f(time), evaluate your function f(x).  So long as your data is spatial rather than temporal, you can use any number of operations on all of it simultaneously and see the immediate output.  Changing data from a spatial dimension into the time dimension is pretty trivial, but changing from the time dimension to a spatial dimension is difficult.

I do in fact only use sampled data coming from an IMU, and I suppose that the fcurve are considered as sampled data using Bezier interpolation.
I think I see where you are going with the idea of using spatial data rather than temporal,  the idea would be to plot the output of the Driver using motion path that would draw a 3D physical curve. The issue is I would lose all the feature of the graph editor, such as scale axes, moving and zooming around ect... I'll try though to see what can be done with this approach.

@Eledwin Scaling, moving, zooming around etc are all also features of interacting with spatial data.  I can't think of a single tool available to temporal data that isn't also available to spatial data, and spatial data has a lot of additional tools on top.

Yes sorry you are right, I didn't express myself correctly. I meant from a data science point of view, it would be harder to do visual measurement on the resulting curve. For example if my data came from an accelerometer, I would need to know at frame X what is the acceleration of the resulting curve, then do adjustment to my Gain if it's to high. It would probably be possible, I would just need to draw some axes, tick label ect... in other word, recreate a graphing app inside Blender 3D viewport.


text:
GeoNodes delete geometry not working properly?
When the object I'm trying to delete makes contact with the target (I detect it using the ray cast node isHit) some times it doesn't delete it.

I have also tried using a geometry proximity node to detect the hit; the problem persists. I also tried using various targets very close to each other.

I have the understanding that this is a common problem, however I couldn't find a solution.
Sorry for not providing the file.

Without the Blender file to give it a try, and only a limited view of your GN graph, it is difficult to give advice... I notice that you have a "Join Geometry" node without a following "Merge by Distance" node. Could it be that for duplicated points, some are not deleted ? Could you provide your Blender file using https://blend-exchange.com with a setup producing the undesired behaviour ?

sorry Helios, but i can only downvote your question. You didn't even give us your whole node tree and not even a part which is useful. How shall we know what your named attribute is? how is it filled? Do you also call a car service shop and ask for help without providing your car and just saying "it makes noises"? So pls provide blend file, so we can check it out on our own.

Please rearrange your node tree before screenshoting. The problem was off screen and not provided in the screenshot. Also use descriptive file names like "geo-node-particle-collision".

You were doing the following things.

Check for collision using a vector "velocity".
Delete based on the collision.
Modify the vector "velocity".
Move by "velocity".

Hence your particles could easily move through objects.
You needn't change the vector between collision detection and movement.
The solution:

Check for collision using a vector "velocity".
Delete based on the collision.
Move by "velocity".
Modify the vector "velocity".

source: Stack Exchange

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

sort: votes


text:
Sculpt breaking when remeshing and using brushes
While sculpting, I came across a problem in blender. After sculpting for a while and having remeshed my models multiple times without any problems, after remeshing my model once again, my model started to break when I used any brush on it.
I have tried adding another shape into my scene and remeshing it, and everything in my scene seems to have the same issue.
I tried going back to an earlier version of my work, but the problem is still there, even if it wasn't there when I made the save.
I tried opening the file in another version of blender, but it simply crashes on startup.
Does anyone know how I can solve this issue?
Edit: When I make a new file and append the objects that had problems from the old file, it works again like normal.

Edit: This is what happens when I add a UV sphere, remesh it and sculpt on it.

If you want to have just one mesh, you need to join the individual objects (body+legs+tail) and then remesh them. Otherwise, there will be separate objects, each with its own mesh. Select them in Object mode and press+J to join the objects.

@Blunder I never tried to join the objects nor do I want to, this is not related to the problem

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


text:
Why are my arms bending with a bone instead of following the bone exactly
I am having major problems rigging my model
The right arm on the model is bending instead of staying straight like the left arm

Here is the model

Hello maybe you need to recalculate the normals before parenting, or please share your file

@moonboots I added the file at the bottom!

As you see the normals of the right arm are inverted, it will fail the parentage, you need to select all and recalculate in Edit mode (ShiftN), then parent again and it will work:


text:
Blender animation render in cycles slows down over night
Currently, I'm rendering 520 frames in cycles (4 to 5 mins a frame) so about 39 hours, naturally I try to render when I sleep for efficiency. I have done this many times before successfully.
When I woke up this morning I saw that only a single frame was rendered in 8 hours ar a totally random time.
I turn my monitors off before going to bed and I feel like it either has to do with this (I would not know why this would effect performance; again I've done this successfully before this way) or, it has to do with some windows power settings.

Either way, I am at a loss trying to figure out why only this single frame would render at 7am but nothing else.
Anyone have any idea what might cause something like this to occur?
PS. Just remembered I updated my blender from 3.6 to 4.2 yesterday, just extra info in case it is a possible effector. [Win 11 - 7950x3D - 4080 -32ddr5, always stable temp 60 to 70 while rendering]
[Solved] Thank you everyone for your comments. "Turning off monitors can make Window believe there are no monitors attached", this made the difference, just let 1 monitor on that goes black after a while on its own. Don't know what could cause this, because this never used to happen.

Turning off monitors can make Window believe there are no monitors attached, which depending on the render engine may affect rendering speed

Related https://blender.stackexchange.com/questions/260615/is-there-render-setting-to-prevent-pc-suspend

It also depends on what you're rendering. When I render a smoke simulation and the smoke builds from frame to frame, there are more and more volumetrics to render which makes each frame slower. Or let's say you're approaching a planet displaced with Adaptive Subdivision. Sure, far away things have less resolution, but the closer you get the more the planet might fill the frame, i.e. more displacement has to be calculated. I don't say your animation is anything like this, but we know nothing about it and I just wanted to show there can be several single or combined reasons then.

Of course only a single frame being rendered over night is probably not (solely) dependent on the animation itself. I had several times now where 4.2 (you said you updated) got stuck even in simple scenes, so maybe the current stable release is not yet so very stable after all.

Make sure you check all your render settings are still the same between versions too. I remember once this happened to me cause I was rendering with CPU in one version, then switched to another version and somehow it got set to using GPU but with the same CPU small kernel size. GPU/CPU render kernel sizes are like polar opposites. So my overnight render was basically stuck doing hundreds of samples on CPU optimized kernel sizes with a GPY, and it only got to one frame overnight.

Mind you this was like Blender 2.7 or something, and it wouldn't be like this now cause Cycles uses adaptive sampling these days, but this issue reminded me of that and maybe it's related to some render setting mismatch. Especially since you said you switched versions.

I'm also having this issue. Rendering starts strong at about 2 mins a frame, after about 100 frames or so, it slows down to 4 mins a frame for no reason. My computer is plugged into a TV, and I turn it off overnight when rendering, but as far as windows is concerned, it should definitely see it as plugged in. I don't have the PC sleep or anything, and power mode is set to high performance at all times.
Definitely seems like a bug or something.


text:
Sculpting in 2.83 doesn't sculpt every vertices
https://i.imgur.com/TeSWnbT.gifv
This is virtually my issue. Every time I want to sculpt something, its not pulling every vertices it needs to pull when sculpting. Sometimes, not always, but pretty frequently, I do CTRL+Z to go back and it crashes my Blender most of the time.
I Incorporated everything in the gif so hopefully someone can see what is wrong, I am using default settings as well.. Had a completely fresh reinstall of blender and the one I used on my now dead HDD is blender 2.81. The only addons I have added were CATS and some atlasing tool for CATS, which is a program to help quicken the process to port certain models to VRChat, this is helpful in a lot of ways to quickly pose the model and such. As well as merge different armature. Shouldn't touch anything sculpting related.
I am... genuinely curious as to what is going on here. I'm just sculpting and some mesh/Vertices aren't getting dragged when they should be. I watched a video and they said to try and apply scale. I did that, didn't help much at all. I'm at a loss right now.

How to upload an image to a post

see if there is any auto masking is active. if not then recalculate your normals.

6/19/2020 edit: it's a bug with triangle faces in blender 2.83 LTS. your workaround is to select your model go to edit mode and press f3 and search for tris to quads then try smooth sculpting. workaround worked on my side.

Thank you for the reply, I've checked, and none of those were checked. I made sure to check the ones I didn't have in mine, which were Delay viewport updates and use deform only. I didn't have those on. I tried it, nothing was fixed. Then I went to recalculate normals Outside, Did that, didn't fix, Recalculate normals inside, didn't fix. Then I used the recalculate normal button in my CATS tool and still didn't fix. Thank you for the reply however, Sadly wasn't my solution it would appear. Any hotkeys that could do the same for sculpting like the O does for Verticies?

can you maybe provide a sample?

Yes of course! Here it is. Hopefully not having any of my CATS tool, which really is somewhat external, show up right for you. https://tinyurl.com/SampleToMobin

hi I edited my answer please look it up. hope it helps. also if you are able, file a bug report to blender about it.


text:
How do you split this right down the middle...knife tool isn't helping

How do I cut this cleanly in half...got the knife tool to wrap around it but anytime I select it wants to grab all the lines coming into it from both sides and all I want to do it cut this into 2 pieces and into 2 separate objects but cutting a straight line seems to be hard to do.

It's unclear to me what you are wanting to achieve. Is the attached image the result you want, or is that the starting point?

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

Want to make a clean-through cut where the dotted black line is and separate the object into 2 pieces.

when you are in edit mode...

press k (knife tool) -> in the bottom bar text appears
select any start point you want by clicking with left mouse button
press A (angle constraint) -> in the bottom bar now there should appear (screen) instead of "off"
press C (in the bottom bar now appears cut through (ON instead of OFF)
now you will see when moving your mouse that you can easily make vertical cuts
left click your second point to cut through the whole object by pressing return afterwards

Already used the cut-through function, it is how I got the line through the middle. But if I select that line it grabs the lines coming in horizontally from it as well when I try to separate the object into 2.


text:
"Texture Space" vs "Texture Map"
Could someone please explain how Blender handles textures when creating objects in Geometry Nodes?
For example, consider this sphere I created in Geometry Nodes. One of the nodes is plugged into the Position socket, and the other is plugged into the UV Map socket.
Plugged into the Position : This one has its own set of numbers within three columns:

Plugged into the UV Map : Again This one has its own set of numbers within two columns (third column is just zero) :

My question is, how does Blender know how to interact with these numbers? I mean, they are completely different sets of numbers.
How do “Texture Space” and “Texture Map” relate to each other in Blender when using GN? why "position" node looks more symmetrical than "UV map" node?

probably because 3D position is using real 3D space (X, Y, Z) and  UV map  is using 2D space (X, Y)

Thanks @Emir  then why mostly everyone recommends using uv map?

For Geometry Nodes, i don't know. In general for 3D modeling, because is easier to create and manipulate a 3D object unwrapped in 2D space to add textures

You don't show your material, so we have incomplete information...

My question is, how does Blender know how to interact with these numbers?

It is described by node trees. Node trees are evaluated by Blender code using particular rules, in case of Geometry Nodes it can be simplified to:

Evaluate the geometry connected to the "Geometry" input of the "Group Output" node.
Iterate over all elements of this evaluated geometry.
For each element of this geometry, iterate over each input socket of "Group Output" node.
For each socket, check if it's set to the domain of the currently evaluated element. For example if the element you're currently processing is an edge, and the socket you're currently processing is set to edge domain, then evaluate the stuff (other nodes) linked to this socket.
Once evaluated, read in the modifier what name is assigned to this output attribute, and save the evaluated data under the index of currently evaluated element in this attribute.
Proceed to evaluate the next socket, once you run out of sockets, proceed to evaluate the next element.

If you know programming, think of each node as a function, and of links as parameters/arguments of the functions.
So in your case the "Group Output" has only one socket "geometry" so it just evaluates the geometry by asking "Set Material" for the geometry. This node in your case just adds a material to the list of materials of the mesh, and sets the material index of all faces to this material. However, before it does so, it too has to obtain Geometry, and it asks for it the "Store Named Attribute" node. The SNA node asks for geometry from the "UV Sphere" which generates the geometry based on given inputs and returns it. The SNA then does what Group Output could also do, it saves the evaluated link connected to Value socket in an attribute, evaluating the linked function for each element (here Point = vertex) of the Geometry. If you connect "UV Map" you will get slightly malformed data, because it's supposed to be read in "Face Corner" not "Point" domain.
More reading:

Combine two position nodes from different mesh primitives inside a geometry node tree
Raycast + Align Euler to Vector. Wrong Hit Normals
Geometry Nodes: What Does Capture Attribute Add to Geometry?
Understanding how "vertex of corner" works in geometry node
Passing Data Into Simulation Zone
Visualizing the "Selection socket" of the "Set Position" node

Thanks ❤❤❤ as always helpful. Could you kindly ❤elaborate on your answer in relation to "Texture Space" vs "Texture Map"? I’m new to the 3D modeling world and would like to know what the SDATA attribute describes. Is it a ‘texture map’ or ‘texture space’? I am that rookie.I’ve learned many keywords this week, but I’m having trouble putting them together in a way that makes sense to me♂

SDATA represents what you saved there. If you connect "Position" it becomes an alias of the vertex/edge/face position. Saving position is often used to store original position, then temporarily move for some reason, and then move back to the stored position. If you connect "UV Map", then SDATA becomes the UV map, which tells you what 2D coordinate on a texture (UV simply means XY, but other letters are used to not confuse 3D space, and texture 2D space) a given point is assigned to. Research "UV unwrapping" to understand this.


text:
How can I programmatically create a mesh similar to this one?
I am pretty good at manually modeling, but I would like to learn how to create meshes that are similar to the one in this video, specifically the one in the attached screenshot. I believe that it is possible to use nodes(?) or algorithms to generate things like this programmatically.
How would I go about learning to do something like this - are there tutorials/references someone can point me to? I am not sure what to search for. Thank you!

Blender does not (yet) have nodes for editing geometry (though there are some addons for this and it is on the plan for future features). In the meantime modifiers can be used to non-destructively create or edit a mesh, but they are not quite as flexible as a node system would be. I think it should be possible to get a result similar to your screenshot though (perhaps with an ocean modifier).

The Ocean Modifier does seem like the best place to start for this.  If you look through the QuickTools Addon, there is some code in there that adds a Sub-D Modifier using Python.  You may be able to adapt this to use an Ocean Modifier. https://github.com/CGCookie/script-bakery/tree/master/scripts/addons I've attached a screen capture that shows the node and modifier setup for my early attempt at making sand.  http://www.pasteall.org/pic/74081 For adding nodes, you can try starting with this http://blender.stackexchange.com/questions/14097/set-active-image-node-with-python/14115#14115

Here's my attempt at simulating your reference image using modifiers:

All it is is a cube with some modifiers:

The ocean modifier generates the base mesh/distortions, and the waves are done with a displace modifier using a wood texture.

There was a project/challenge a while back called "default cubisim" with a lot of great examples of modifier art.

The file doesn't seem to be here anymore, can you re-upload it somewhere, please?

If you are willing to fabricate a mesh by specifying the vertices and faces, it is relatively straightforward to use from_pydata(v,e,f).  The hard part is imagining the math to make your vertices and faces accomplish the look you are targeting.
There are many examples available on the internet, but here are two links: triangle donut; bathymetry
and a copy of the triangle donut code in case the internet is broken:
import bpy
import math

def triangleDonut(name, nChunks, r1, r2, z1, z2):
    verts=[]
    faces = []
    for i in range(2*nChunks):
        v1=i*3
        v2 = v1+1
        v3 = v1+2
        v4 = v1+3
        v5 = v1+4
        v6 = v1+5
        if (i+1 >= 2*nChunks): # connect the end to the start
           v4=0
           v5=1
           v6=2
        theta = i*math.pi/nChunks
        if 0 == i%2:
            z=z1
        else:
            z=z2
        c = math.cos(theta)
        s = math.sin(theta)
        verts.append( [r1*c, r1*s, 0] )
        verts.append( [r2*c, r2*s, z] )
        verts.append( [r2*c, r2*s, -z] )
        faces.append( [v1, v4, v5, v2] )
        faces.append( [v2, v5, v6, v3] )
        faces.append( [v3, v6, v4, v1] )

    mesh = bpy.data.meshes.new(name);
    mesh.from_pydata(verts, [], faces)
    mesh.validate(True)
    mesh.show_normal_face = True

    obj = bpy.data.objects.new(name, mesh)
    scn = bpy.context.scene
    scn.objects.link(obj)

triangleDonut("donut", 20, 3, 2, 1,1.5)

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


text:
Extrude into geometry at edge of model
(Probably not the best title for this issue but I've no idea what to write instead)
I have this model

And I want to extrude the selected area along Z by -0.1. When I do that I end up with this

As you can see I get a "fence" along the outer edge of the model, which I don't want. I tried ticking "Disolve orthognoal edges", and that is why the fence is missing one face.
I understand why the extrude command does this, but I can't figure out how to do it properly, and preferably fast (since I have to do a lot of these hexes). Deleting the fences' vertices screws up the remaining geometry, so fixing it after the extrude command is not straight forward, at least not for a newbie like me.
Any and all pointers would be appreciated.

if extrude manifold doesn't work, maybe do the opposite (extrude upwards the other part, then lower down the whole top?)

Yes that is second possible solution in my mind as well, but it still depends on what exactly he needs, this solution would remove the bad topology, try both and see which one is faster for you

Try to use Manifold extrude:

You will find this either by holding Alt+E and selecting manifold, or by changing default extrude to manifold in your tools by holding it:

Your topology will be still wrong as it will create ngons (technically, but it really depends on if you really need topology to be right or not)
Okay, after reviewing your file, this is the problem:

This happens for a simple reason, the reason is that your face on that side has 5 vertices and not 4.. that's all, look what happens when I cut it with a knife into 2:

And it suddenly works when you add a line in the red spot, this is due to you should always make your topology as clean as possible, in your case you need to remove faces with 5 vertices and make 2 with 4 vertices. Always try to go for quads.

I tried it, but it left a small piece of fence intact. Extruding the higher part up first then moving all the top vertices down again as the other commenter suggested did the trick. Not sure why it worked so well for you in the above picture but not for me

maybe share your file so that we can give a try: https://pasteall.org/blend/

You guys are super-helpful! https://pasteall.org/blend/d98d2c6a9b55457cb4d2107e1284e9ef

I just looked at it and I know why it is happening, your topology has 1 mistake, let me show in my answer, I will edit it in a second,... edited

Thank your for investigating. But you used the knife on the extruded mesh, right? After the fact I mean. Can I avoid the issue altogether by dividing that face before I extrude down?

Never mind, I had another look at my model I and get what you meant. Thanks!

No, I used knife on original model, I just didn't include it in photos


text:
Mesh is Weirdly Deformed in Object & Sculpt Modes
I'm following a video tutorial on sculpting and when I switch back to object mode to review my work there are weird random spikes jutting out from my mesh, as best as I can determine they arise from attempting to work around the neck area.

Attempting the smooth or polish tool around the neckline causes this:

Here's edit mode.

Here's sculpt mode:

In sculpt mode the original deformations didn't appear, I only noticed when I went to object mode. Back in sculpt mode the neckline deformations occured and all attempts to smooth it out haven't fixed it.

I have seen results like this after adding new geometry to an object with a multires modifier. It seems having flipped normals contributes to this.
As your learning, I suggest you delete the multires, go into edit mode and select all vertices, CtrlN to re-calculate the normals, add a new multires modifier then re-sculpt.
If you want to keep your sculpt data the only fix I can come up with is to apply the multires, go into edit mode, select the stray vertices and use smooth to bring them back into place. Press W and select smooth or find Smooth Vertex in the spacebar menu, then use ShiftR to keep repeating the last step.
I think I found a way to reliably re-create the issue so will report a bug.

Please post a link to the bug report when you do it.

So far based on a suggestion from blender artists I think it had to do with two issues, but I haven't confirmed yet. One suggestion was to close the neck area and then use smoothing; this did appear to prevent the worst of the spikes that went out to the middle of nowhere but didn't prevent the smaller tinnier triangles that congregate at the neckline itself that you can see in picture 2. My assumption now is that when I extruded the new geometries to make the neck I didn't use the mouse but the arrow keys, perhaps it doesn't like sharp angles as a base?

Bug reported

To also reiterate, I never added new geometries to my mesh, I made the mesh as seen in figure 2 first and then added a multires modifier and then sculpted. Nothing else.

If you set the multires preview to 3 to match the sculpt does object and sculpt mode look more alike? Any chance you have duplicate vertices, in edit mode select all then W->Remove Doubles. You'll get a message at the top saying how many get removed. If your issue isn't the same cause as I describe I still think it's a bug, trouble is can we find a way to re-create the issue, or can your file provide enough info to find the bug?

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


text:
Having problems with artifacting and odd geometry bending with rigged model
I am new to rigging so I don't know the more in depth details of what I have to do to get it to work right.
Here is a video of what I have... https://youtube.com/shorts/VEwOycbygDw
My first problem is with the weird geometry at the bending points of the legs. As you can see, where the knee bends, you can clearly see some weird warping of the geometry. This also happens at the pelvis and ankle. I think it might have something to do with my topology but I don't know. Here is a picture of that...

The topology is really bad because I built the model a long time ago when I didn't really understand what I was doing but I thought there would be enough for it to at least work properly.
My second problem is with the artifacting that you see throughout the video. Recently I had the same thing happen when trying to render a particle animation without baking it first. Is there a process of backing rigged animation like there is for particle animations?
If need be I can always upload my project files if that would help you guys out.
Thanks for the help bros!

You may be able to fix that if you smooth the vertex groups, also you could remove some edge loops (make it a bit lower poly) and give a Subdivision Surface to your object, maybe share it so that we can give a try: https://blend-exchange.com/

Hey @moonboots! Thanks for responding. Here is a link to the project file if you wouldn't mind taking a look as seeing where I am going wrong. thanks again! https://drive.google.com/file/d/11iu07SKGq61J4U8ZEAs4ikd0Xi8lku6u/view?usp=sharing

Sorry @moonboots I just saw the Blend-exchange link. The project file is now in there as well. Thanks.

You first need to recalculate the normals (ShiftN). The weight is not optimal, first thing for the moment the weight is not aligned with the bones:

Also it is too sharp, you need to smooth the weight, you can do it with the smooth operation:

Also you can weight paint but choose a smooth brush:

Also keep the Strength low:

Thank you so much @moonboots this was exactly what I needed!


text:
Particles not dying when colliding with geometry that has "kill particles" activated
I have particles following a curve guide and a collision physics modifier added to a cube with "kill particles" activated. I have the permeability of the cube keyframed so that when the artery closes, the permeability is at "0" and when the artery is open, the permeability is at "1". Can anyone give me an idea of why I am having these problems in the final render? they don't show up in the viewport.
Video of what is happening: https://www.youtube.com/watch?v=XzUokN3JfgA
Screenshot of the cube:

I think this post would be a bit clearer if you opened with a simple statement of your intent,  something like: 'I want to obstruct passage of  particles when the vessel is closed'.. if that's the case.

Have you set keyframes for the permeability of the collision?
The permeability should also be set to zero when eliminating particles.
Or have you not rebaked the particle system?

I guess this (although giving a possible solution) is rather a comment asking for clarification then an answer. But maybe it helps so just leave it here. Apart from that, regarding the possible solution: as I understand the setup, the artery should kill the particles when it is closed..? And in this case permeability is 0 according to the question. Probably I just don't understand the setup.

@iskanime Yes I have the permeability keyframed. I've included a picture of the permeability keyframes at the bottom of the post now. I am new to particle emitters. What is the rebaking of the particle system workflow? Up until now I haven't heard anything about this. I can also send a link to the project files of you would like to have a look at it yourself! Thank you guys for responding!

@GordonBrinkmann I can also send you the project files if you would like! Thanks again!

@Stengy02 Yes, I think it's necessary to upload the project files. That way, it will be easier to identify any issues.

@Gordon Brinkmann Thank you! I'm not very familiar with StackExchange yet. Yes, this answer might be more suitable in the response.


text:
How to use float curve node to flatten geometry from two sides rather than all four sides in geometry nodes
I am trying to show this vein being compressed from only two sides so it "pancakes" and flattens out rather than compresses circularly from all sides.

As of right now I have two float curve nodes so I can have the vein oscillate between compressed and uncompressed in my animation. Here is a visualization of what is happening and what I want to happen...

Really appreciate any help or feedback! Thanks guys!
Full geometry node setup...

A duplicate? Geometry nodes - Curve to mesh with profile and taper or scaling in two axis

If you want to squeeze it in one direction only, you want to do it on a part of your GN you're not showing: the curve cross-section.

Here, I'm mixing between the position of a scaled cross-section and an unscaled cross-section so that you can see how you might transition between one.  I'm also doing something dumb to the curve tilt to demonstrate how the eventual outcome of this scaling depends on the curve tilt, so that you can control exactly where the scaling occurs by controlling the tilt-- possibly, even changing that across your curve, as I'm doing.

Hey man, thank you for answering. I am extremely new to geometry nodes. this is a setup I got from Ryo Mizuta (https://www.youtube.com/watch?v=whh1QblAGEo&t=1s&pp=ygUTcnlvIG1penV0YSBncmFwaGljcw%3D%3D). What you are doing is exactly what I am looking for, I just don't know how to implement it. I posted the full geo node setup to the end of my original post. Any way you could give me some guidance on how to implement what you are doing into this setup? Thanks again!

Not without having any idea of what's inside those node groups, and possibly, not even then, because it looks complicated.  Implement on something simple first, then build your way up to your full complicated structure.


text:
Compositing node not showing up in render
I created a simple render with a compositing node: the "fog glow". I want to make one object give off this glow. However, not only can I not find a way to affect only that object, it doesn't even show up in the rendered result.
These are the nodes I've used. Am I missing something?
I am using Cycles Render, not Blender Render!
 Here's the render (I was fiddling around with it after a few responses and have come up with nothing, clearly.)

There are two problems here. The first is that you are not getting any fog glow and this is easy to resolve - the problem is that only parts of the image that are above the Threshold setting of the Fog Glow node will be made to glow. As you appear to not have any bright emission parts of your render, using a Threshold of 1.0 will result in no glow - try reducing the Threshold in order to see the glow.
As for the separating the glow so as to only affect certain objects in the scene, you can use the Object Index render pass to generate a mask in order to affect only those elements that you require to 'glow'. In order to do this, first give each of your objects that you require to glow a specific Object Index by setting the Pass Index in the Object properties in the right-hand panel :

Enable the Object Index pass by enabling it in the Render Layer :

In the Compositor Nodes, you can now use the following nodes :

Here the ID Mask is set to the same Index as you have used to identify your object(s). This will produce 1.0 for each pixel corresponding to the parts you want to 'glow' and 0.0 for the rest of the image. The subsequent Mix nodes generate two images - one where the objects matching the Index are black while the rest of the image is shown, while the other where the object is shown with the rest of the image black.
The Fog Glow can then be applied to the relevant image to apply the glow - ensure to set the Threshold to zero so as to glow everything that is greater than 'black'.
All that is now required is to recombine the two images using the Add mode - any black regions will be replaced with the other image. Since the masks used to generate the images are mutually exclusive, only the 'glow' parts of the images will overlap.
This can produce the following result :

Looking at your Blend file, you've got some minor differences in your setup that are affecting your results. This should be amended as follows :

Not the highlighted changes; the Mix nodes should be mixing black (otherwise the white will also be "glared"), the two branches should be combined with Add instead of Mix, the Fog Glow needs a lower Threshold.
Note that the Fog Glow produces quite a subtle effect. A quick way to increase it would be to chain multiple Fog Glow nodes together :

I noticed that this was in Blender render. I'm using Cycles. Should they work the same? I followed all your instructions exactly, and can see no other difference between the two.

@Claire I was also using Cycles - I’ll download your Blend file later and take a closer look.

Okay, clearly I'm clueless, then. I'm fairly new to Blender, if you hadn't noticed already. Thank you.

@Claire No wories - it only takes one thing to be wrong and the whole result is ruined - it can be very confusing! I've spotted a couple of problems with your nodes which are causing it to not work. I've added an edit - hopefully this helps.

It has worked! Thank you so much for your help! I will be using this in the future.


text:
I have finished rendering my animation into PNG files, how do I edit?
I don't know how to make all the PNGs into one seamless short, via iMovie/Filmora

You can use Blender's Video Sequence Editor to import the image sequence, perform editing and export as a video file. There is no need for using another software, unless you require a specific feature that Blender doesn't offer.

I use Hitfilm Express ( free ) and Openshot video editor ( also free ); both can import the set of .png's as an image sequence.
it is best to put them in a separate directory with only the image sequence as you need to select the directory.

Why don't you use Blender?


text:
Object Constraint menus and data Not showing up once constraint is added
in 2.79b, when I add a constraint to anything no additional edit menus appear.  Usually, and I checked this with a version at the school I teach for, a constraint menu will appear under "ADD OBJECT CONSTRAINT" once the constraint is added.  Nothing appears.  So I cannot use constraints and this is a problem since I have several rigs that need rigging and the constraints are not showing up to complete the rigs.
I had constraints a few months ago, the last time I needed to use them, but now they are not showing up.  Is there something that can make constraints not run?  Are there addons that prevent the constraints from running properly?
Thank you for any help you can provide.

Could it be that the options you want appear in the floating panel, bottom left of the 3D view?

it does not want to add any more than one image, but the one is enough since the constraint menu looks identical before and after I add a constraint.  In this example I added the dampened track constraint so the plane will follow the camera as it tracks.  However, as you can see there is no data to work with.  Also, I added the constraint in 2.8, brought it back over to 2.79 to see if I would have data in the constraints tab, and the file just crashes.
ANY HELP PLEASE...THANK YOU.

I tried other windows to see if the constraint data would be in any of them, the menus do not appear anywhere.


text:
Create distorted striped material
I'm trying to make a mountain model in Blender with distorted striped layers. Based on this solution I made striped layers but I need to have distorted layers in the final model as well. I mean something like this. I tried to add a random value to the Sine function (using Object info node) but it didn't work. Can you please help me to add this kind of distortions to my model?

Just add a Noise Texture and connect the Factor out to the Greater Than empty input.

@rob Thank you for your answer. But actually this isn't what I want to have. Your suggested solution makes noise only on the edges of stripes but I want to have noise on the whole stripe. This is the result of your solution: scr1 and this is what I want to have: scr2 (I edited the second image with GIMP)

update the question with the images. Question updates are seen by more people than comments. I think you can affect the texture coordinates to create the effect you want but I am unsure how.

Try to use what I made and tweak the settings. I think your wished effect is maximal one node away from my solution. I can try later to tweak it a little to make it look exactly like in your image. But I want to encourage you to try it yourself and see if you learn something by it.

I found the solution with your help. Thanks @HenrikD

Unless you have special reasons for the DIY math, it might be easier to use the built-in distortion option of the Wave texture node?

The nodes:

you know whats funny... I did know you could do it like this but I hate that Mapping Node. I think it is really unpractical and hard to setup correct. A simple Vector is much simpler I though, so thats what I made.

@HenrikD .. and if you want more controllable specific distortion, as in the OP's last illustration, you still have to get the math nodes out anyway, to distort the texture space of one noise with another  noise, or waves... etc etc.

I am sure if you asked google on this you would find fitting Materials. But you seamingly didn't and neither did I. So I made the following setup to be as parametric as possible, since you didn't make clear what you want to achieve.

There are those named fields that you can use to tweak the distortion and there is the color selector on the left on which you can specify the direction of the lines. You can also replace that color selector by a Combine XYZ Node to gain better access to the numbers of the normal vector. Hope this solution can satisfy your needs.
EDIT:
If you want to make the texture that you showed in your post, you just need to turn the distortion of the noise texture up. I pretty much got it to match your image.


text:
Why doesn't area.tag_refresh() refresh the area?
I have an IMAGE_EDITOR area opened. I change the loaded image's content from another area, but area.tag_refresh() doesn't update it automatically, only when I do something related to the IMAGE_EDITOR area (zooming, moving the image in it, making the area bigger or anything like that).
Fortunately I can touch the area from code to make the image refresh itself without touching it manually, but it's hacky. Is there a better way to do this?
def img_redraw_handler(scene):
    ...
    img_bpy.pixels.foreach_set(img_np.ravel())
    for area in bpy.context.screen.areas:
        if area.type == 'IMAGE_EDITOR':
            #area.tag_refresh() # <-- This one doesn't work
            # HACK TO REDRAW - START
            area.type = 'OUTLINER'
            area.type = 'IMAGE_EDITOR'
            # HACK TO REDRAW- END
bpy.app.handlers.depsgraph_update_pre.append(img_redraw_handler)

SOLUTION:
def img_redraw_handler(scene):
    ...
    img_bpy.pixels.foreach_set(img_np.ravel())
    img_bpy.update()
bpy.app.handlers.depsgraph_update_pre.append(img_redraw_handler)

many thanks to Sietse Brouwer

Haven't tested it, but you can try an img_bpy.update() before the area.tag_refresh().

Yeess!
img_bpy.update() is all that's required, not even area.tag_refresh() is necessary.
Thank you very much! I would like to give you an upvote so much, sadly I cannot:(

Glad I could help. I've added an answer, for others who come across this topic.

The solution is already in the question, but for future reference I will post it as an 'official' answer.
After setting pixels of an image, an img_bpy.update() is required to reflect the changes in Blender.
def img_redraw_handler(scene):
    ...
    img_bpy.pixels.foreach_set(img_np.ravel())
    img_bpy.update()

bpy.app.handlers.depsgraph_update_pre.append(img_redraw_handler)


text:
Particle System not showing in final render
I am using two particle systems on an object. When I go to render preview or material preview in the viewport I can see the particles perfectly fine. However, in the final render the particles are not visible at all. These are my settings:

I have tried multiple things such as messing around with frame start and end values, and rendering different frames, but nothing seems to work.
Also, something strange happens when I simply click to select a different particle system slot (out of the two I have), the particles in the viewport disappear for some reason, and I have to select a new frame via the timeline for them to come back to view. If more screenshots need to be provided, tell me what information I should provide since I don't know what could be causing this issue.
Thanks.

Hello, have you baked the simulation before rendering?

Where do I do that? I don't see anything related to baking under particle properties. I have physics turned off because i don't want to render an animation, I just want to render a single frame, if that has anything to do with it maybe.

In the Particle System panel, under Cache, click on the Bake button

I don't see a 'cache' option anywhere. I updated the post with a picture of all the tabs present under particle systems.

That's weird, could you please share your file? (remove all the useless objects) https://blend-exchange.com/

It seems to be working now after I removed some objects that I duplicated as backups from the scene. There was probably some overlapping or something going on, since my collections were pretty messy lol. Thanks for your time anyway though haha

Oh ok great then  ;)  .......


text:
How does a monkey head touch a cube
How does a monkey head touch a cube

Add a Store Named Attribute in a simulation zone. I called it status. Store  a boolean with the value $1$ on it.
The selection, to which this attribute is applied, is driven by a mesh boolean between the cube and the monkey head.
We can determine, if the meshes intersect, by examining the point count of the resulting mesh. If it is larger than 0 they intersect. Thanks to auto-casting we can insert the point count of the boolean mesh directly into the selection input of the Store Named Attribute node.
Make sure to set the material and read the status attribute from the material nodes.

Left: Material Setup, Right: Geometry Node setup on the cube
You need to play the animation starting on the first frame or cache the simulation zone to properly see the attribute change.

Thank you very much


text:
How to convert tracking points into paths

Convert tracking points to paths

What do you want? A straight line from a start position to an end position? Or a more complex curve with intermediate points over time?

Convert any point of the tracking model into a path curve

https://blender.stackexchange.com/questions/52830/is-it-possible-to-create-a-path-from-an-existing-object-animation/52831

If I understand the question correctly, you want something like this: a curve that is created by following the movement of an object (here I just used an animated empty):

To do that in Geometry Nodes, use a Simulation Zone and add points on each frame by reading the current Location of the empty from an Object Info node. Then convert the points into a curve:

Thank you, that's what I meant. I have a more complex question. Can we create a mesh based on the volume of an object?

https://blender.stackexchange.com/questions/328143/how-to-create-a-plane-based-on-the-trajectory-of-an-object


text:
How to set poinths to cuvers to merge curves based on the closest distance

How to set the curve to be on the right side without cross linking, as the distance between the points on the right side will be smaller than the width of the two points in the middle. It is necessary to set a distance greater than this before not connecting them.

source file
enter link description here

I think this could work: 1. Selectively join points using geometry nodes. 2. Capture Mesh Island. 3. Convert vertices to points (not sure if this is needed, if not, then 2. is also not needed). 4. Points to Curves using (captured) mesh island as group ID.

Thank you for your answer. I have tried dividing line segments into many different ones, and I want to minimize the number of segments. 2 or 3 segments are also acceptable, but this method requires more than 10 line segments.

You mention you want to base it on distance. So you can use the linked answer to select points within given instance of each-other. Then just convert that to curves.

Thank you for your answer. I was just researching and I don't know why there are so many line segments. Can you help me download my source file and make a case study? Thank you very much. I have been studying this answer for several hours.

https://drive.google.com/file/d/1XNMfudMtFj2b0riR3yq426qWfxVr7TjU/view?usp=drive_link


text:
How to create a plane based on the trajectory of an object?
How to create a plane based on the trajectory of an object?

How to create a plane based on the trajectory of an object?

My current approach is to create a new plane, dynamically draw it, and then replace it to create it. Is there a better method?

How will your object look like? Will it be just a plane?

The wake of the aircraft needs to be converted into a plane or grid

It's pretty vague, could you please edit your question and give more precisions?

Similar to where a lawn mower has been, there is no grass left. Places that have been visited need to be converted into grids

Create an animation of a lawn mower

Give temporary thickness,  join with previous frame,  convex hull, boolean with the rest,  flatten

I'm not sure that this is what you want but for a lawnmower, create the lawnmower (1), create the surface (2), subdivide it, assign all its vertices to a vertex group, give it a particle system with an object as particle (3), under Vertex Groups > Length > select the vertex group:

Give a Physics > Dynamic Paint to your lawnmower, Type > Brush, click on Add Brush, Source > Paint > Mesh Volume + Proximity. Give a Physics > Dynamic Paint to your surface, Type > Canvas, click on Add Canvas, Surface > Surface Type > Weight, Output > Vertex Group > select the vertex group. Save your file, animate your lawnmower, bake when you're good:

Thank you. Dynamic painting is what I am currently using, and this is how it works. I hope to achieve this using geometric nodes because I need high precision and a lot of subdivisions, which makes it very laggy. I hope geometric nodes can help with this.

Simple planar wake for animated object - Geometry Nodes
Here is a simple way of generating a wake for an animated object.

Start with a vertex at $(0,0,0)$
At each frame, extrude last vertex to current position
Translate geometry to stay fixed according to global position
Convert from mesh to curve, resample
Generate mesh with Curve to Mesh

Here are an animation, the nodes, and the blend file. Feel free to ask if something isn't clear enough.

Thank you for the geometric nodes, which are exactly what I wanted. However, what I need is a complete surface, such as the trajectory of a monkey head generating a monkey head, accurate to the point where the ears brush past, a complete and precise trajectory.

thank! Thank you, can it be a completely accurate path plane that the lawn mower has gone through, without exceeding the left or right plane?

It's already "accurate" per frame. Currently no easy way to have subframe precision. And I don't understand your question.

https://i.sstatic.net/7oYyo7me.jpg

Thank you, I hope we can create a flat mesh based on the volume with precision to the width beyond the ear.

https://i.sstatic.net/fVoU8X6t.jpg

I'll wait for you to explain more precisely your question. Let us know in your original post everything we need to know about what you want exactly.

https://drive.google.com/file/d/1byFPTcmMGNjMHjG-xmD8bkdXHRXgvGq2/view?usp=drive_link

https://blender.stackexchange.com/questions/328159/how-to-obtain-the-volume-of-object-movement-trajectory-and-generate-a-plane


text:
Ugly deformation for wrist and shoulder with IK
New here.
I've been implementing some basic IK stuff for a rig of mine. The arms, the legs, etc. Overall I'm happy with how it's been going, but there is a problem.
Whenever I go to push the rig's arms into a more complicated position (in this case, a casual "hands on hips" sort of pose) I end up with some very twisty deformation at the wrists and shoulders.

There's an option to "preserve volume" for the mesh on the armature modifier, and that would be a decent enough band-aid except I need to export the model into Unreal Engine, which won't accept modifiers.
I think this might be a common issue for newbs like me, but I haven't found a clear solution online yet. Hopefully someone here has some suggestions! Any help is appreciated.
EDIT: Here's a PasteAll link to the .blend file if anyone wants to take a direct look: Blend File Link.

Possible duplicate of Shoulder deformations

You need twist bones, for both humerus and forearm.  Shoulder is rotating in Y axis when it shouldn't (fixable with locks, if not using a pole.)  But fixing it will leave your elbow in wrong position, for which you need a humerus twist.  Same for wrist: your hand bone is at too strong local Y rotation compared to forearm, but can't change forearm without breaking the elbow's angle lock-- unless you add a forearm twist.  (Weights, and likely bone placement, are not ideal either, but the twists are the major issue right now.)

For the elbow, it looks like your arm is pivoting on itself. Think of like a rope you hold tight with one hand and you twist with your other hand. It's what's happening here.
A solution for that would be to lock the bone's rotation on its Y axis. Either through a Limit Rotation constraint, either in the bone's Inverse Kinematics panel:

Otherwise, understand that bones do only one thing: rotating vertices around. The "preserve volume" does help to keep the volumes, but it doesn't do any miracles. When two bones rotate on each other, there's always a point when some vertices go the wrong way.
And that's why we use "Corrective Shape Keys". Just make some of those and you will be fine. Also, there are some addons out there (like that one) that might help you create your CSP faster. But start manually, so that you learn how it works and understand how everything works.

Took me a minute to find the right configuration, but I think it's looking good! Thank you for your help!

Similar to L0Locks answer an alternative is to add a copy rotation modifier with 50% influence to the next bone up the chain. By setting the influence to 50% the rotation will blend with the rotated target bone providing a smoother transition. Definitely not perfect but good for a quick fix. Note: you may have to play with the axis invert setting depending on your rigs orientation.


text:
Eye problems with dragon
Okay I'm trying to create this model for a character of mine I call "Truth Dragon".
Only problem is, this sucker has two sets of eyes. One small and the other is bigger. Here's a sketch of what I mean.

So I got most of it done and this is what I got so far, until I went to scupt/object mode.

For some reason, the second eye on the top is doing something weird. I've deleted all duplicates, messing with it in scuplt just messes up the eye shape.
I definitely have no idea why the nose is doing that.
https://blend-exchange.giantcowfilms.com/b/5637/ Here's the file if you need to see for yourself.

can you add your blend file to your question? Grab the URL of the question
Go to https://blend-exchange.giantcowfilms.com/
Select the blend file
Add the url of the question
Grab the url that results
Go back to the question and edit it
Add the new url to the bottom of the post

The Multires modifyer doesn't like to work with Ngons. So redo the eye openings without using any Ngons, only quads.

What do you mean by Ngons and Quads? Sorry, I'm a beginner at this stuff

Quads are faces with 4 edges and Ngons are faces with more than 4 edges. ( tris are triangles ) .


text:
Mantaflow not baking particles
I'm new to Blender, and I'm trying to do the simplest fluid simulation possible in 2.82 using Mantaflow. I can't tell if I'm experiencing a bug, or not following the correct guidelines.
I'm using factory settings, everything is untouched except two meshes, a large domain cube (fluid physics->type: Domain [Domain Type: Liquid] & liquid option is checked) and a smaller fluid cube inside (fluid physics-> Flow Type: Liquid).
After baking, no particles are displayed throughout the timeline. The cache shows that it's certainly saved something, though.

I saw this video a while ago that provides some fixes: https://www.youtube.com/watch?v=2O0QcLpAxV4&t=545s
Basically:

If you have a planar object, like a plane, it is bugged. In the flow object panel you have to increase the surface thickness from 0.5-1.
Make sure both object fluid modifiers, the domain one and the flow one, aren't hidden in the viewport or on the render when you bake fluid.
Make the Flow object bigger, but not bigger than the domain object and the flow object must be inside the domain object.

Those are some common problems, but without the file, I can't check what's wrong. Hope my answer helps, though!


text:
Shadow Catcher: How to convert from high bit depth render to alpha PNG and maintain reflections?
With the advent of Blender 3.0, the new shadow catcher can now capture reflections. All good. Except there is no way I can think of to export the image as an 8-bit trans PNG so that the reflections are intact. I can of course export as EXR, but even then there is no way to convert the EXR to PNG either in Photoshop or the compositor. Any help would be much appreciated.
Here's what I eventually want (from the render window)

You'll notice the nice reflection in the floor shadow (and reflection) catcher plane.
Here's what I get if I export as 8-bit PNG alpha:

If you open this file, you'll see there is no highlight. Here's a composite over a gray background so you can see what I mean.

So, maybe someone has an idea on how I can create a PNG with trans and both the reflection and the shadow.
BTW, it's not necessary to tell me about bit-depth of the final render. I know WHY this is happening, I just don't know HOW to make it so it works correctly for me. Thanks.
PS Also, if there's a fix in the compositor, then that's even better.
Here's a link to the file in case anyone wants to try it.
https://filedn.com/lLMW4jXsJqxXkRYjd1UCoKL/3d/TEST-SHADOWMAP.blend

have you tried exporting as 16-bit png or as openEXR?

Yeah. First thing I tried (see above). When I export as EXR, I still cannot get it to convert properly in Pshop.

This is my issue as well. Did you find a solution to this, Chipp?


text:
Blender no longer opens my blend file, it loads the Export FBX screen and is stuck there
It's completely bizarre, I tried opening the blend file on my other computer, I tried deleting to blend1 file, I tried factory settings, somehow my blend file got corrupted?
Basically I was exporting to FBX, and then it got stuck on that screen, when I exited and reloaded it, it loaded straight to the Export FBX screen, I can't get back to my scene no matter what.

Open the file without the Load UI option ticked
Go to File > Open and browse to open your desired file, but before you open uncheck the Load UI option on the bottom left of the File Browser window.
If not, open a new Blender instance and append your scenes from the previous file.
Otherwise post your file here so we can look at it.


text:
Customizing the Rigify meta-rig, Constraints & Custom Drivers, what's the solution?
basically as the title says I am interested in two things:

How do I add constraints (Copy Rotation, TrackTo, etc.) to bones in the metarig, and then have them created/applied to/copied to the appropriate bone layers when you click the generate button.
Similarly, same for drivers. If I add a driver to a bone in pose mode on the meta rig, I see that it appears in the ORG layer when I click generate. How would I go about adding custom drivers so they appear on the appropriate working bone layers? Ideally for following this tutorial here: https://www.youtube.com/watch?v=LnsYKGDpBtQ I basically would prefer not to redo this if I need to make a change to the meta rig.

If there are some alternative solution or workflow to get the end effect, I'd be interested. I am tempted just to make my own rig, but some of the template subrigs like tentacle are very useful though, especially the IK/FK setup and that seems to be a pain to learn how to make.

Adding constraint and relinking to a @bone_name/@CTRL/@DEF/@MCH bones is easy with basic.raw_copy & basic.super_copy
Turn on "Relink Constraints"
Go to its constraint rename the constraint to the desired target.
e.g "Copy Rotation" > "@ORG-thigh.L" without those "", you can leave the target blank and it will still work, unless it's  a "stretch to"
it was quite confusing with Blender's official doc, because there were no example. I learned it from this doc:
https://epicgames.github.io/BlenderTools/ue2rigify/advanced/relink-constraints.html

You can't, at least not easily. The only rig type that preserves constraints after generation is the Raw Copy. And that one is pretty advanced and I am not sure what the correct usage for it is.
The only thing that would work without serious coding knowledge is to finalize your meta rig and add your constraints on the generated rig.

Currently I've just decided to make my own rig from scratch to do all the things I want it to do. I'd look into raw copy if the documentation/youtube tutorials existed for it, I'll have to try the next time I give Rigify a try.

Yeah, it's not well documented as of now.


text:
How to restrict vertex weights to no more than N number of Bones?
I have a program that can animated a mesh using OpenGL but problematically it can only work and not crash when each vertex weight is affected as per the title to a maximum of four bones. The tutorial code I acquired used a simple model from some Morrowind inspired game where all it did was turn its head; in blender supposedly I can select each vertex individually and remove weights associated from unimportant bones but this seems tedious.
Is there a way to do this conveniently?

In weight paint mode, select the Weight Tools panel in the toolbar, and run Limit Total, This removes vertex groups with lowest weights.
This defaults to 4 which is a common limit for game-engines.
You can also choose which vertex groups are effected when using an armature (Only selected bones for example).
And if you want to only apply this to specific vertices, You can use vertex-select (VKey).

You are magnificent, it works!


text:
When I press render, my object changes

I am trying to render this scene above [Snap-shot 1]. But when i am trying to render the scene, its showing me the result [Snap-shot 2]. Whats wrong with my blender [2.72]

Are you sure you have provided the correct images? Because they both look the same, or is that your problem?

Yes, that is the problem. I dont touch anything. But after pressing render, meshes are not staying right position.

You probably have keyframes set for your objects. If you have set a keyframe for an object and then you move it without overwriting the keyframe, the animated property gets reset on render.
To fix this issue move the object into the desired position and press I. Select LocRotScale to set the location, the rotation and the scale.
When you render the scene now, there should be no more problems with moving objects.

Thank you. My auto key was on, I didn't know, its on.


text:
Texture Solid Option Is Not Showing Textured On 3D View port

I unwrapped this cube and applied a grid texture into it. Then i Enabled [Textured Solid] Option from N panel. But It now showing textured on the display. I am not understanding , what is wrong with me and my blender [2.72]


text:
UV Unwrapping Problem !
I'm dying here with UV Unwrapping. I saw many tutorials many books about unwrapping UVs.I aslo search many software for easily unwrapping. In maya- uv unwrapping is so difficult. I came to Blender. Here its seems easy to unwrap but Still failed. I'm really confused about it.
Please give me some tips/suggestion about uv unwrapping (for any objects). Please Save me !

This question is currently too broad, if you are having a specific problem please add some screenshots or a blend file of that specific problem.

If you've watched all of the tutorials and read all of the books and articles out there and still can't get your models to unwrap the way you want, then it's unlikely that someone at random from this site is going to offer a tip that solves your issues.  I suggest you either phrase your problem in very specific terms, supplying screen captures and example blend files or you talk to a professional at Siggraph, or Full Sail or Pixar.  In other words, if you've done everything you can, seek a higher power.

You need to be more specific. UV-unwrapping is not something that you do in one single way and it's done. It could be done in many different ways and NO 2 objects are unwrapped the same way.
It depends on the object shape, topology of the mesh, texture you want to apply, places that would be visible and places that wont...
In General, you would look at the shape of the object, if it is somewhat spherical you will go for a spherical unwrapping technique, if it is somewhat cylindrical, then you would go for a cylindrical. If it has flat parts, you would extract it with a planar projection. Now, those are just basics, they wont give you perfect results, you then need to tweak UV's manually, use transformations, cuts and patches, and you would have to do tweaking as with everything artistic. UV unwrapping is an art in it's own right, you cannot expect to learn it in a day.
Like everything, the more you do it, the better you will become.


text:
Texture not moving with Rigged Object
I have a rigged character with armor.  The armor is textured with some noise texture nodes (using cycles).  These look fine in single shots, but as the rigged armor moves the noise texture slides on the object's surface.  This is a problem for an animated video, of course.
The noise texture is set to use the object's coordinates, but I suspect it is using the object's "un-rigged" location rather than the objects location as it moves in response to the rig.  I sure hope that makes sense...
So is there anyway to counter this?  Is that what's going on here?  Any help would be very much appreciated.

Try using  Generated or UV coordinates instead (obviously you need to unwrap it to  use UV coordinates).
Cycles procedural textures are 3D, so object coordinates will center the texture around the origin of the object using the material.
This works fine when moving the object and it's origin as a whole, however in cases like yours it will appear to "slide".

Thank you.  Unfortunately the Generated coordinates create a very different looking texture.  The UV coordinates seem to wipe out the texture all together.  I do have it unwrapped, so....  hmmmm...  What a pain...  Thanks again.

@user3719 The mapping will change everything, as it's what defines how the texture goes on the surface of the object. That's just how it works. To fix it, try changing the scale.

I was having the same problem. I went into the shading editor and in the "Texture Coordinate" panel, I connected the "Generated" node to the vectors in the next level of panels. Before this, the "Object" node was connected. Once I did this, the texture moved with the animation the way you would expect.


text:
Texture doesn't render with Cycles
My Blender doesn't render textures in Cycles anymore. It worked before but if I now create a new project and apply a texture to an object it just gets rendered in a color present in the texture (see image).
I tried:
 * restarting
 * creating new prject
 * using different texture format (png/jpeg)
 * Changed render device (CPU/GPU)

I'm sure I didn't change any settings. I hope it's just something really simple I forgot :D
Thanks in avance for your help =)

You need to UV unwrap an object before an image texture will show up.
Here's a quick refresher on how it's done:

Select the object and hit TAB to enter edit mode
Change the selection mode to edges
Select all of your 'seam' edges
Hit Ctrl+E to bring up the edge menu and click 'Mark Seam'
Select all edges in the object by hitting 'A'
Hit 'U' to bring up the UV mapping menu
Select your unwrapping method. 'Unwrap' is the quickest

If your UV/Image editor window is open, you should be able to see the unwrapped object. From there you can mess with its position, rotation, and shape.
Hope this helps!


text:
How to fade out a mesh?
I have a very very simple animation where I have to fade out a mesh, from a complete opacity to zero. How do I achieve this?

Are you using BI or cycles?

I would like to keep the Blender standard renderer, is it too difficult if not with Cycles?

In the materials tab of your mesh, add a new material if there is not one already. Then, scroll down until you find the transparency tab. Enable transparency, and you will see a slider that allows you to change the opacity (or transparency) of the material, and thus, the mesh. I would use z-transparency as it is the most realistic.
With the opacity set to full, choose the frame when you want to begin the fade, put your mouse over the opacity slider I. Then, move to the frame when you want the mesh to be transparent, slide the opacity slider to 0 and hit I (with your mouse over the slider) again.
This technique is for blender internal

THank You, just done - but if I play the preview, will I see it fading out? Do I have to render the animation to see the effect?

I tried as you said some 2-3 times but I cannot see it from the animation player

By animation player, do you mean the viewport? If you use rendered shading in the viewport (it's in the same drop down as solid and wireframe in the latest version of blender), and then advance frame by frame through the animation, I believe you can see the change in the viewport. However, you could also just render one frame in the middle of the transition to make sure it's working

If you enable Transparency in Properties > Object > Display with the object in question selected, it will be visible in solid view as well.

@Matthew Fennell
What About with the Scroll Bar? (i dont know the real term. The one that shows keyframes)


text:
How to generate final texture image for complete designed scene
I designed a house interior, i used wooden texture and some other texture for walls and windows. How can i generate a final texture image so that i can use that image in open gles ? I added a example image with question. I have to generate image like this for my scene.

Your question seems a bit vague so maybe we should just start with some questions for now.  Do you want the models to all share one texture?  Do you know how to bake textures yet?  Did you generate that example texture?
Basically, right now it sounds like you are asking for a full tutorial which can easily take up an hour long video, it would help if you narrow down exactly where it is that you are stuck.

Thanks for your reply and Sorry for my weak english. yes, example image having texture for window, pillers, lights,walls. I take this image from an example code. I don't know how to bake textures yet. I generated example texture for a bottle using paint in UV editor. Yes a video tutorial  will help me better.

Check back in 30 mins.  I'll try and walk you through some of the basics of baking a texture.

I'll start from the very beginning even though you said that you have texture painted some of the models since most of these steps will apply to everything you do when making assets for games or accelerated rendering.
1.) Select seams that will help to represent your model as a 2D image.  Try to imagine this step as if you are making a real model and wrapping paper around that model.  Paper does not stretch well so you'd have to cut the paper in such a way that it naturally fits to the contour of your model. Try to apply this idea to building your UV coordinates since this will help to eliminate texture stretching for 3D models.  It will also help to keep the texture resolution consistent across the model.  There are situations where you can ignore this but for now this should work well for you.
Step 1)  Select the edges that will form the seams for the UV island coordinates.

Step 2) With the edges select, press Ctrl-E then find Mark Seams, now those edges will be highlighted in red.

Step 3 and 4)  Select all the faces of your model,

then press the u and select UV Unwrap.  If I had added an extra vertical seam across from the one that I did add, then the UV islands would be able to take up more of the texture space.  That would be more efficient since less of the texture would be wasted on empty space.  You could also add another model's UV Islands to that empty space so that they both share the same texture.

Now in the UV Image Editor, add a new texture.  This will be the texture that you will bake your materials to.

Next, for models that have been texture painted, you will also want to do the following since this will help to eliminate the seams that are left from painting a model since Texture Paint does not have overdraw.  Baking does, so baking a texture after you have painted it will fix this issue.
So add a material and set it to be shadeless as shown in the following image.

Next, add the texture that you painted in as a material texture and be sure to set the mapping coordinates to UV as shown in the image.

Now go to the baking panel and set the render type to Full Render, this will work since the Material is already set to Shadeless.  (Full Render also allows you to bake multiple materials that are connected together in the Node Editor so when you are more comfortable with all this then you may want to use that as well.)
For comparison, here is the Texture Painted model that will show seams when it's displayed on a model.

Now press Bake and save your texture.  Be sure to set the Margin to whatever you feel is best.  I use 64. Now the color along the seams will be extended out past the edges of the UV coords.  For this to work, the UV islands should be at least a few pixels apart from one another.

This is basically the procedure for baking any materials using Blender Internal and this pretty much all applies to baking other types of passes such as Ambient Occlusion, Vertex Colors, etc...

Tomorrow, ask a new question with a title that is something like "How do I bake a texture using Cycles bake."  It's getting late for me, so we'll have to go through that at another time.  I check in everyday so for now practice this and we'll do some more soon.

Thanks , This is very helpful. I follows these steps and it is working , but i used this steps for two objects with different materials. what i have to do to get single texture image for two objects.

You should post that as a new question.  That's how things work around here.  It may be a bit more effort for you, but you will get an answer.  It helps to keep the site clean and coherent.


text:
How to Create a Half-Turn Staircase?
I would like to create a half-turn staircase without a landing. Is there an easy way to accomplish this without having to manually calculate and create each step individually?
Here’s an image similar to what I would like to achive:

I have found the Archimesh add-on including this tutorial for creating curved stairs. While I can bend the created stairs, I haven’t found any way to get anywhere close to the image above. My stairs just always look out of shape and I don’t know how to get the outline of the staircase into a square.
I should mention that I only have very little experience with Blender modeling, so it’s well possible that I’m just missing some curve modification basics. Perhaps Archimesh is also the wrong approach for this in the first place?

This is complicated enough you should probably model it by hand, I don't know if Archimesh can do this.

Probably the Curve and Array modifiers + a bit of tweaking and polishing can do the job. To bad I haven't got time to check it out right now :(.

As mentioned in the comments this a complex enough that it might warrant modeling it by hand. If, however, you don't need an extremely clean topology you can easily do it with a combination of an Array + Boolean modifier. At least the radial part that is, the other one seems simple enough to do separately by hand.
Create your step as a mesh object, but make sure it is a closed, manifold solid object (you'll need it later for a Boolean modifier).

Add an array modifier to it, set the $Z$ offset to the desired height of the step and set it to Object Offset
Now add an Empty object to the scene; it needs to have the same $X$, $Y$, and $Z$ scale as the mesh object, or the stairs will [progressively scale either larger or smaller]Why is the array modifier scaling my object?)).
Give it the exact rotation you want between each step. Say you want $12$ steps in the curve part, that will go around $180º$, then you have $180 º / 12 = 15º$, so rotate the empty $15º$ about the $Z$ axis and point the Array modifier Object Offset to it.

When you have the array set up, just add a new mesh object with the exact shape of the staircase boundary, a simple box will do. Making sure the steps are large enough to cover the whole volume.

Now add a Boolean modifier and you are all set. If you get any artifacts with the Boolean operation be sure to leave a small gap between each step.


text:
How to obtain the volume of object movement trajectory and generate a plane?

How to obtain the volume of object movement trajectory and generate a plane?

We need to use geometric nodes to obtain the outermost trajectory during movement and generate a planar mesh

Generate such a grid as smoothly as possible
Google Cloud Drive Source Files
picture

This question is similar to: How to create a plane based on the trajectory of an object?. If you believe it’s different, please [edit] the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.

This problem is to generate a path based on the origin of the object, and my new problem is to generate a mesh plane based on the volume trajectory of the object.

Looks like the very same question to me.

Why? That question is answered and you never explained what is wrong with the answer.

No problem, I'll keep the previous question. The current problem is this. The previous problem was to obtain the trajectory of the object's volume, not the trajectory of the object's origin.

Please explain it properly. Origin, plane and volume are three completely different things, what do you really want?

The origin only generates a curve, and then the plane is obtained by squeezing. I need the trajectory of the overall motion area of the object, which is not the curve generated by the origin of the object's motion.

That's what the answer in the other question is giving you.

Thank you very much for his answer. The one I have been using before is dynamic painting production. I want to use geometric nodes to achieve this, because dynamic painting needs more subdivision, and too laggy needs to be more fluent and accurate.

Let us continue this discussion in chat.

So, I could come up with these nodes, based on the solution to the previous question, but extruding the entire mesh.
Here I use location and rotation, but there is a limitation: The start frame rotation and location of both objects (source and wake) must be zero! (You achieve this by "apply" rotation and scale at frame 1, and inserting keyframe)
It is possible to improve this, but it will require extra math (no time for that now)
Also, the surface at this point is a total mess (it's not an n-gon). Later I may think of a solution to convert the mess into an n-gon.

Thank you. This model is too complex and cannot be converted from projection cutting. Can we really only use dynamic drawing. thank you

Thank you for your answer. Is there a way for me to obtain the path in the z-axis direction as well.

If you want planes, look for where I multiplied z by zero and change. If you want volumes , just don't flatten Z. (But getting the volume contour without the extra vertices is a whole new issue)


text:
How to convert model edges into curves?

How to convert model edges into curves? Can it be implemented in the form of geometric nodes?Need 2D contour。
Source file download

Because the model is quite complex, I have two ideas now,
1: It can be achieved through projection mapping
2: After unfolding the UV according to the view, use AI to stroke and then convert it

You want only the contours, right? And it's 2d?

That's right 2d

Thank you for your answer. Convert it to an editable plane or grid, which is the current perspective, and convert it to a 2D editable plane or grid

Thank you ，Is there a way to directly convert the outer contour into a mesh?

Thank you. This model is too complex and cannot be converted from projection cutting. Can we really only use dynamic drawing. thank you

I'm almost finishing some idea, I think it will work.

Found a (maybe not good) solution that creates the mesh contour (which you can convert to curve if you like).
It works like this:

Resamples the whole geometry in small distances (because some edges on the borders are very long and don't have vertices in the middle)
For each point in the resampled geometry, creates a circle of raycasts around it pointing down
If any of these raycasts don't hit the original geometry, it means it's a border point, keep it. (If all hit, point is inside)
After separating all border points, several islands appear made of connected edges
Get the longest island
Get the extremities of the longest island
Gets the nearest points from the remaining islands
Creates a line connecting the longest island with the nearest points in other islands
Finally closes the remaining gap (sometimes it doesn't exist, sometimes it does, depends on the number of islands)

General nodes

Contour islands by raycasting

"Ray Positions" is a circle of positions around the position of the target point
"Rays down" performs a raycast for each of the circle positions
"Any Not Hit" performs boolean operations, if any ray didn't hit, it's a border point
You can see these groups in detail in the uploaded file (don't want to make this answer too big)

Separating longest island
Where "Island Edge Length" sums the length of all edges of each island (I didn't do it with a curve because some islands had a single point, and the conversion of single points to curve removes them)

Joining islands
Where "Start e End" get the start and end vertice positions of the island

Close ends

File
This file has also another attempt that tries to make a full circle around and raycast this circle inwards. But it's hard to avoid edges crossing inside the wake if the wake has tips pointing outward
Important: Some "snap distance" settings may create weird contours. I could not avoid that, so you need to experiment for the ideal number (it's not hard to find a good number, if it's small enough, there are more good numbers than bad numbers)

Thank you for your answer. I have used it and adjusted some values to achieve the desired effect. Thank you.

Thank you for your answer ，Contour islands by raycasting Very useful.If I want a 3D version, may I ask where I can make modifications to make it easier to come up with another version?

I don't think this method can be extended to 3d. It's a whole new story.

@ASD1ASD21, I had an idea for 3d, uses raycast, but must change a lot. (Each point raycasts "out" in all directions. All hits mean inside (may fail in sharp corners and need more directions)


text:
How to delete edges of curve based on their length

How to link geometric nodes into curves and control neighboring values to generate curves?
How to set a value to control whether two points that are too far apart should not be linked together?
Source file download

You could read the edge length and delete it if it's too big. Did you try that ?

Thank you for your answer. I don't quite understand geometric nodes. I'm still learning. Can you help me demonstrate it? Download the source file

Please revert the edit and just ask a new question. Edits shouldn't change the problem,  especially if someone already addressed the original one

The process is as follows :

Convert to mesh (useful for deletion)
Delete edges (set on Edge, not on Point)
Convert back to curves

Then the 3 nodes in the black frame works as follows :

Edge Vertices gives us the 2 vertices of the current edge
Distance computes the distance between the 2 vertices, which is the edge length
Greater Than tests if the distance is greater than some custom value

Thank you for your answer, but I cannot use greater than to delete it because I have longer edges. I need to use the smallest vertex between them to link them, and set the distance less than how much to link the vertices

I'm getting tired of you not explaining correctly your question, working a solution, then you explaining that your issue is more complicated. Pls start by explaining with more than 2 sentences in your question and then, maybe, I'll write an answer.

Thank you for your answer. Sorry, the question has been added


text:
Uncontrollable Offset with Follow Path
When I set the target of the Follow-Path Constraint my object moves to some other position which I cant control and dont want. How can I fix this?
I think it has something to do with the blue dashed line (Relationship Line?) It seems to be relative to World origin.

https://blender.stackexchange.com/questions/260983/problems-with-follow-path?rq=1

to add to Hadriscus answer, the object also needs to be at the center of the scene if you want it to stick to the beginning of your curve, so once its origin is at it center, put the object at the center of the scene with an Alt G

Constraints operate on object transforms, regardless of the geometry they contain. It appears the cube mesh has moved from its origin, you probably moved it away while in edit mode. To recenter it, you can select the object (in object mode), shift+S -> cursor to selected, then enter edit mode, select all, and shift+S -> selection to cursor (offset).


text:
Floor material reflections. How i may reduce them?

How to reduce floor material regflection? Here is my nodes of floor texture

Is this floor one smooth plane? Because it does not look as if it had some bump map or normal map on it or the effect is very subtle. If you have textures for bump or normal, make sure the Color Space is set to Non-Color, this is usually better... and maybe increase the Strength? You can also try to decrease the Specular value (version 3.6.x or previous) or the Specular > IOR Level (since version 4.0) in the Principled BSDF. If you don't want it to be so glossy you can also increase the Roughness. Best would have been if you showed us a screenshot the material setup.

Thanks a lot! i changed the  Color Space is set to Non-Color.

I added my nodes of the texture maybe you can take a look?\


text:
I want to assign an image file to an image node inside an existing node group
I'm trying to do something very simple, but cannot figure out what I'm missing. I can do this fine when not accessing a node group. The file 'image.png' exists. The material 'my_mat' has a node group 'my_group'.
def assign_image_to_node_group_node
    temp_folder = bpy.app.tempdir
    filepath = temp_folder + 'image.png'
    image = bpy.data.images.get(filepath )

    mat = bpy.data.materials["my_mat"]
    group = mat.node_tree.nodes.get("my_group") #QUITS HERE

I get  KeyError: 'bpy_prop_collection[key]: key "my_mat" not found'
I also have tried: group = mat.node_groups["my_group"]

The material does not appear to have a node named p_mat. If p_mat is the name of the group (not the node in your material) you can access it directly without going through the material with bpy.data.node_groups["p_mat"].

Would expect a key error in line above addressing foo[key] as opposed to foo.get(key) which will be None if it does not exist, and will not (as written) throw a keyerror.  The error complains about a key "p_mat".  Please clarify.

My mistake, the error would say "my_mat"
Still, even if I try img_node = bpy.data.node_groups["my_group"] it still throws the error. (how do use markdown here to designate a code block?)

Hence it is the line bpy.data.materials["my_mat"] throwing the key error , are you 100% sure you have a material named "my_mat" ?

Yes, definitely sure.

since I can't help with the python:  in a comment the markdown for code is to use the back-tick character as a delimiter.  Click "Help" when you're entering a comment to learn more.

Can you share a blend file showing the problem?  Even without the actual image texture it might be worth a look.

Sorry: Not convinced. Could you try typing this in python console D.materials.get("my_mat") is None and report whether it is True or False?

yes, I'll share a file. one sec. Thanks for the help w/markdown

bpy.data.materials.get("p_mat") is None returns False (I'm using p_mat and not my_mat)

Sigh. This is going full circle. Have you tried then mat = bpy.data.materials["p_mat"] ?  It is this line throwing a key error, not the next.  Using get avoids keyerrors, instead check for none type result.

Here's a very simple file which shows the issue. I just want to add an image to the Image Texture 'my_texture_node' in the node group 'my_group' in the material 'my_mat'
https://filedn.com/lLMW4jXsJqxXkRYjd1UCoKL/aaTrash/test.blend
Check out the script workspace

Mr. bat, yes, mat = bpy.data.materials["p_mat"] works fine. The trouble is trying to target a node inside a group inside that material. Please see the file.

Yes, the new file I sent I changed to my_mat so to make things easier to read.

The node tree of a group node is in bpy.data.node_groups
In your blend.
>>> D.node_groups['NodeGroup']
bpy.data.node_groups['NodeGroup']

>>> D.materials['my_mat'].node_tree.nodes['my_group'].node_tree
bpy.data.node_groups['NodeGroup']

Load the image from a file path. It is named after the filename "image.png" not the whole path. using Image.get(filepath) probably wont work as expected and return None.
temp_folder = bpy.app.tempdir
filepath = temp_folder + 'image.png'
image = bpy.data.images.load(filepath )

>>> ng = D.materials['my_mat'].node_tree.nodes['my_group'].node_tree
>>> ng
bpy.data.node_groups['NodeGroup']

>>> tex = ng.nodes.get('my_texture_node')
>>> tex
bpy.data.node_groups['NodeGroup'].nodes["my_texture_node"]

>>> tex.image is None
True

>>> tex.image = bpy.data.images.load(filepath)

Re your method, if you know it's a node group would address by node group name, instead of finding group node in a material. If do use group node in a material it's node_tree is a pointer to bpy.data.node_groups["Foo"] any way.
def assign_image_to_nodegroup_node(ng_name, node_name, img):
    ng = bpy.data.node_groups.get(ng_name)
    if not ng:
        return # or throw error.. print message
    node = ng.nodes.get(node_name)
    if hasattr(node, "image"):
        node.image = img

OK, so I copied your code as you have it, and replaced the vars and I ran this from the script window in the test file I sent you:
`import bpy
temp_folder = bpy.app.tempdir
filepath = 'C:/test.png'
image = bpy.data.images.load(filepath )
ng = bpy.data.node_groups.get("my_group")
node = ng.nodes.get("my_texture_node")
node.image = image`
and I get a line 9 error: AttributeError: 'NoneType' object has no attribute 'nodes'
What am I doing wrong?

Here's a link to an image showing the code a bit better: https://filedn.com/lLMW4jXsJqxXkRYjd1UCoKL/aaTrash/ber.png

OK, I moved up a bit in your code and then tried this, and it worked!
`node = bpy.data.node_groups['NodeGroup'].nodes["my_texture_node"]
node.image = image`
( not sure how to add returns in comments )
Thanks a bunch :-)

I need to add one more comment to this thread. It turns out I was using the Name property of the node group, which is different from the the actual field inside the node. Once I applied the correct name in the field in the node group, everything worked.


text:
In Blender, how do I programmatically display a viewport rendering in a window just like if you pressed F12?
I  know I can call bpy.ops.render.opengl() and that will create the render, but what I want to do is to create and then view the render, just like what happens when you use the View > Viewport Render Image menu item. Is there a way to do this?
So, to ask another way, how can I call the render window (F11) via python? F11 Hides or shows the render window.

I thought it was bpy.ops.render.render(use_viewport=True) for an actual render and  bpy.ops.render.opengl() for viewport render.

Yes, both create a render, but they don't show the render in a new window, like the F12 button does.

Yeah, that's a little deeper than I'm comfortable advising on, given my limited experience with blender python. Do you need to call on the window manager? I'll upvote the question and hopefully send it into someone else's more capable hands.

Invoke the operator.
When called from the UI an operator is "invoked" with "default" settings. To do same from script bpy.ops.foo.bar('INVOKE_DEFAULT')
What do different execution contexts mean?
From python console,
>>> bpy.ops.render.opengl('INVOKE_DEFAULT')

does the "UI thing" and opens the render window (if that's your setting)
whereas
>>> bpy.ops.render.opengl()
{'FINISHED'}

executes the operator.

While that works, all code beneath that (where I reset the viewport props) is executed before the render. Whereas if I don't use INVOKE_DEFAULT, the code is executed in the correct order. Can I use a timer or something to make sure the code is executed after?