text:
HSV system (numeric values) broken?
I'm new to Blender and currently digging into the nodes system, trying to figure out what all of those nodes actually do (aside from the information one is given in various YT-tutorials).
I came across a very strange behaviour of HSV values when it comes to Separating/Adding/Combining.
It's all about Pink:

RGB: 1 0 0.212
HSV: 0.917 1 1

I ) I can set up this pink just in a diffuse shader inputting RGB and/or HSV values.
II) I also get to this pink by mixing blue and red using "Add Shader" or using "Mix RGB - Add)
Blue:

RGB: 0.000 0.000 0.214
HSV: 0.667 1.000 0.500

Red:

RGB: 1.000 0.000 0.000
HSV: 0.000 1.000 1.000

(Results are 100% conform with same Photoshop blending mode)
III) I also get to this pink by manually adding values in the RGB system:
RGB color values

R: 0 + 1 = 1
G: 0 + 0 = 0
B: 0.214 - 0.002 = 0.212

IV) BUT: Manual adding of values does not work within the HSV-System!
HSV color values

H: 0.667 + 0.250 = 0.917
S: 1 + 0 = 1
V: 0.5 + 0.5 = 1

The outcome should be the same Pink but IT IS NOT!
It's almost the same but a little darker.
Any ideas?

No! There is not a single reason, why this should work. Manually adding HSV-System values will not necessary result in the same color as different other mixing methods.
Counterexample:
Mix the turquoise colors [H=0.49,S=1,V=1] and [H=0.51,S=1,V=1] and a similar turquoise color will be the result. But if you add the values the result is red [H=1,S=1,V=1]
The reason for this behavior is purely based on the mathematics of color mixing and is not a question concerning blender.

See also https://en.wikipedia.org/wiki/HSL_and_HSV. The ‘H’ component is cyclic rather than linear so adding 2 of them results in nonsense.

An analogy: adding two vectors in [x,y] format is simple: just add [x1+x2, y1+y2].  But in [angle, magnitude] format, you don't just add the components.  To double a vector, angle stays the same but magnitude doubles.


text:
I just can't seem to make grid fill work for me
I'm not sure why I just can't seem to make grid fill work for me.
I have an equal amount of vertices to fulfill the action of applying it yet it turns into this jumbled mess.
I really don't know how to fix this and I've redone this mesh at least 10 times now trying to figure out why but I've had zero luck. If someone could help me with this I'd appreciate it so much!

It's got late here now, so I can't answer this fully until tomorrow, but it looks as if you swept  the front  of the profile round the path, and then filled in the back, after converting to a mesh, instead of sweeping a whole,closed, curve-loop? So you don't have enough vertices in the flat back of the profile. You could cut a few loops in there now, to get  a more even density of verts around the profile, not forgetting to wind up with an even number.

@RobinBetts Hi! Well, I used did the profile curve like how you had explained in my last post (how I shaped https://i.imgur.com/vkcooLx.png), but I did notice that the back doesn't have any vertices going across it (https://i.imgur.com/0KIN0UC.png). Maybe I am just confusing myself more but I'm not sure how to fix what I should be doing. On one of my meshes I tried I did get the vertices to cross in the back however the front was still weird (here https://i.imgur.com/5O8pQmi.png) and my seat didn't come out well. Sorry, I'm quite slow with learning.

grid fill will not create new vertices, they have to exist already. Probably you need an equal amount of loop cuts on the back to have a regularly spaced grid to fill. Also keep in mind that grid fill has different setting for you to get different kind of arrangements using span and offset. https://docs.blender.org/manual/en/latest/modeling/meshes/editing/face/grid_fill.html?highlight=grid%20fill

CtrlF > Grid Fill works like this:

It calls the (white) active vertex when it is invoked a "corner". (Red zones)
It takes the next Span - 1 vertices, and bridges them to their opposite numbers. (Lilac)
It skips another corner, and then connects what's left cross-ways. (Green).

This results in Span face-loops across the piece, (up, in the picture :) ) and 4 corners.
The illustration shows Spans of 4,3,2 and 1 on a 16-circle, with the active vertex in white.
(The Offset setting steps the starting-point around the perimeter.)
So you can see, to get a tidy result from Grid Fill, you need:

An even number of vertices
A reasonably nice correspondence of vertices to their opposite numbers, once you've decided where the first corner should go.

In your case, you need to fix the second condition.

source: Stack Exchange

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

sort: votes


text:
Blender => Unity Export, UV Coloring
I have struggles with Importing my Blend to Unity with the Colors i mapped it in Blender.
In Blender the Colors are the way I want them.
I can get the Object in to Unity, as an Object,
in Unity I either  get a Blank Object or complettly misscolored Object.
My Object in Blender

This is the Method I used to color my Objects,
using the UV Editing.

When Imported to unity the UV colors are wrong.

I have Tryd the Folowing things:
Creating a New Simple Cube With same UV Editing method to see if problem persists.
With the ressult being exact the same Problem that was in Unity as with my Modell.
Tryd editing the Material Tilt and Offset in Unity to correct the Colors
wich only changed colors without finding the Color arrangement I was searching for
Importing the .blend File trough Drag and Drop to Unity
Importing the .fbx file and tryng to add the Material after adding the empty Modells
I also tryd messing with diffrent setting whilst exporting
Restarting everything
When I open the exported .fbx file in windows everything is normal as it shoud be.
These are some atempts I tryd, I woud realy Appriciate help,
for I have been tryng to find a sloution over the last 6 Houres,
reading all over the Internet and looking up tutorials for a solution.
Thx in Addvance
-Josh
(Sorry for bad Grammar)

https://blender.stackexchange.com/questions/57531/fbx-export-why-there-are-no-materials-or-textures

Problem was Solved,
The .fbx file was all fine
In Unity I Created a new Material and Dragged my Texture file,
from the UV Editing onto the Albedo of the Material.
After That the Colors will be wrong, so you need to change some settings of the Texture.
Compression => None,
Filter Mode => Point(No Filter)

Instead of wrinting "solved" mark the answer as accepted.

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


text:
So can someone explain how to bake textures/normals?
I tried baking textures, it turns out this way and I cant figure out what I'm doing wrong.

Hello, so did you succeed? Maybe share your file: https://blend-exchange.giantcowfilms.com/

yea i managed to do it, ive been doing the same thing over and over and every time it gave me different result. not sure what was up with that but i managed to do it. Thanks either way. :)


text:
Issue with baking, can somebody tell me what am i doing wrong
I tried baking this arm sculpt to a low poly model and the normal maps comes out with stripes, also, it has this weird shading. Another issue I'm having is when I switch between eevee and cycles, I'm getting different normal map results. Am i doing something wrong?

If you see the UV seams on your model then the colorspace of the normal map is wrong. You have to set it to Non-Color in the Shader Editor.

Yea, seems do show up, but the problem is with the weird shading and those stripes you can see on the normal map on the right. The seemes are not much of a problem but thats one thing i didnt know so thank you.

Im also trying to upload model on blendexchange but it stops at around 30% everytime

Okay so i fixed the shading issues, but this stripe problem is still present

maybe share this part of your object

I tried but it would always stop uploading 1/3 of the way trough, i just ended up returning to one of my previous files, did the baking proces and it worked fine. Regarding the issue of normal map changing between cycles and eevee, ive realized restarting blender after baking fixes the issue, so that was just a bug. Either way, thanks for offering to help.


text:
Change in character's location with key frame messes up cloth simulation
I'm using cloth simulation and my problem is when I change the character location with key frame to a far location the cloth will mess up is there a way to pause the cloth and resume it to not make this happen
I can't seem to find a solution

I think I found a solution changing the cloth simulation mass to 0 before Changing location than after 2 frames change it back to original cloth mass


text:
How to animate a rigged character walking on a sphere?
I have a rigged human-like character that I need to animate walking on a sphere (a small planet).
When I pose the armature, I'd like the root bone to automatically stay aligned to the sphere's surface, just like gravity aligns people away from the centre of the planet.
Manually I can make it match roughly, but it very fiddly to change the root bone's curves so that the interpolation matches the curvature of the ground.
I think there has to be a way to use constraints to keep the armature's base perpendicular to the sphere's normals, but I can't find it.
This answer is the closest I've found to my problem, but I'm not sure if it's the best way to go about it.

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

@DuarteFarrajotaRamos Thanks for taking the time to comment but sorry, I don't understand what you mean. I described my problem in a written form and the only link I put is to another question on this site that I think might be related (but I might be wrong)

Perhaps add a few reference images or gifs illustrating what you want to achieve, or screenshot of what you tried and where you are stuck

right, I get it. Will update it shortly


text:
Why does FBX exporter use v6.1.0?
I'm trying to export a mesh with bone animation to the FBX format, for consumption by Assimp. Although the Assimp website says otherwise, the source code does support FBX files, but only versions 7.1.0 through 7.3.0. When I export to FBX from Blender, the version number is 6.1.0.
Is there a specific reason why the exporter uses 6.1.0 and not a newer version? It seems like the FBX exporter is the most heavily used (and hopefully most heavily developed) exporter in Blender?
Also, is there a major difference between 6.1.0 and 7.1.0? Can I just manually edit the exported file so that Assimp thinks it's getting a v7.1.0 file?

It uses 6.1.0 because no one has implemented 7.1.0. If you need it really badly you could add it your self, or hire a developer to add it.

Do you know where I can find a 7.1.0 spec sheet? I do need it kind of badly.

Why not have assimp import the blend file?

Assimp loads Blender geometry but currently does not handle animation. I should have mentioned that I'm doing bone animation.

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


text:
How do I save an instance of a custom class to a .blend file?
I've created a custom class which creates a new object, loads a mesh from an .OBJ file, then modifies the mesh based on the scene's current frame number. When I create an instance of the class (via the Python console), everything works fine. I'm able to successfully import the .OBJ file and changing the current frame produces the desired effect on the mesh. However, when I save the .blend file and restart Blender, the mesh is still in the scene, but the instance of the class is gone. I have to delete the object and re-create it with the Python console.
Is there a way to save the instance of this class as part of the .blend file?

Can you show some code?  I'd imagine you could save the class creation props as custom properties of the mesh and then modify your class to rewire with it, without having to re-import the OBJ.  Could do this with an addon or with a registered text block.

@batFINGER Thanks for the tip. I had to re-work the code a bit, but your suggestion worked out for me. So is the lesson that it's not possible to save an instance of a class into a .blend file?

I've been dealing with a similar problem; I have a number of instances of custom Python classes defined during the execution of a custom Python script, and I'd like to be able to maintain (or restore) references to these custom class instances even after the script has finished running, or after Blender has been closed and then later re-opened.
The simplest solution I've found so far is to use the standard Python pickling module, extending the base pickler and unpickler classes to build picklers that know how to recover 'persistent external references' to Blender objects. This isn't as nice as saving the custom class instances as part of the .blend file itself, but does allow me to save the custom class instances whenever my script is run, and to later unpickle them with correct Blender object references. With a few minor changes to the script, this lets me optionally run the script multiple times while actively modifying the same class instances, without losing them in between script invocations.
To illustrate what I mean, here's a simple example of a custom class instance with active Blender object references I'd like to be able to pickle to a file and re-load later:
>>> class example():
...     def __init__(self, obj, ex_dict):
...         self.obj = obj
...         self.ex_dict = ex_dict
>>> ex = example(bpy.context.object, {1:2, "dog":"cat"}

By default, I can't pickle this:
>>> with open("example.pickle", 'wb') as f:
...     pickle.dump(ex, f, pickle.HIGHEST_PROTOCOL)
...
Traceback (most recent call last):
  File "<blender_console>", line 2, in <module>
TypeError: can't pickle Object objects

But I can write a custom pickler, unpickler that know how to store and revive references to 'persistent external (Blender) objects', like so:
>>> class BpyPickler(pickle.Pickler):
...     def persistent_id(self, obj):
...         if isinstance(obj, bpy.types.Object):
...             return ("BpyObj", obj.name)
...         else:
...             return None
...
>>> class BpyUnpickler(pickle.Unpickler):
...     def __init__(self, f):
...         super().__init__(f)
...     def persistent_load(self, pid):
...         type_tag, type_id = pid
...         if type_tag == "BpyObj":
...             return bpy.data.objects[type_id]
...         else:
...             raise pickle.UnpicklingError(f"unsupported obj with persistent id {pid}")

And with these changes, I can now successfully pickle and unpickle-with-restored-bpy-obj-references my class:
>>> with open("example3.pickle", 'wb') as f:
...     BpyPickler(f).dump(ex)
...
>>> with open("example3.pickle", 'rb') as f:
...     ex3 = BpyUnpickler(f).load()
...
>>> ex3
<__main__.example object at 0x000001BD0C4013C8>

>>> ex3.obj
bpy.data.objects['floorPanelSharpCorner.007']

>>> ex3.ex_dict
{1: 2, 'dog': 'cat'}

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


text:
Can I attach a callback function to a built-in operator?
I'd like to run some of my code when the bpy.ops.object.duplicate() operator is called. Is there a way to attach a callback function to this built-in operator? Or is there a way to create a custom handler?


text:
Can I use subframes to fake motion blur in Cycles?
I'm importing a sequence of OBJ files, then rendering the sequence. I would like to add motion blur to this sequence. The software that exports the sequence of OBJ files has the ability to export "subframes", or frames in between whole-number frames, essentially exporting the sequence in slow-motion (temporal supersampling).
So far, the best solution I can think of is to import the slow-motion OBJ sequence, render all of the frames, then average each set of subframes to get the final frames. This is really inconvenient, since I have to do two full passes to get the final frames: one for rendering each subframe, and another for combining each set of images.
From what I understand about Cycles motion blur, it randomly samples time values nearby the target frame number to generate the blur. This samples a continuous range of time values. In my case, I would be taking the time values from the continuous range and binning them into discrete subframe values. With enough subframes, the range (and the merged image) will appear smooth.
Can I ask Cycles what subframe it's rendering, and change the mesh to the right subframe for each time sample?

Don't think that Cycles can access an object set for mo blur, but you could try this solution http://blender.stackexchange.com/questions/449/how-can-you-use-vector-blur-in-cycles-with-fluids

I found a workaround for this problem. It isn't exactly what I wanted, but it's way better than the solution I was about to implement. Here's the link to the blenderartists thread: https://blenderartists.org/forum/archive/index.php/t-245213.html and the link to the video tutorial: https://vimeo.com/36650120

@Justin Blender Artists: "Oops! That page doesn’t exist or is private." This is why it's better to post an answer detailing what worked for you, than just a link that can rot.


text:
Can I mock the bpy module in a unit test?
I'd like to write unit tests for my addon. I do professional development in C# and I'm used to using the Moq package for mocking classes and functions. Is there a similar library in Python? I'd like to mock the bpy so that I can verify that the correct bpy functions were called with the correct parameters.
For example, something that looks or feels like this:
# (this is not real python code)
def Test_Create_And_Rename_Object():
    # arrange
    mockBpy = mock<bpy>()
    mockBpy.Setup(b => b.ops.someFunction())
    testObject = TestClass(mockBpy.object)

    # act
    renamedObject = testObject.createAndRename("new name")

    # assert
    mockBpy.Verify(b => b.ops.someFunction(), Times.Once)
    Assert.AreEqual("new name", renamedObject.Name)

(Sorry if this feels like C#. I've never written unit tests in Python before)
Is this possible? Specifically, can I mock the bpy module?

I don't think you can mock bpy without a Blender instance is running. But maybe I'm wron

@Hikariztw What if I created a wrapper around bpy that simply passed arguments through? It would look and feel exactly like bpy. Could I mock the wrapper class?


text:
Looking for equivalent of Fusion 360 Sweep with Path and Guiderail in Blender
I am newbie to Blender and totally loving it. My focus to date has been on modeling and 3D printing.  I was using Autodesk Fusion 360 but have moved all my projects to Blender except one. I created the attached Tea Light in Fusion using a Sweep with a Path and Guiderail on a Curve.  Trying to find the equivalent inside Blender. I got close using a combination of modifiers both with and without Bezier Curves but can't quite seem to lock it in. Wondering if anyone might have a suggestion.

You can actually do all this directly from a bezier curve object, mostly without any modifiers or destructive workflows.
You need the classic three-bezier curve objects system:

One for the actual $Body$ of the Tea Light

One defining its $Section$,

And one has a Taper Object to adjust the radius expansion interactively.

Assign them all to the correct slot of your body object, then play around with the taper shape to control the profile of the light.

For the Taper Object $Y$ coordinates of the points control the scaling ratio. At
$Y=1$ there is no deformation, bellow that it reduces radius, and above it increases.

You can use Tilt to rotate the base. Adjust interpolation settings to improve smoothness.

This may require a conversion to mesh to take care of the closed cap at the base. Alternatively if you prefer avoiding the destructive last step, use a mesh object with an Array Modifier and Curve Modifier, deformed along the same "Body" curve, then use an End cap representing the base.

Duarte, That's exactly what I was looking for and much simpler than what I was attempting to do. You could not have explained it better. Thank You So Much!!!!


text:
Can you Enable a disabled object constraint using logic?
In this situation i want my character to "warp to" the object's position using the Copy location constraint. I have it disabled but want to enable it during gameplay upon triggering it.


text:
how make a loop candle flame
I put a fire animation on a candle (using quick efects), but when I put it in a loop, it goes off and on again because in the beginning of the animation it goes on, how do you keep it lit infinitely?

Please explain your problem in more detail. An image/screen shot that shows what you have done would also be pretty helpful.

I don't think there's really a way to do this; the closest I can think of is taking some frames after the simulation gets started and blending the first and last together. Similar question: https://blender.stackexchange.com/q/44132/599


text:
radial texture on an acorn cap
I am trying to texture an acorn cap I modeled to mimic a real acorn cap texture. Any suggestions on where to start?

Hello and welcome :). Are you looking for a procedural solution (using only nodes), or would be an image texture fine?

Since they are new to blender probably a texture image would be good. I'm also looking to produce the same texture. I may post my results here.


text:
Is there any advantage to using a specular map in combination with all the other maps in the metalness workflow?
I have gathered online that there are typically two workflows applied when working with materials: A "Specular Workflow" and "Metallic Workflow". See this image that breaks down the metalness workflow (courtesy of Marmoset):

Is there any advantage to using a specular map in combination with all the other maps in the metalness workflow? Is this a viable way to work?
When creating PBR materials, I typically just use the BaseColor map, Metallic, Roughness, Normal, and Displacement (if necessary). These are the only maps I was taught to use in a PBR workflow.
However, some texture sets that I have downloaded online also include a Specular Map. There is a Specular channel in the Principled BDSF shader.
When should I use a map for it?
Hopefully this is a less open-ended way to phrase my question.
I am editing this question to be more specific and less opinion based.

You don't "have to", you can use maps if you want or not. It is up to you to get to the results you want through whatever means are necessary.

As long as metalness workflow is followed properly and its textures used, there shouldn't be any need for specular map, it's meant for a different workflow. More than that Blender's Principled was set up for metallness workflow and less - for specular (https://blender.community/c/rightclickselect/t1cbbc/).

Zak, that was exactly what I needed to read. Thanks much for the link.


text:
How to render in cycles like when you use backface culling in eevee
I want this model to render like this:

this is done by using backface culling in eevee rendering.
In cycles, however, it's rendering like this:

I know there's a node set-up in cycles to recreate backface culling, however it did not work and only made the model look glitchy.
Any help would be nice. For reference, here's the model I am using if anyone would want to experiment with it:
https://www.models-resource.com/nintendo_switch/supersmashbrosultimate/model/30311/

Would you happen to be on 3.1, by chance? 3.1 introduced a new (and incredibly annoying) artifact with Cycles where overlapping geometry will turn odd colors (usually very dark shades or just black). https://wiki.blender.org/wiki/Reference/Release_Notes/3.1/Cycles#Ray_Tracing_Precision
"Such overlapping geometry should be removed, or have a small distance added in between."
I downloaded and inspected the Ganon model you posted, and it looks like there's a fair amount of overlapping geometry going on. Either by clever shader or mesh editing you can overcome it. Or... maybe try 3.0.

Here is a setup I use

WARNING* WITH SOLID MESH YOU MAY HAVE TO TURN OFF SHADOWS

If you don't want to turn off shadows use this setup here:

This still didn't work unfortunately. Any other set-ups I could use?

If transparent doesn’t want to work, use a Glass shader and set the IOR to 1 and roughness to 0

That didn't work either unfortunately.... I think I might just be doomed here.

I should also add that I've tried this with multiple models that had the backface culling problem and none of the setups worked. Is there an addon to add backface culling to cycles by any chance?

Using Marux's setup above, but switching the "Is Shadow Ray" to "Is Diffuse Ray" fixed the issue I was dealing with on my personal project, which was tweaking an Inverted Hull outline to work in Cycles.


text:
Movie as image texture on multiple objects, with different frame offset, without using multiple materials?
I want to model a couple of screens that use a movie as image texture. The difficult part here for me is to have different screens show parts of the same source material starting with different frames. So e.g. screen 1 should start with an Offset parameter of 0, screen 2 with 300, and other values. (Random values might be okay or even be desirable.)
How to do this in Blender? The only way I was able to manipulate the Offset parameter was via a Driver, but from what I understand that only allows a global, object independent manipulation anyway. Help?  Below is a list of things I have considered and tried in vain. Thanks!
Visuals
Here is a generic screenshot of an image node to show what I referred to with Offset parameter.

Related answers

Can I use an image sequence with offset frames as a texture on array items

Uses a lot of different materials and I see this option. But that would require me to have many dozens of materials and setting the offset parameter on each of them manually. Does not seem like a good solution to me.

How to change a material texture per object?

Uses a script to clone objects and materials. Seems like the best workaround at the moment, though still labourious and not really elegant.

Animation time offset for multiple objects

Uses Animation Nodes to delay regular animation. I couldn't find a way to change the video offset with Animation Nodes.
Update
The question was marked as a duplicate. After thinking about it more, my question could have better been put as: How to do what I want to do without using multiple materials? From this I read here and in other answers I take it that there is no better way to achieve the results I desire without having multiple materials. This is somewhat unsatisfactory, but probably can't be helped.

@susu Thanks! Technically it answers the question, however it is similar or equal to the approach used in the first "related answer". I intend to create quite a few objects playing that video and I was hoping to get around creating that many separate materials.

Thank you @susu for kindly updating the question!


text:
Spacing groups instanced from collections based on their size
Random Car generator
I've made a random car generator that works by picking parts from 3 collections, front, middle and back, then randomly scale the middle section's length and randomly picks a material, to give some variations.
Here's what some of the results looks like when changing the seed of the random value:

So far so good. Then I want to take it further and make a:
Random Traffic Jam generator
The idea being to have many different cars following each other, with a group input to control the space between them. The problem I'm faced with is that I can't get the spacing to take into account the size of each car.
Here's the different approaches I took, using a simplified version of the first car generator:
Attempt 1

The space remains the same, but only the first car is random and the others are copies of it. I think it only works because the cars are all the same and the bounding boxes would just combine themselves if they were different.

Attempt 2

The cars are random but the space between them is constant and doesn't take into account the size of the car, which makes long cars crash into each other and small ones be surrounded by big gaps.

For the last 2 days I've been trying a lot of different things, using modulo and compare, dividing and flooring to address each car, realizing instances then measuring their bounding boxes, accumulating fields, and even capturing attributes, but I'm getting nowhere and my brain is turning to soup.
I know I could just create a few variations, put them in a collection and use that to make the traffic jam (and will end up doing that if nothing else works), but I would prefer not to as the final result will have 100s of cars and I like the idea of all of them being random, not repeats of a few cars.
As a bonus, it would be great to still be able to apply a random material to each separate car.
Any help greatly appreciated.

Geometry Nodes:

The node cirled with red is the sum of the Y dimensions of the front and back parts, the resulting value is added to the scale of the middle part multiplied by it's Y dimension.
Important:
This assumes that all parts in a collection share the same dimensions, which is true in the simplified file you provided, but doesn't seems to be in the first image of your question. I didn't found a node to get bounding boxes of multiple instances as a field, so for that I currently have no solution (Edit: there's now a method for that below in 'Variable Dimension Istances').
$$\text{Material per Car}$$

First we create some materials in the object which hold the Geometry Nodes, the link type of all materials needs to be Object:

Then, in the Geometry Nodes, we generate an integer anonymous attribute for each point in the line, the value generated is limited to the material index range (I used 5 materials):

The resulting attribute is then used to set the material index after realizing all instances:

$$\text{Color per Car}$$
If you want, instead of selecting a random existing material by generating a random material index, you can generate a random color per point in the line and pass it to a single material as an attribute:

$$\text{Variable Dimension Instances}$$

With Python we can create an object and store in it's vertices the Y dimension of all objects in the collections, then in Geometry Nodes we transfer the values using the same index that we use to pick an instance.
This method supports front, middle and back parts of varying dimensions.
import bpy

objName = "InstList_Dims"

frt = bpy.data.collections["frt"]
mid = bpy.data.collections["mid"]
bck = bpy.data.collections["bck"]

counts = [len(frt.objects), len(mid.objects), len(bck.objects)]
max = max(counts) #size of biggest collection

parts = bpy.data.collections["parts"]
dimensions = bpy.data.objects.get(objName)

if dimensions:
    dimensions.data.clear_geometry()

    if not parts.objects.get(objName):
        parts.objects.link(dimensions)
else:
    dimensions = bpy.data.objects.new(objName, bpy.data.meshes.new("dims_mesh"))
    parts.objects.link(dimensions)

verts = [[0.0, 0.0, 0.0] for y in range(max)]

for i, obj in enumerate(frt.objects):
    verts[i][0] = obj.dimensions[1]

for i, obj in enumerate(mid.objects):
    verts[i][1] = obj.dimensions[1]

for i, obj in enumerate(bck.objects):
    verts[i][2] = obj.dimensions[1]

dimensions.data.from_pydata(verts, [], [])
dimensions.location = counts

What this does is first check if the object 'InstList_Dims' exists. If it does, it's geometry is deleted. If not, the object is created. After that a vertex array is created with the size of the biggest parts collection, this is where, for every part, it's Y dimension is stored in the same index as the part's index in it's collection:

Y dimension from front parts are stored in the $X$ coordinate of vertices.
Y dimension from middle parts are stored in the $Y$ coordinate of vertices.
Y dimension from back parts are stored in the $Z$ coordinate of vertices.

After this, the data is send to the object's mesh. The part count is stored in the object's position:

Front part count is stored in the object's $X$ coordinate.
Middle part count is stored in the object's $Y$ coordinate.
Back part count is stored in the object's $Z$ coordinate.

If you modify or add parts after running the script, you just need to run it again:

Now we go to Geometry Nodes:

Here we instance the parts and transfer the dimensions from the generated object using the same random index, which is limited to the part count (from the object position) minus one.

Thanks, even if it doesn't solve everything it's a great start! I think I understand the logic of it apart from the "field at index 0" node. What does that do? Otherwise, for the front and back parts, there's 3 different sizes and maybe I can order them in three groups within the collection (by renaming them), modulo the random seed then adapt the Value depending of which group came up. Also any idea on how I would change the material of each car? (sorry, a lot of extra questions here :D)

Okay, cool, worked out that the field at index 0 was just to keep the first car centred, nice! Also, I just made all my fronts and backs be the same length so problem solved. Still need to work on the material bit :)

@wilks I added to the answer a way to set a random material per car.

Brilliant, thanks for sticking with it even tho it was more than one question really. Only note is that for the 2nd method I had to change the Attribute Domain to Point in the Group Output

@wilks I added to the answer a way to work with instances with variable dimensions in case you're still working on this project and wants to use variable dimensions. I had this idea in mind, but i had to learn some more bpy.


text:
Set Custom Toggle Hotkey for Grease Pencil Stroke Tools not Working?
In Blender2.9, while trying to set a Custom Toggle Hotkey in User Preferences for GreasePencil-> Draw_on_Back command using wm.context_toggle_enum with context attribute tool_settings.use_gpencil_draw_onback, pressing the  hotkey(END) doesn't execute the toggle command .
Why isn't the toggle command getting activated by this hotkey?

The toggle hotkey has to be created in Window context rather than GreasePencil(Global).


text:
Can I use Blender in a slow-motion video workflow?
I am capturing video on my Canon 7D at 60fps with the intent to play it back in slow motion at 24fps. There are some Linux-based programs that will do this, but they are usually kind of buggy and I'm running Windows mostly now. How can I convert a 60fps video into a slower (2.5x longer) video at 24fps?

https://www.youtube.com/watch?v=NrX1sK_ZQqs&index=27&list=PLjyuVPBuorqIhlqZtoIvnAVQ3x18sNev4

You can import the movie into Blender and then export it with a different framerate using this technique:
1. Import the movie
Open up a "Video Sequence Editor" in a fresh Blender-scene. You should see something like  below:

Click on Add > Movie and select the movie you want to convert. Make sure that the Blend-option (open the panel on the right with N) is set to Replace and Start Frame is 1 (see picture).
2. Export the movie
Then you go to Render Settings:

Make sure that you have selected the correct Resolution (the one of the video) and the slider is at 100%. Set the End Frame to the same as the Length of your video (seen in the picture 1 below Start Frame). Select the correct Frame Rate (24?) and the right format (I selected AVI Raw but it can be everything you like). Hit that Animation-button or Press Strg+F12 to render.
If you have any questions, feel free to ask.

Where is the Blend option located? I couldn't seem to find it. Nor did I seem to need it.

The blend option is in the vse properties sidebar (press N) the blend mode is only important when you have multiple strips in the vse. Also of note is that blender will adjust video strips to match the render settings but it doesn't re-time audio strips.

First, You need to Output your video as a Image Sequence.
This is a simple walkthrough for your.
Start a new blend file.

Go to Compositor (Shortcut)Ctrl + Leftt Arrow.
Check Use Node.
Delete the Render Layer.
Add Movie Layer by going to INPUT>>MOVIE CLIP.
Load up your movie.
Add a Viewer Node.
In Properties, Select Scene>>Output and set a Folder for your
renders.
In Properties, Scene >> Render Frames , set End Frame option to the
length of your video.
Also make sure, you are using the resolution which matches your video
resolution.
From Render Menu, Select Render Animation or press
Ctrl+f12.

This will render out your video.

Now, Change Your View to Video Editing.
Since you are using the same blend file, you don't need to change the resolution or end frame length. However, change the Frame Rate to lower number (it is just beneath the End Frame below Fram Range Option.

IN VSE press Shift+A and select image.
Go to your Renders Folder.
Press A to select all the render images.
This puts the Sequence in your VSE.
From Render Menu, Select Render Animation or press
Ctrl+f12.

This will output your video to a desired fps with desired encoding at your chosen folder.


text:
Activate physics by keyframe
I'd like to have a group of debris fall from a ceiling onto the floor, but not have them drop all at the same time. Is there a way to set a keyframe that dictates when the object enters the simulation? For example, object 1 starts falling on frame 0, object 2 on frame 5, object 3 on frame 24, etc.

Related: What is the difference between an Active animated rigid body and a Passive rigid body? and How can I add motion to an object

Yes, you can keyframe the Animated checkbox by hovering over it and pressing I:

When Animated is enabled, the rigid body will be controlled with the animation system. When it is disabled, the rigid body will be controlled by the rigid body simulator.

So can I set keyframes on this checkbox? Is that what you're suggesting?

@Justin Yes. When it is enabled, the object will not be controlled by the physics simulator.

How do you apply this to a large number of objects at the same keyframe?

@NoviceInDisguise If the objects don't have any other conflicting keyframes, then Ctrl L > Animation data can be used to copy keyframes.

Im wondering what the use is than, if its animated it does not habe the physics. How can we have both worlds or is this not possible?

@RomboutVersluijs Not quite sure what you mean by "best of both worlds".. What exactly are you trying to do? Perhaps this helps? http://blender.stackexchange.com/q/1552/599

Well i meant, it having physics but still be able to adjust the rotation. I want casino chips falling. I used particle emitter for creation added rigid bodies. They fall but dont rotate, so i tried animate in rigid body. I need research it better perhaps.

@RomboutVersluijs Individually animating in a rotation for each chip sounds like overkill (unless you need tight control over the result). Perhaps as a workaround you could have  them bounce off of a collision object before entering the camera frame to impart some random-ish movement?


text:
Export animation curve as values?
I'd like to use the Graph Editor to create animation curves for use in another software package. Is there a way to export the value of a curve for each frame?
For example, I have a keyframe at frame 1 and one at frame 24. The first keyframe has a value of 0 and the second one has a value of 24. There's a Bezier interpolation between the two keyframes. I'd like to get the value for each frame in the curve.
Is this possible? Possibly a Python solution? (I'm comfortable with programming)

possible duplicate of How to get keyframe data from python?

The fcurve class provides the .evaluate
 method to get the value for a given frame.
import bpy

action = bpy.data.actions['CubeAction']
for fc in action.fcurves:
    if fc.data_path == 'location' and fc.array_index == 0:
        break
val = fc.evaluate(5.5)

Is the back-end Blender Python API code available? I'd like to look at the contents of the .evaluate() function.

I found it in blender/source/blender/blenkernel/intern/fcurve.c .  fcurve_eval_keyframes() seems to have the core of the logic, although evaluate_fcurve() is the wrapper that handles a couple of more details.

@Justin You can browse the source code here (and the file Mutant Bob mentioned is here)

You can bake fcurves to keyframes by selecting the keyframes in the graph editor and pressing ShiftO (or Header > Key > Sample Keyframes):

You can also use 3D view > Header > Object > Animation > Bake action, which gives you more options (and also lets you bake constraints, drivers, rigid body simulations, etc.)
Depending on the format you want to export to, you might be able to just export it. If you need to use python, having the values as keyframes makes it pretty easy to iterate over them and collect the values.

I'll give it a try. Any idea how those values are calculated? Eventually, I'd like to write my own curve editor, but I'm having trouble finding the mathematical definitions of those curves.

@Justin See http://blender.stackexchange.com/q/6692/599

I wish it were as simple as that. "Although F-curves are very similar to Bézier curves, there are some important differences." http://wiki.blender.org/index.php/Doc:2.6/Manual/Animation/Editors/Graph/FCurves#Direction_of_time  Bezier curves allow for arbitrary shapes, but an F-Curve cannot have two values at any one frame. I'm having trouble finding how to make F-Curves.

Well, step one is to sort your control points by time. The next is to make sure the handles never point in the wrong direction.  Finally, you can either restrict your Bezier curves to 1 dimension such that x=t and y=B(t), or you can use a Newton's Method to find q such that B(q)_x == t.  I'm not sure exactly where to find that code in the blender source, but this deserves its own question.

I asked about fcurves on the math stackexchange here: http://math.stackexchange.com/questions/850090/mathematical-definition-of-blenders-f-curves

Just for kicks and giggles, here's what I've been working on: I rendered this using a home-grown render engine (Rayito by Mike Farnsworth) with a few modifications. I used Blender to create the animation curves. https://www.youtube.com/watch?v=JSht1XBPwQE

Values that are keyframed change as the current frame changes. Using python you can step through each frame and export the keyed values with something like --
import bpy

scn = bpy.context.scene
obj = bpy.context.active_object

for f in range(scn.frame_start, scn.frame_end):
    # use frame_set() so that keyed values are updated
    scn.frame_set(f)
    print(scn.frame_current, obj.location)


text:
Why does my render quality decrease when I open my file in an older version, then bring it back to the current version?
I'm working on a project in Blender 2.78. Normally I work from my fancy workstation. Last night, I pulled up my project on my laptop in Blender 2.76b (that's the newest version that works on my laptop). I did some more modeling and saved the file. Today, I opened the file up in 2.78 again and the render quality has dropped dramatically. I'm using an environment map for lighting. Even when I pump the samples up, the quality is horrible. When I create an area light with an emission shader, the quality is as expected, but the environment light has suffered.
Here's a screenshot that compares the render quality using an environment texture for lighting. Notice the quality difference and the number of samples in each image:

Why has my render quality dropped?
Can I fix my file or should I create a new .blend and append the objects from my original file? (that seems to fix the problem, but it's not an ideal solution since I will probably be doing more work on my laptop).

Check the "multiple importance sampling" option in the world panel. Sometime recently, I believe post-2.76, it was changed to be enabled by default. Disabling it would produce the result you see here, and might happen if you change Blender versions without explicitly setting that flag.
See this answer for what that setting does: https://blender.stackexchange.com/a/8156/8081

Ah! I thought that could have been it, but I forgot where that setting lived. Thanks.


text:
Why don't light emitters reflect light?
I'm testing out an edge case in Cycles.
Here's the setup: I have two area lights: a large dim one and a small bright one. There's also a ground plane. Each light has a box behind it prevent light from shining from the back side. The large dim light emits a small amount of light downward and the small bright one emits light upward. The small one is positioned between the large one and the ground plane. Here's a diagram of the setup:

When I render the scene, I would expect that light from the small light should reflect off the large light and onto the ground plane below. However, that's not the case here. When I change the brightness of the small light, the illumination of the ground plane doesn't change at all. That suggests that there is no light being reflected off the large light source. Here are some example renders:

When I hide the large light, the light from the small one bounces off the object that was behind the large light and, as expected, illuminates the ground plane below. Some examples:

So my question is: why don't Emission BSDFs reflect light? In theory, they should; even the Sun reflects light (albeit a minuscule amount compared to what it emits). Is this a design choice or a bug? If it's a design choice, then why?

Have you tried adding a Glossy Shader to the large plane?

@Dontwalk Do you mean the ground plane or the larger area light?

The Geometry node has backface output, you can use it to shoot light only in one direction from the plane - plug it into emission strength (through multiply node for adjusting strength). You will save the box;)

This is expected behavior for Cycles and in line with the way a physically based render engine is supposed to work.
By assigning a purely emission shader to a surface you are telling the render engine that that surface has no other light path component interaction, and is only emitting photons, no light is absorbed, no light is reflected, no light is refracted.
If you expect more light path behaviors from said surface you have to add the corresponding shaders for those.
What this means is practically you have to use a Mix shader to mix the emission with other materials cabale of reflecting light from other sources, in this case a simple Diffuse or Glossy shader will do.
For clarity sake the "strong light" is red colored and the weaker one is blue in my scene.

Also as mentioned by Cegaton, you don't specifically need those boxes, if your only intent is to stop light. You can either use actual Lamp objects set to Area which will by default only emit light in one direction, or use a node setup similar to the one below to limit a certain shader to the front facing geometry only.

@Duarte Farrajota Ramos That makes sense. So the idea is: if it's not there, don't put it there.

Duarte, Surely all light is absorbed, none is tranmitted - hence why hiding the lamp resulted in the light then reflecting off the surface behind in @Justin's example. Using an Add Shader to add 100% Transparent to 100% Emission would result in no light being absorbed while retaining the emission.

That's right, @RichSedman. I also just noticed that my node setup is wrongly formed, the Emission shader is connected to the factor socket instead of the shader. Will try to fix it


text:
How can I make a repeating wave?
What is a good way to make a repeating wave without having to manually select every other face and drag it along an axis? I'm trying to make a very long wave and it would save me a lot of time on this project.
I'm trying to make something similar to the metal part of this image but a lot longer and more curved.

Make a single part and use an array modifier.

Welcome to Blender.SE.  In the US, we call this corrugated metal.

Add a curve object and create the basic shape.

In the geometry section of the curve, give it some extrusion to get the height you want.

Use an array modifier to get as many copies as you need.

Make a curve and use an array modifier

Alternatively you can select 2 faces leaving one in between then pressing
ctrl +shift+numpad .

E:This shortcut repeats the selection pattern.

Can you explain what that shortcut does?


text:
HDR sky not showing on preview or on render
I'm trying to add a HDR sky and it's not showing when I preview render, or in the final render.
I did everything I could, like press number 5 and check transparent. Can someone help me?

How did you add it?

Hi there :) Please attach an image of the world setting panel and your render

In the Render tab on the RHS (looks like a camera), scroll through until you see a checkbox for "Transparent". Make sure it is UNCHECKED.
I assume you remember how to access the World shader. (at the top of the Node Editor there is a dropdown that says "Object" (as in a scene object) by default, change it to "World"). Go there in the Node Editor. You should have 3 nodes: [Environment Texture] --> [Background] --> [World Output (In: Surface)].


text:
Weird reflections on glass bottle render with cycles
If you look at this PNG you notice this "reflection" near the bottom of this bottle. Why is that so hard? Where does it come from? from the bottle itself?

I rendered it a couple of times, I increased the area lightings like crazy, deleted objects from the scene, all lights aren´t viewable in renders and viewport. no changes at all....
I also checked the world environment, changed a HDRI (indoor studio light 4k)
The only thing I notice is, when I am Changing the camera perspective, then this stuff changes the position.

The reflections come from objects and lights in the scene and the image used as the environment in the world. You have to be more strategic when it comes to lighting shiny objects. Get rid of the HDRi first, and place a single area light and play with it until you find the angle that suits your purposes in terms of showing the shape of your object and pay special attention on how it is being reflected on the surface. Only then start adding more lights and see the effect on the image. There are countless pages on the internet on how to light glass objects.

https://learn.zoner.com/how-to-photograph-shiny-products-and-glass-products/ and https://savageuniversal.com/blog/an-intro-to-photographing-bottles/

thanks susu!
I thought about the "light" object of that HDRi. But not finished my thoughts obviously.
Well.. thank you so much for that quick help. I will try to set the light without the hdri :)
And thanks for the link ! Really appreciate it :)

Anytime youi are dealing with highly reflective objects you are not lighting the object per se, but creating a pattern of reflections.


text:
Adjusting Render Region boundary
It seems that at times I'm able to see editable boundaries of the render region to make a small adjust to min/max X/Y and see corner grabs to adjust an X-Y boundary.   At other times I cannot get these and have to redraw the Render Region.   How do I get these adjusts to appear/disappear?

Related: Possible to set render border exactly

To get the adjustable boundaries, you need to make your camera active.
Simply click on it in the Outliner.

You might want the render_border operator.
First switch into camera-mode with Numpad 0, then you can either access this operator by the shortcut CTRL+B (setting a render border) and CTRL+ALT+B (resetting the render border to the whole frame), or by opening the search bar and typing Render Region into it.

please use  to mark keyboard shortcuts and not mathjax

is noted, will do from now on. Thanks for correcting all my posts :)

My question was how to get the border grabs to adjust the size, not how to specify it in the first place.  Thanks for your time, however.  https://blender.stackexchange.com/a/212963/111042 answers my question!


text:
How to export texture mapping to 3dsMax
If I try to export an object to 3ds, everything seems to work fine except the texture's mapping. How could i fix that ?

Some part of the model is good in the second picture. May be it has multiple materials and/or UVMaps and something missing after the export or assigned in wrong order.

thanks for your answer. there is indeed actually a lot of different material on my object (i specify the whole city however is one single mesh) but i don't know if it is possible to merge them

Did you try other format for example fbx?

yes i have tried fbx, obj and collada without sucess (same issues)


text:
How to mirror a mesh on x-axis on pivot point with python?
I've an object with pivot point in the centre (0,0,0). I want to mirror it by python on the x-axis and do it for all objects in my current scene.
I tried this, but the second line seems not to be applied:
def mirror_object_along_x(obj):
  bpy.context.scene.objects.active = obj
  bpy.ops.transform.mirror(constraint_axis=(True, False, False), constraint_orientation='GLOBAL', proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)

Or I tried also this but then the indices of the generated triangles are in the wrong order:
def mirror_object_along_x(obj):
  obj.matrix_world[0][0] *= -1

I found this answer here:
How to use a pivot point to mirror mesh with script
But it also doesn't work. I'm using Blender 2.79a.

UPDATE
To be more specific. I want to:
Loop all objects in my current scene and mirror them on the x-axis. The original object shall not be there anymore but only the mirrored one.
I try to use the approach form @batFINGER and it looks like that right now:
import bpy
import bmesh
from mathutils import Matrix

def mirror_object_along_x(obj, axis):
  '''Mirrors the x-coordinates of the object.'''
  '''obj:  the object to be mirrored'''
  '''axis: the axis to mirror the object on => x, y, z = 0, 1, 2'''

  transformationMatrix = Matrix.Scale(-1, 4, Matrix.Identity(3)[axis])
  pivotPointGlocalCoordinates = bpy.context.scene.cursor_location

  objectData = obj.data
  newBmesh = bmesh.new()
  newBmesh.from_mesh(objectData)

  bmesh.ops.transform(newBmesh, matrix=transformationMatrix, space=Matrix.Translation(-pivotPointGlocalCoordinates), verts=newBmesh.verts)

  # recalculate the normals
  bmesh.ops.recalc_face_normals(newBmesh, faces=newBmesh.faces)
  # write to mesh
  newBmesh.to_mesh(objectData)
  objectData.update()
  newBmesh.clear() # clear for the next one
  newBmesh.free() # free the memory used by bmesh

def main():
  for obj in bpy.data.objects:
    if obj.type == 'MESH':
      mirror_object_along_x(obj, 0)

main()

The pivot point needs to be in local coordinates.

You mean this line form your code: lpp = ob.matrix_world.inverted() * pp # pivot point local coords is missing? I didn't include it because I haven't seen the variable lpp being used later. Does this line of code need to be executed anyway?

Oops cut n paste error. Edited answer. The mesh is in local coordinates, the scene cursor in global. Global = Local only when the object matrix_world is Identity.

Simple mirror in place about origin
To mirror about the X axis (the ZY plane) at the origin is a simple matter of negating the x vert coordinate (v.co.x = -v.co.x or v.co.x *= -1)  Sample script run in edit mode, mirrors all verts.
import bpy
import bmesh

context = bpy.context
ob = context.edit_object
me = ob.data

bm = bmesh.from_edit_mesh(me)
for v in bm.verts:
    v.co.x *= -1

bmesh.update_edit_mesh(me)

Matrices
Check out the layout of a transform matrix an example of which it the 4x4 matrix ob.matrix_world .   Just setting the matrix value to -1 as shown in question will not work as expected in all cases.
A transform matrix T to mirror on x axis would be identity with T[0][0] = -1  Or a scale matrix T = Matrix.Scale(-1, 3, (1, 0, 0))
T = Matrix.Identity(3)
T[0][0] = -1
bmesh.ops.transform(bm,
        verts=bm.verts,
        matrix=T,
        space=Matrix.Translation(-pp))

Where pp is the point on x axis about which to mirror, Can exclude (as it's default) when mirroring about the origin pp = Vector((0, 0, 0)) or since it's default pp = Vector().
Another example from py console run in object mode, will mirror mesh about axis by transforming vertices of the mesh.vertices collection
>>> T = Matrix.Scale(-1, 4, (1, 0, 0))
>>> C.object.data.transform(T)
>>> C.object.data.update()

On an object level
>>> C.object.matrix_world *= T.to_4x4()

Finally to mirror about some arbitrary pivot point, will need to translate such that the pivot point is the origin, mirror,  then translate back.  This is the equivalent object level result of changing space in a bmesh operator with the translation matrix.
>>> pp = Vector((3, 0, 0))
>>> A = Matrix.Translation(-pp) * T * Matrix.Translation(pp)
>>> C.object.matrix_world *= A

this may quite likely invert some normals that will need to be fixed later.
Putting it together to mirror each mesh about a designated axis using the scene scene cursor location as pivot point, and correcting the normals. Run this script in object mode.
import bpy
from mathutils import Matrix
import bmesh

context = bpy.context
scene = context.scene
pp = scene.cursor_location # in global coords
mesh_obs = (o for o in scene.objects if o.type == 'MESH')
bm = bmesh.new()
axis = 0 # x, y, z = 0, 1, 2
T = Matrix.Scale(-1, 4, Matrix.Identity(3)[axis])
for ob in mesh_obs:
    me = ob.data
    bm.from_mesh(me)
    lpp = ob.matrix_world.inverted() * pp # pivot point local coords
    bmesh.ops.transform(bm, matrix=T, space=Matrix.Translation(-lpp), verts=bm.verts)
    # recalculate the normals
    bmesh.ops.recalc_face_normals(bm, faces=bm.faces)
    bm.to_mesh(me) # write to mesh
    me.update()
    bm.clear() # clear for the next one.
bm.free() # free the mem used by bmesh

Bmesh Mirror operator
bmesh.ops.mirror(...)
Test script run in edit mode. Will mirror the whole mesh on x to the scene cursor location's local x location.  Creates new geometry as the mirror.  Remove the original to only leave the mirrored result.

import bpy
import bmesh
from mathutils import Vector, Matrix
from math import radians, degrees
context = bpy.context
scene = context.scene
ob = context.edit_object
me = ob.data

bm = bmesh.from_edit_mesh(me)

pp = ob.matrix_world.inverted() * scene.cursor_location
bmesh.ops.mirror(bm,
        geom=bm.faces[:] + bm.verts[:] + bm.edges[:],
        axis=0,  # x, y, z <==> 0, 1, 2
        matrix=Matrix.Translation(-pp),
        merge_dist=-1 # disable so center verts dont merge.
        )
bmesh.update_edit_mesh(me)

Note the operator returns the new geometry.. ret = bmesh.ops.mirror(...) in a dictionary. new_geom = ret["geom"].

Thanks for your answer. The script mirror's on the x-axis as I need it. I need to have the original vertices mirrored on the x-axis. The whole "object" shall be mirrored.

Edited for trivial case about origin. The mirror op  creates new mirrored geom. The original can be removed.

Thanks for the update. When I try to run the script above Blender tells me AttributeError: 'NoneType' object has no attribute 'data'. It seems the data property is not known on the ob object. But I can clearly find it in the API documentation: https://docs.blender.org/api/current/bpy.types.Object.html#bpy.types.Object
Do I need to switch on something?

Test script run in edit mode.  context.edit_object is chosen specifically to give that error if not run in edit mode as loading via  bmesh.from_edit_mesh only works in edit mode context.edit_object is None in object mode. None is the NoneType object and has no attributes.  To use in object mode use bm = bmesh.new() load in mesh with bm.from_mesh(me) and then write back with bm.to_mesh(me)

Thank you. I just don't understand what you mean. I tried to use bpy.ops.object.editmode_toggle() -> see updated question, to enter edit mode. But still get the same error.

See edit under "putting it together" x mirrors all meshes in place about the cursor location.   If you want to just mirror about the local origin, make lpp = Vector(0, 0, 0) or simply leave space argument out of operator.  Please note the difference between bmesh in edit and object mode.

Thanks. It works. I've rewrote it slightly and put it also to my question. Thank you very much for your help :-)


text:
How can I create a wire-wove grid material in cycles?
I'm trying to create a procedural cycles material which looks like a speaker of a mobile phone.
My attempt is by mixing two Wave Textures and rotating them by 45°. Any hints on how I can make it look more link my reference image?

Update
I used Blender 2.80 but the answer uses a newer one. I updated Blender to 2.93 in order to have the same settings on the nodes used.

I'm not super happy with this one, but when it comes down to it you might have to fiddle around with just about any solution that's given to you.  It's kind of the nature of procedural generation, so here goes.
This is based on another answer I did over here:
Sine wave on the environment texture
You can read through that for the whole discussion on this.  Here we do a Y Wave Texture influencing an X Wave Texture, and then reverse it to get a 90 degree rotation.  Then we add those two together and use it for the Alpha channel.

For this primitive plane, the scales should always be around the same (but they don't have to be exactly the same) and the Mix Factor controls the height of the wave.  So it should always be very close to 1, but how close depends on the scale of the wave textures.  You'll have to mess with them to get it to look right depending on the size of the mesh it's applied to.

Excellent answer. Could you elaborate a bit on what the ColorRamp does in this setup? I read the other answer you linked but I'm confused what it means.

@BrunoBieri the color ramps take the wave texture output, which is normally a gradient, and makes it a hard cutoff and shrinks down the white portion


text:
Finding the source for "API Defined" custom properties
It seems that I have a couple plugins automatically creating custom properties with API Defined values on every object I make. Now that I'm starting to make drivers with custom properties, I want to get rid of these junk properties by just uninstalling the plugins that are creating them. Is there a way to trace back the origins for these automatically created custom properties?

Leave them be, create your own panel.
For 2 of the 3 examples shown its pretty obvious from which addons they come. Disabling the cycles render engine to have a clean custom properties panel is IMO not the way to go, going forward.
Recommend leaving the so called "junk properties" alone. Let the custom properties panel be populated by props defined in other addons, including your own. (The scene's custom props is surely the most over-populated).  Accept that this panel fill with everyone's junk. Make your own panel that only displays what you want, where you want.
If a property is defined in an addon via
bpy.types.Object.foo = bpy.props.IntProperty(default=4)

The foo property is now available to all objects. Once set ob.foo = 3  its value is stored in blender via the custom property ob["foo"].  For a more detailed property setup like a collection, it displays in UI as "API defined".
Unregistering an addon may or may not remove the storage. Eg ob.foo is defined in an addon, and on unregister is no longer available, but ob["foo"] still persists, where set, and available when the addon registered next time.
As well as storing the value it also stores the properties of the property, eg min and max.  This can be manipulated via the objects ob["_RNA_UI"] custom property, with the key "foo" ob["_RNA_UI"]["foo"].
Hence not defining with  bpy.props as above can create, set, and add UI properties with:
>>> ob["foo"] = 3
>>> if not ob['_RNA_UI']:
...     ob['_RNA_UI'] = {}
...
>>> ob['_RNA_UI']["foo"] = {"description" : "FooBar", "driver_prop" : True, "max" : 10}
>>> "driver_prop" in ob["_RNA_UI"]["foo"].keys()
True

Now we have a custom property named "foo" description (tooltip) "Foobar" that has a maximum value of 10 and a flag indicated it is being used to drive something. All of the rna props, eg max, need to be of type int, float, bool or str.  The "driver_prop" key shows how these  can be other than the arguments of the bpy.props property.
For more info see  ./2.80/scripts/modules/rna_prop_ui.py on how to add your own "Add Custom Prop" button to your addon panel.
To remove all custom props from an object (for answer sake, not recommended)
for k in ob.keys():
    del ob[k]

Do you know the technical reason why a cycles custom property was added?

The cycles property is actually a PropertyGroup holding several Cycles-related properties: https://github.com/sobotka/blender/blob/master/intern/cycles/blender/addon/properties.py#L1154

@B.Y.O.B. Sure. But why's it exposed in the "Custom Properties" panel, instead of just being a regular bpy.props property?

If you are getting this with addons you would like to keep around, unticking preferences > interface > display > developer extras will hide API-defined properties in the custom properties panel.


text:
How to paint "Noise Texture" with Alpha Transparency? (Image Editor)
On trying to paint Noise texture(eg Voronoi) with layer alpha set to "0",Blender paints(brush mode - Overlay) the entire texture (as black) instead of painting only the non alpha values.
Is there any way to paint noise texture with alpha transparency using Texture/Texture Masks?

I don't have 2.79 anymore, but I will try to explain in an answer.

Your brush mix mode shouldn't be overlay, the color mix mode of the texture you are painting onto should be overlay. The overlay mix mode of the brush only affects pixels present in the image texture you are painting, causing new pixels to 'overlay' the pixels in the image. Overlay mix mode of the image texture to the next below will affect all the pixels of those underneath in that next image slot, which might be what you are looking for. Another way to do this is to use a Brush Mask texture with color ramp turned on and squeezed for desired contrast, and then pick the color you want to paint through to the image texture.


text:
How to dynamically set Current_ Frame in Driver Namespace Function Call?
The driver namespace function call(wiggle_z) gives a float error even when float values are provided for the framerange in the driver scripted expression field .
How to resolve this ?
TEST  CALL
wiggle_z(50.0,200.0)

ERROR:
Error in Driver: The following Python expression failed:
    'wiggle_z(50.0,200.0)'
TypeError: a float is required

SCRIPT:
import bpy
ob  = bpy.context.object
scene = bpy.context.scene
frame_current = bpy.app.driver_namespace["frame"]

import math

def wiggle_z(frame_start,frame_end):

    if frame_current > frame_start and frame_current < frame_end:
        ob.rotation_euler[2] = math.sin(frame_current)/ 10

    else:
        ob.rotation_euler[2] = 0

bpy.app.driver_namespace["wiggle_z"] = wiggle_z #wiggles object around Z axis within frame_range

#def main():
#    wiggle_z(50.0,200.0) #Test Call
#main()

Hello, what are you trying to do with this script ? After a quick look at the documentation https://docs.blender.org/manual/en/latest/animation/drivers/workflow_examples.html you are supposed to use square brackets, not parentheses after driver_namespace. You can look into the Templates > Python > Driver functions in the script editor

Since bpy.app.driver_namespace is a dictionary, using round brackets is "calling" it like a method would result in  TypeError: 'dict' object is not callable   However you are overriding this error with foo() = 4  ie trying to assign to a function call. @Gorgious  add as answerf... or do I kill it as more a python question?

btw the way you are using frame current will not work as expected either it will have only the value when the script to register the method is run.  It is known to the driver namespace as "frame" .. can pass it to driver method eg foo(frame, start_frame, end_frame) or get it from driver namespace frame_current = driver_namespace["frame"]  or make it a driver variable Scene object, data path "frame_current".

Plz don.t post the answer as the main question is about the use of frames in driver namespace .I will check and revise the question.

Return the value from a driver, don't set it.
So many things wrong with such a little script.
In addition to comments below question:
Don't mix context and drivers, the driver returns a value to the property it is driving.  To drive the z rotation of an object with wiggle, simply type directly into field.  Using hash as first character when first entering informs blender to treat input as  a driver expression #wiggle(1, 35)
Here it is seen as purple (a driver) after being added as above

The frame is known to the driver namespace as "frame", have used that rather than passing frame via arguments or setting up a variable using scene.
import bpy
from bpy.app import driver_namespace as dns
from math import sin

def wiggle(frame_start, frame_end):
    frame = dns["frame"] # saves passing it
    if frame_start <= frame <= frame_end:
        return sin(frame) / 10
    return 0.0

dns["wiggle"] = wiggle


text:
How to avoid bone roll on "Rotation Constrained" IK bone?
For 2d cutout animation sidefacing rig (XZ plane), movement and rotation in Y axis is restricted with constraints.However even after applying IK constraints to the IK chain and location constraints to the IK target there is still rotation in the Y direction . Also bones roll on movement.
How to avoid this ?

Actually you have a very small bone (the one on the top of your arm, called Bone) that is not constrained, that's why the other moves even though you've limited them, is it your problem? –

I have updated the blend file , now it should be fine ,The rotation limits of the last ik bone (shoulder bone) can't be  set to be in straight direction because of the axis switching on setting rotation limits.

not sure to understand but have you solved your problem? It seems like you need to set the IK chain length though...

This is a sidefacing rig for a 2d cutout animation ,The hand needs to constrained in the global XZ plane , however when the IK rotation limit is set for the bones , the limit works for all the bones except for the  last bone in the IK chain in the required direction .This is because this bones local axis switch whenever the rotation limit angle is set.

@moonboots Sorry,had to change the question as the above issue was only seen in one chain and didn't exist for the other chains.Its still present in the above blend file (in the shoulder bone where limiting rotation to a single plane is not possible).

so you want your armature to work on its profile? In that case, why do you allow rotation on the Y axis? Also maybe bend the knees a bit forward so that Blender knows in what direction they need to point out.

This is a sidefacing rig for a 2d cutout animation(XZ plane)  and movement and rotation in Y axis is restricted .However even after applying IK constraints to the IK chain and location constraints to the IK target there is still rotation in the Y direction .I will upload the latest blend file with updated constraints, Also bones are already bent in XZ .plane

Let us continue this discussion in chat.

there is still a rotation because you have given a min -180 and max 180° to the Y, don't you want to give 0/0?

I have upload the updated blend file and sorry its too late here , may we look into this tommorow.Thanks

The rotation constraints are correct .They are with respect to the "local bone axis" (& not the global axis).Plz click on the bone in Pose mode to find the visual envelope for the rotation constraint,

The bones in question were in not in "perfect alignment" with the view axis.
On aligning them to view and setting roll with ARMARTURE - BONE ROLL - RECALCULATE ROLL - VIEW AXIS , the bone roll was resolved.


text:
Handler Function doesn't update Text Object in 3d_View
The script below uses a handler function to show the current frame on the Text_object (every 10 frames) in 3d_view.
Tried assigning current_frame to text object in 2 ways:
1.With context.object.data.body
2.Updating text from Edit mode with editmodetoggle()
Both , Frame and Scene are being updated with their respective handler functions.
However, in both cases the handler function is not entirely getting executed and the Text in 3d_view  doesn't update
How to resolve this?
# SCRIPT -->  SHOW CURRENT FRAME (EVERY 10 FRAME'S) IN 3D_VIEW

import bpy

scene = bpy.context.scene
obj_active = scene.objects.active
obj_ops = bpy.ops.object
font_ops = bpy.ops.font
handlers = bpy.app.handlers

frame_current = scene.frame_current
obj_active = bpy.data.objects["Text"]

from bpy.app.handlers import persistent
@persistent
def frame_change(scene):
    frame_end = 200
    print(frame_current ," = script start")

#ATTEMPT 1---------------   UPDATE TEXT.DATA.BODY   --------------
    if frame_current <= frame_end:
        if frame_current % 10 == 0 :
            obj_active.data.body = str(frame_current)
            print(frame_current ," = TEXT UPDATED")  #Function not getting executed
    print(frame_current ," = script end")

#ATTEMPT 2----------------     EDIT TEXT FROM EDIT MODE    ------------------
#    if frame_current <= frame_end:
#        if frame_current % 10 == 0 :
#            obj_ops.editmode_toggle()
#            font_ops.delete(type='ALL')

#            text_frame = str(frame_current)
#            font_ops.text_insert(text = text_frame)
#            obj_ops.editmode_toggle()
#            print(text_frame," = FRAME CHANGE")

def register():
handlers.frame_change_post.clear()
handlers.frame_change_post.append(frame_change)
bpy.app.handlers.scene_update_post.append(frame_change)
handlers.load_post.append(frame_change)

def unregister():
    handlers.frame_change_post.pop(frame_change)
    bpy.app.handlers.scene_update_post.pop(frame_change)

if __name__ == "__main__":
    register()

##########################---------- EDIT 1 -------##########################
Tried @batFinger's script but Text doesn't render in 3d_View (even if script runs in console )

import bpy
from bpy.app import handlers
from bpy.app.handlers import persistent

@persistent
def frame_change(scene):
    frame_current = scene.frame_current
    frame_end = 200
    obj_active = scene.objects.get("Text")
    print(frame_current ," = script start")
    if obj_active is None:
        return # no font object named "Text"
    if frame_current <= frame_end:
        if frame_current % 10 == 0 :
            obj_active.data.body = str(frame_current)
            print(frame_current ," = TEXT UPDATED")
    print(frame_current ," = script end")

def register():
    handlers.frame_change_post.append(frame_change)

#ALSO TRIED  THE BELOW COMMAND'S BUT NO RESULT
#    handlers.render_post.append(frame_change)
#    handlers.scene_update_post.append(frame_change)
#    handlers.load_post.append(frame_change)
#    handlers.frame_change_pre.append(frame_change)

def unregister():
    handlers.frame_change_post.remove(frame_change)
#    handlers.render_post.remove(frame_change)
#    handlers.scene_update_post.remove(frame_change)
#    handlers.load_post.remove(frame_change)
#    handlers.frame_change_pre.remove(frame_change)

if __name__ == "__main__":
    register()

An issue of scope.
As mentioned in a prior answer.  Defining frame current outside the handler sets it to what the current frame was when question script above is run and the handler is registered.
If you want current frame when the handler is run
def frame_change(scene):
    frame_end = 200
    frame_current = scene.frame_current
    print(frame_current ," = script start")

secondly recommend don't scope an object outside the handler, instead within the handler
ob = scene.objects.get("Text")
if ob:
    # it exists do something to it.

Also don't mix context with handlers. Every chance it will not work as expected, especially when rendering.
Related.
Handler-script updates in viewport but not in render
This should work in 2.7
Notice for 2.7x use frame change pre, for 2.9 use frame change post.
Notice the use of the div operator
int(frame_current) // 10

to set on each frame, otherwise will not set properly until a 10th frame using the modulus == 0 operator.
import bpy
from bpy.app  import handlers

from bpy.app.handlers import persistent
@persistent
def frame_change(scene):
    frame_current = scene.frame_current
    frame_end = 200
    obj_active = scene.objects.get("Text")
    print(frame_current ," = script start")
    if obj_active is None:
        return # no font object named "Text"
    if frame_current <= frame_end:
        obj_active.data.body = str(int(frame_current) // 10)
        print(frame_current , int(frame_current) // 10)
    print(frame_current ," = script end")

def register():
    handlers.frame_change_pre.clear()   # use when testing will burn others
    handlers.frame_change_pre.append(frame_change)

def unregister():
    handlers.frame_change_pre.remove(frame_change)

if __name__ == "__main__":
    register()

Thanks for the explanation .Tried your script but Text doesn't render in 3d_View (even if script runs in console ).Question updated and blend file provided.

Also,if Object Scoping is to be kept local to the Handler Function, then how should  a Property be declared while passing it from an operator class like Panel.row.prop to handler function?

Fired up 2.7 and fixed above.  Not at all sure what you mean re  "Property be declared while passing it from an operator class like Panel.row.prop to handler function"  The handler function (for 2.7x) takes one argument scene.  As shown the path to the font object named "Text" from scene is scene.objects["Text"]

Thanks for the answer.... Considering Object "Scoping" of local handler function variables ,how could one access them in external classes & functions? In this example , secs = font["timer"] ,font[timer] list is created in the handler function but accessed "globally" by the Panel class  and is_timer() ,Why isn't there a scope error raised,considering  font["timer"] is local to handler function .refer

This seems to work:
bl_info = {
    "name": "Name",
    "author": "Your Name",
    "version": (1, 0),
    "blender": (2, 83, 0),
    "location": "",
    "description": "",
    "warning": "",
    "doc_url": "",
    "category": "",
}

import bpy

@persistent
def the_handler(scene):
    if scene.frame_current % 10 == 0:
        if bpy.context.object not None:
            if bpy.context.object.type == 'FONT':
                bpy.context.object.data.body = str(scene.frame_current)

def register():
    bpy.app.handlers.frame_change_post.append(the_handler)

def unregister():
    bpy.app.handlers.frame_change_post.remove(the_handler)

if __name__ == "__main__":
    register()

I think it might be helpful to give some explanation as to why this works vs the code in the question.

I did not look into the code. Seemed easier to give a working example. Apparently batFINGER was answering the question at the same time and answered it in full. I am still leaving this in hope it might be an easy copy paste template for whoever finds it if they need an add-on with a handler.


text:
Random Index from List(Subprogram)
Animation nodesV2/Blender 2.79
Trying to get a Random Index  as a part of a Subprogram.
Attempt 1 -  GetRandomListElement not updating in viewport
GetRandomListElement is not updating in the viewport (eventhough the colors change in viewer on update).Tried using ViewportMaterial & SetVertexColor Nodes.

Attempt 2 -  IterationCount not connecting to RandomNumber Node
While trying to extract a random index from a Color List for animation ,their doesn't seem to be any node which calculates the total iterations in the list.
On connecting the IterationsCount(Invoke subprogram) to the random number node ,all nodes get red.
How to extract a random index from a list (as a part of a Subprogram)?

Are you trying to get a random index or a random color ? (ie : do you want to do something else with the random index than setting a random color ?)

Random Index from a List (the above color list is just an example).

Index values can be accessed by using the GetListElement Node ,which gets elements according to their indices and then connecting this to the "Max" Random Number node to create an index range from which random indices could be instanced.

I don't think you need to get this kind of convoluted node tree if you just want a random color.
The "Get Random Elements" node has a "Single" mode which will output a single randomly chosen value.
The setup :

Result :

If you just want a random index, you can use the "random" node with a floor math node.

Thanks for the answer,but this setup needs to be  part of a Subprogram.Any way to implement it would be really helpful.

Alright, could you elaborate on the specific task you are trying to accomplish ?

Chaining animations -Subprograms provide the ability to chain other animation loops....so using lists with subprograms is always a better option.

Sorry but I really don't understand what you are trying to do in your subprogram ? In your question you are creating an exact copy of the base color list, is it the intended behaviour ?

Subprograms allow easy linking of more than one Iterator/Parameter/Generator as compared to creating  separate logic nodes groups and combining them together.


text:
How to blend a tranparent layer onto the base layer without affecting the "base color"?(Image Editor)
While trying to blend a decal layer(alpha with mix blend-type) on a base layer(mix blend-type) in the Image Editor,blender either doesn't paint anything (Color = 0) or completely changes the base color (Color = 1).
As seen from this video@1.15,the same setup works from the compositor.
How to blend a tranparent layer onto the base layer without affecting the "base color" in the Image Editor?

Are you only interested in solutions using 2.79? I would instead use a solid texture of color and use a stencil between them, black being transparent and white being the color - and this would allow for graded value to fade the color.

Hmm,aren't the blend calculations  across Blender versions supposed to be the same ? Also , I got the result with your earlier answer, by switching layer blend to "Overlay".

2.8 and up make more use of shader nodes so the manipulation of textures in the tree is easier to get complex out put and to reuse a single texture in multiple ways.


text:
How to model a ribbed pattern along a body
In Blender, I am trying to replicate the clothing (in the picture) on my high-poly model. Specifically, I am looking for help in how I can replicate the texture along her belly and inside-breasts.
My successes and failures so far:
I did a decent job with the seams by using a bezier path which I drew on my model and then extruded. This gave a similar appearance - but would love to hear other ways.
The belly pattern I have tried doing the same way. Drawing individual bezier paths with mirror modifiers. However, as the path was extruded into a flatter shape and had to be rotated to try to fit to the model - it just wasn't working out so I abandoned it.
Next I made a cube into a cross section of the design which I applied an array modifier to and a curve modifier to anchor it to the bezier paths. This I've met with a little success with, but it's far from perfect and would take lots of proportional editting to get onto the body and then wouldn't look anywhere as clean as in the picture below.
Thanks in advance for any help and suggestions.

You can model your pattern flat and use Shrinkwrap modifier and then add thickness and bevel to it with other modifiers. As long as you have enough of geometry in your pattern, it will follow the surface of another object:

You can also edit the deformed mesh easily if you enable modifiers for edit mode:

Amazing, thank you! I will try this later today and update


text:
Locked / unmovable vertices in part of a Combined Mesh
I created a humanoid but, after merging the parts together, I can't seem to move the hand vertices in any way in vertex mode. I can't even select them. It's all one Mesh without any modifiers exept for an armature modifier.
Here Is a video Showing the problem: https://youtu.be/ySUpQvKpPbE

I believe that's a bug that may happen to anyone, could you possibly try copying/appending the file to older (not 2.9) version and unhide the vertices on edit mode?

maybe try to unhide, I think someone had a similar problem few days ago, and it seems to be a bug

Thanks to moonboots I found out that it can be solved by entering edit mode and then unhiding everything.

Please don't add "thank you" as an answer. Instead, accept the answer that you found most helpful. - From Review

@Nate_Sycro27 I don't know how to accept a comment on the original question as answer.

You can also simply mark your own answer as the correct answer (since it is an answer), just next time try to not simply post "Thank you" as a large part of your answer.


text:
How can I place objects over the surface of HDRI?
I want my objects to be perfectly aligned with the HDRI as if the object is sitting on the ground. when I set an environmental texture to blenderworld, the objects float in the middle of nowhere. So I want to know, how can I fix this issue ?

as you can see in this image the object is perfectly lining up with the HDRI.

I guess you need to create a floor

HDRIs aren't really meant to be a floor, but CGMatter has a video on projecting an hdri onto an object here:  https://www.youtube.com/watch?v=RsAUfQlZH_w

Check out this tutorial video. He explains a very good method to do what you're looking for. - https://www.youtube.com/watch?v=RsAUfQlZH_w&t=0s

Instead of having users go through links just to understand your
question, use the tools on the site to upload images directly.  See
How to upload an image to a post? Please use the [edit]
link at the bottom of your question
(https://i.sstatic.net/lXFuK.png). You have better chances of
getting a answers if all of the information is visible in this page.

create a plane under your object and keep it as shadow catcher... Search on Youtube for Shadowcatcher


text:
Setting up a metallic foil overlay with transparency using materials and textures
I'm trying to setup a label for a supplement bottle.
I want to have 2 materials, one that is the "main label" (.jpg image) and another that overlays that label with a metallic foil (which is a .png image with transparent knockouts around the metallic areas).
Attaching some screenshots of what I've been able to accomplish so far (screenshot 2 is just to show what the underlying "main label" should look like), but can't seem to get both the main label and the metallic overlay to show up at the same time. Here's some questions I have:

Should these be setup as 2 distinct materials, or should the main
label be the material and the foil overlay a texture?
I have read a bit about "UV unwrapping," but felt it doesn't apply
here, is that what I'm missing?
In screenshot 1, you can see I have 2 image nodes - the one
connected is the foil overlay, which seems to be working with
transparency, but how can I add in the "main label" image underneath
that? Am I missing something there? Every time I add it in it
doesn't show up.

Metallic foil overlay

Underlying image needed

Welcome to Blender.SE. Use only one material. Forget transparency, use the the png alpha to mask two materials: one with metallic properties and one with the plastic lable.

Thanks! Can you be more specific? I'm a little confused with terms like "use the png alpha" with no context or usage direction. I have tried adding both of my labels as materials for the same object (the label object), but as I mentioned I cannot get both of them to show at once, and if I use the transparency as a material without setting the transparency nodes it shows the transparency as black.

is your text image a png with transparency?

@moonboots yes, as I mentioned I have 2 images - one for the underlying "main label" image, and one for the overlaying metallic foil knockout. The underlying image is currently a .jpg because I don't need anything to show through there, while the metallic foil image is a transparent .png. As I mentioned in a previous reply, if I use the .png as a 2nd material over top of the "main label" image, it displays the transparency as black and will not allow the underlying material to show through. Any ideas?

please pack your images (File > External Data > Pack All Into .blend) then share your file: https://blend-exchange.giantcowfilms.com/

thx again @moonboots, seems I should add it to the original post, right? adding now

yes, click on Edit on the bottom of your original post, or copy paste on a new comment

@moonboots done, lmk what you see, thx!

Jpeg images will not work as they have no alpha channel. In that case create a mask to determine what parts of the material show the image, and what shows the color of the material. Read the following link carefuly: add a transparent image on top of a material

@susu to clarify, as mentioned, the image that I want to be the metallic overlay is a .png with transparencies. I don't see any harm in using a .jpg as the underlying image that fills the entire label object surface, do you? Either way, I can make it a .png but there are no transparencies in that underlying label image so I don't think that will solve the issue. In the post you referenced here, it seems they are addressing my question #2 in the original post. Are you saying I should look more into the UV mapping as a solution?

You don't necessarily need a  PNG image with alpha channel, but you do need a black and white image to use as mask to determine the mix of colors or shaders. UV mapping will allow you to place the texture with more precision in particlular faces of the object. Again, read the link suggested above.

@susu that makes sense. Can you help clarify and document the procedure I'd need to do here? Something like:

Apply the overall label image as a material (again, this is a .jpg with NO transparency needed, because it fills the entire label object)
Create a 2nd material with a black-and-white .png of the foil areas needed
then what?\

Another way you can do this is to combine the label text and the gold foil using a mix shader, and the alpha value of the foil image as a mix factor. I took the b&w value from the foil and used it as a metallic factor as well. You can increase the "metalness" by dragging the slider on the right side.

Thanks! I'm trying this now as it seems a more elegant/editable solution. Does it make sense to output the metallic layer as black (either here or in the future), thereby bypassing the nodes changing from rgb to BW? Or are you saying I need to use that color ramp node to adjust the "metalness" - wouldn't it be easier to control it via the "metallic" feature in the principled BSDF node?

Well, I just noticed I made a mistake. I was playing around with the sliders and forgot to reset them before I took the screenshot. I meant to invert the ColorRamp. Drag the black slider on the left all the way to the right (past the "white" arrow) and then bring the white arrow a bit closer to it. Then plug the result into the surface to see what it does. The idea is to make a metallic "mask" so only the areas of your image you want to be metallic (the white parts in the result) are cast that way, leaving the rest untouched. It doesn't matter that much for this image, but might for others.

This can also be:

Base color to jpg when no alpha.
Metallic when alpha (with a color ramp to tune it).
Roughness differently handled depending on alpha.

Here is how you can organize your nodes. Actually you want your orange surface to be a mix between orange and metallic I suppose, therefore I've mixed a Diffuse with a Glossy node, then I've used the alpha to mix between this orange material with the background of the label.

Thanks again! To clarify, as I mentioned in my OP, there is already a transparent .png in the file I uploaded that defines EXACTLY what I want to be metallic here - which is NOT the black text, but the yellow areas of the label. I can't understand why I can't simply place that overtop of the underlying image of the entire label surface (which is a .jpg of the entire label because there is no transparency in the underlying image). Does that make sense?

oh ok my bad, I'm going to edit my answer, but do you mean the orange surface is supposed to be an orange metallic surface?

yes, exactly, thx

Thx again Moonboots -- I think both yours and Chris' solution work great for this - they both helped me understand the missing nodes and proper routing I was missing here. I think Chris' solution has a bit more flexibility with the metallic piece via the coolramp node (as opposed to the glossy node which seemed a bit limited at least at first use). They both work though depending on the need, thx!

you're welcome  ;)


text:
Blender 2.91 wont recognize nvidia gpu
I did a fresh install with Manjaro 20 and just installed blender. I am running a RTX 2060 6gb GPU CUDA nor OPTIX see the gpu. I have the current nvidia 455.45.1 driver installed. Blender 2.91 wont recognize nvidia gpu.

That should be the right driver for CUDA, but looking at this post, it seems that there are still many compatibility issues that need addressing - https://forum.manjaro.org/t/dropping-all-legacy-and-older-nvidia-drivers/36338

how did you install blender from official repos? snap? flatpak?


text:
Why does boolean cut out some shapes and not others
I want to design a TV unit and for that I am using a Boolean modifier to cut out different elements.
I have two symmetrical geometries (they are in the same object) and one of them works perfectly and gets cut out, but the other one not:

After several tries to solve this issue I have extended the length of the geometry of left one (as you can see on the picture) and after that it works perfectly.

Why this is the case? Why do I have to extend the length of the left one to make the cut out possible? As you can see on my first picture the length of the original geometry is basically long enough to cut through the whole geometry.

Boolean operations have issues with number precision as they are stored by computers. Booleans are sensitive to overlapping geometry and vertices or other mesh elements being very close to each other.
In general Booleans should be avoided as much as possible while modelling precisely because of the issues you are experiencing.

You could try to switch between different modes and using different solvers, also to adjust the forms of the objects slightly to see if you get better results, but it might also be a very good idea to just choose another method for modelling what you need as you will get nicer topology as well if you model everything using other modeling tools.
Sometimes Booleans just do not work as expected - this is common in most surface modelling applications, not just Blender. So if they work for you in your situation, that's great, if they don't, just use something else.

Hi!
Thank you very much for the advise and help.


text:
Ungrouping objects connected via a vertex
I have a few seperate models imported from Sketchup, and I can select the groupings that I made in Sketchup, but there are some groupings that are incorrect (not the same as what was grouped in Sketchup). When I move one group of objects, sometimes there are some unrelated objects which move together with it. However, when I go into edit mode, they are unconnected.
They seem to be connected to random vertices at the grid origin.
I've tried:

'L' - 'Make Local' - 'Selected objects' and
'U' - 'Make Single User' - 'Object' - "Object & Data & Materials + Tex, to no avail.

I've also tried

'Remove from group' among other group options, but they all still seem to leave the objects connected at the vertex near the grid origin, not allowing me to move/translate them as seperate selections unless I got into edit mode.

My question is
How can I ungroup these objects?

To make your question potentionally answerable please add screenshots of the mesh in Object and Edit mode. There isn't any notion as "groupings" in Blender.

Your group is a single object. You can select the object, go into edit mode, then separate parts of the mesh into separate objects.
From Separating Meshes - Blender Documentation

In edit mode press the hotkey 'P'. Then select one of the option:
Selected

This option separates the selection to a new object.

All Loose Parts

Separates the mesh in its unconnected parts.

By Material

Creates separate mesh objects for each material.

If the parts are unconnected in edit mode (as you stated), use Separate > All Loose Parts.

They seem to be connected to random vertices at the grid origin.

If the parts are connected, You can try to can try to delete the vertices/edges before separating the mesh by loose parts. Otherwise you will have to select the part of the mesh, which you want to separate and separate by selected. (Useful:  'L' [Select Linked])


text:
Proper deformation of body mesh?
I've modeled a body, rigged it and weight painted it. Now that I want to make poses with it I realize that I have a few problems. The main problem is that when two parts of the body clash together, one goes on the top of the other and doesn't stretch like a real body.
I was wondering if there is anything I can do to improve that?
What should I be looking for? Maybe colliders?
So far it's impossible to do poses.

Standard skinning approaches (e.g. the armature modifier) do not support collision behavior.
Self collision handling can be a bit tricky and certainly computationally intensive.
In blender you have two real options:

using physics simulations (cloth or softbody) which are difficult to
get right and slow to run (using a corrective smooth modifier after
the simulation can help a bit with looks though). They also don't
handle volume properly.
Manually creating corrective shapes for the intersecting poses (and potentially adding appropriate drivers if you are animating). This can be quite time consuming if you have a lot of poses you care about and want to drive everything for animation.