text:
Displacement distortion
By some reason displacement became directed and to perpendicular to normals. Tried to kill user preferences and check it in new scene - same thing: it's always distorted.

Please, HALP

That's interesting. Iv'e used stable 2.79 and looks like back then it automatically added Displacement node between shader input and map output, and 2.79+ doesn't do that. After adding it manually everything started to work how it supposed to. Even with old preferences. Yay!

You’ll notice that the Displacement socket is blue to indicate it’s a vector rather than a scalar (grey). This means that the displacement no longer occurs in the direction of the normal but is determined by the vector. Your black and white are effectively the vectors (0,0,0) and (1,1,1) and this is skewing the displacement. The new Displacement node takes the input and generates the correct vector for displacement along the normal.

Oh, now I see! Thanks for the explanation!


text:
Weight paint strength problem
Some one please help me. I am creating a character for my unity game but the problem is that when i do weight paint of strength of 0.1 it act like 1.0 strength. It solved by adding corrective smooth modifier but unity does not support corrective smooth modifier so some one please help me. [THANKS IN ADVANCE].help me please I will very thankful.

In Unity vertex weights are normalized, meaning the sum of all weights for each vertex has to be 1. (It might also be the blender converter/exporter that does that, I don't know)
So if the 0.1 weight is the only weight applied, it will become 1.
You should add 0.9 weight to another bone (probably the root-bone) to fix it.

So it means if i add 0.9 weight to root bone then it will work fine. And can you please tell me what is root bone i dont know about root bone. And thank you very much for your answer

The root bone is just the top most bone in the hierarchy, any transformation on it effects all other bones in the hierarchy  (usually it isn't really used in any animation). Any vertex in your mesh that you don't want animated should have a 1.0 weight on this bone.
In a humanoid character this is usually located at the pelvis (but not always), sometimes at ground level.

Now all bones are working fine except upper arm bone and foot. Foot and Upper arm joint strength is 0.4 but act like 0.1. And it works perfect  with corrective smooth modifier but unity does not support this modifier so is there any other way to get the effect of corrective smooth modifier to my mesh for unity and without this modifier my character look very ugly and very hard edges. Please help me

I don't know what the corrective smooth modifier is. But if it is something you can apply (and it remains correct after applying), then Unity should be able to import it correctly.
An other things, there's a setting you should use when painting weights: "Auto Normalize", you should keep that on, it ensures the sum of all weights for a single vertex is always 1

If you start with a blank weight paint, as soon as the weight is more than 0 it will seem like the verts go strength 1 to the bone you are painting.
To fix this simply select you pelvis, paint your entire skin red so the vertex are weighted to the pelvis instead of nothing.
Then start painting the skin for the legs etc. and the paint "strength 1" issue was gone in my case.

source: Stack Exchange

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

sort: votes


text:
Loop copying over vertex coordinates is not working
I'm completely baffled by this - it makes no sense to me at all!
I'm trying to copy over vertex coordinates from an object in blender into a list, and at the end of the loop the entire list is filled with only the last vertex.
This prints out the list with only the last vertex in every part of the list:
import bpy

current_obj = bpy.context.active_object
verts_l = [v.co for v in current_obj.data.vertices.values()]
verts_w = [current_obj.matrix_world * v_local for v_local in verts_l]

vert_list = [[None, None, None]] * vert_count

def build_vert_list ():
    for i, vert in enumerate(verts_w):
        vert_list[i][0] = verts_w[i][0]
        vert_list[i][1] = verts_w[i][1]
        vert_list[i][2] = verts_w[i][2]
    print(vert_list)

However, if I instead print out the vert_list during the loop, it prints out the correct data:
def build_vert_list ():
    for i, vert in enumerate(verts_w):
        vert_list[i][0] = verts_w[i][0]
        vert_list[i][1] = verts_w[i][1]
        vert_list[i][2] = verts_w[i][2]
        print(vert_list[i])

If I do instead:
def build_vert_list ():
    for i, vert in enumerate(verts_w):
        vert_list[i] = verts_w[i]

it works properly, and I can access the values in the list with vert_list[1][0] for example, however every member of list is headed with some weird  nonsense, which prevents me from doing round() functions on the data.
Can anyone help me? This has me pretty stumped.
(I only started learning Python a few days ago, so go easy on the technical stuff please.)

List comprehension
Not sure why you are getting the issue. For Mesh.vertices make sure you are running code in object mode.
Question code can IMO be simplified to
import bpy
context = bpy.context

ob = context.object
mw = ob.matrix_world
me = ob.data

vert_list = [list(mw @ v.co) for v in me.vertices] # 2.80
#vert_list = [(mw @ v.co)[:] for v in me.vertices] # 2.80 alternate

#vert_list = [list(mw * v.co) for v in me.vertices] # 2.7x

print(vert_list)

in this case see no need to predefine vert_list or enumerate to index.
Alternatively using bmesh in edit mode
import bpy
import bmesh

context = bpy.context

ob = context.edit_object
mw = ob.matrix_world
me = ob.data

bm = bmesh.from_edit_mesh(me)
bmesh.ops.transform(bm,
        verts=bm.verts,
        matrix=mw
        )
vert_list = [v.co[:] for v in bm.verts]
print(vert_list)

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


text:
Extruding / Scaling from reference edge (?)
I'm a beginner in blender and am trying to model an axe for a logo, but when scaling the "sharp" edges, they scaled outward from the geometry origin, which made some edges go inward, instead of facing outward (showed in example foto). Is there any way to reference an outer edge loop to make the inner edge loop scale outwards from that edge, instead of from the geometry origin (if that makes sense)?
Blend file: https://www.file-upload.net/download-14381184/Draven_Logo.blend.html

If I'm understanding you correctly...
You want to create a sharp edge to your axe. The way I would achieve this is by using the Offset Edges which is now part of the Edit Mesh Tools addon.
First in object mode apply the scale (ctrl-a -> Scale) (I removed half the axe for clarity)
In edit mode remove the faces around the perimeter of your axe, select both faces and do Edge -> Bridge Edge Loops

Next add an edge loop to the centre of the new faces. ctrl-r -> hover over the faces -> left click -> right click (drop the loop in the middle)

Then choose Edge -> Offset Edges -> Move and play around with the settings

You have a LOT of verices around the edge of your axe, so you will get some edges crossing over each other if you pull out the edges too far, but this is a whole other issue :)

That worked perfectly, thank you :D


text:
Why I can't see the metadata in Windows?
I wrote some metadata to my output image (png) and can't see it in windows.

Also, I wrote antoher image (exr) with nodes in Compositor and there are even less metadata written. Should I assume that the metadata is only written to the output file and not the File Output node from compositor?

There are other free programs for Windows which can show you the metadata.  Please search for XNView.

Oh, thanks, I did it and now I can see the metadata. So that means it's windows that can't read the metadata written by Blender, not Blender writting it wrong.
It's a pity, I wish I could read it with the native Windows tools.
Thanks again for the workaround

I have no idea whether Microsoft Corporation will devote time and resources to show various types of satellite data in the Windows Explorer or other programs.  I think there are various type of meta data, EXIF et cetera. One can search some metadata for images with Windows Explorer, at present. All vague memories.  Although I rarely use XNView, I have used it to show me which Blender file created the image.  I do think your question is loosely related to Blender as I just gave an example. Blender creates metadata.  Immoderators seem to thrive on closing  questions as some form of indulgence.


text:
Split and delete a video clip, speeding up undeleted clip keeps deleted section
Let's say I added a video clip into the video editor, and I split it in half and deleted the half end of the video. Now, when I attempt to speed up the first portion of the video(undeleted) the deleted portion returns as part of the sped up version of the clip. How do I make sure the deleted clip is gone, and doesn't return when I try to speed up just the first portion?

Just press SHIFT-K (hold split) instead of K (just split). This does exactly what you want. It deletes everything after the cut.

What exactly does shift-K do compared to just k?

It really cuts the end off. So if you extend it, you will never see again the cut part


text:
Increase fps on video editing V2.93.2
I just started using blender for it's video sequence editor, and downloaded it yesterday. Upon trying it out, Blender is extremely laggy, dragging my videos into edit is incredibly slow. By the time I managed to, watching the clips took forever, the fps kept fluctating from 20 fps to 2 fps. All other answers are for previous editions, is there a fix for higher fps frame rate on this specific version?

if it manages big videos it may become laggy I guess, you can create proxys in order to speed up the management

How would you do that? I am completely new to this

type "Blender VSE Proxy" and you should have explanations, like this video (I haven't watched it but I guess it's good): https://www.youtube.com/watch?v=NRhTiFAHL1k ... also here (even though Blender has changed since 2015): https://blender.stackexchange.com/questions/32203/how-do-i-use-proxies-in-the-vse-correctly

Oh so actually I have already been doing something similar to that, but the lag is still there, along with a lower render size meaning a more blurred video

ok so I don't know the other solutions, I hope someone will know, maybe Blender is not optimized for too complicated video management (the VSE is pretty convenient but I've also noticed some lagging, I don't know if it's avoidable)


text:
Is there a way to merge split clips on video editing?
How do I merge two or many split clips together? Is there a way to do that? If so, what shortcut? Thanks
Im using 2.93.3

You can't join clips in the sense of splicing one to the end of the other, because Blender treats strips as atomic objects.
You can place two strips adjacent to each other; set the render length to their total frame range; and then render to a single file, creating a file that contains the spliced strips.
You can group strips into meta groups by selecting the two clips, right clicking and selecting group from the menu.

The only reason I asked this question was because I wanted a simpler way to speed up clips. If I could merge split clips, I could speed it up as a whole? Do your methods help this problem?

I don't think they make any difference.  You still have to do the time remapping, and you can already do that on adjacent clips.

You can collect several strips in a meta strip and add speed effect to that, maybe an Adjustment layer and then add a speed strip to that(will speed up the visual result of the underlying strips).


text:
Save blender file startup export preferences (2.92)
I have been consistently making videos, and I was wondering if there was a way to save my video preferences before exporting; for example audio codec, location ffmpeg video etc. I know on older updates you could go to
file --> save startup file

but I can't seem to find that in this version. Any help is great thanks!

Never mind, I just found it is under
file --> defaults--> save startup file


text:
How do we crop a video and then resize it?
On blender 2.92 I can crop videos to my preference, but then when I render them it just shows a black screen where I cropped it. How do I resize it soo it fills the missing spot? For example making the cropped video larger.

If you can move to 2.93.4 it will be to your advantage because a number of Video Sequence Editor bugs have been fixed.  In this case, it's very easy to do:

Use the Crop settings to select the cropping you want.  Here I simply cropped 100 pixels off of each side and the top and bottom.  This leaves the image centered.
Use the Transform -> Scale X and Transform -> Scale Y settings to expand the cropped image to fit.

Or you can use the compositor to composite the movie into another scene.

Let's say I just cropped off left and right side by 100 pixels. Is it possible to use transform and fill up all the remaining space without the video looking askew?

Yes.  That's what Position X and Position Y are for.

Right now I have my video which has 2 gray strips on both left and right side by 100 pixels. If I use position x all that does is move the video to the respective side making the gray pixels more on the opposite side? Correct me if im wrong. I want to see if I can remove gray pixels completely just video

You need to both scale and move until it fits


text:
Is it possible to put a separate video on top of your main video?
For blender video editing, I was wondering if it was possible to have my main video running and then for example another one of my own videos running at the same time that is smaller and only takes up the top corner of the screen.
So two videos running at the same time

Select the second video strip in the Sequencer, and in the N panel > Strip > Transform change the Position and Scale values, or in the Preview window press G to move it and S to scale it manually:

Hey, thanks for your response. For some reason overlapping clips I can only see the new clip but not the old one. It just becomes gray background.

Alpha overlayer for those wondering


text:
Can't find the modifiers wrench
I am a newbie, and I'm following a tutorial, but I can't see the blue wrench showing up to add modifiers to the cube I have selected.

Things show up in the properties editor based on what you have selected.
Notice that the outline around your cube is red, rather than orange.  That means it is one of multiple selected objects, and it is not the active object.  The active object, probably the camera, must be one that doesn't accept modifiers, so there will be no wrench action.
To fix your problem,

Type ALT–A to deselect everything.
Left click on the cube.

The wrench should show back up.

The active object can be None (which looks like this case, no object name in info, no object / data etc tabs) eg after a delete.


text:
Mapping Textures to World Z-Axis
I'd like to apply a texture to several objects and have it fade out with increasing world Z-height. Think something like a high-water mark after flooding staining all objects. I've played around with several approaches but none seem to work. I can get the effect I want on a single object, but if I drag that object in the Z direction the texture stays with the object; I want the texture to stay put so the object appears to be "swimming" through the texture. I'd like to do this with procedural textures. It seems like I could use a gradient texture to help with this, but no success so far.

Sorry If I'm misunderstanding the question, but I think you can get what you want by using the Position output of a Geometry (shader) Node, connected to a Separate XYZ. It's hard to see from the (non-moving) example below, but you can translate the object on the Z in Object Mode, and the "cutoff" line stays at the same Z-height. Use something like this as your texture mask:

This seems to work the way I want. I'll need to do some fiddling to alter the width of the gradient, place it properly, and so forth but this look like the core of what's required. Thanks.


text:
Enviorment Texture cannot be seen on object
I try to make a Moebius Strip on combination of colored glass. I Used a tutorial to fake the glass effect, but the effect does not work. It only works on the cube ( at least it did yesterday) I can not replicate the issue. I can not figure out what the Problem is. See screenshots. I used the following video for the colored glass effect. https://www.youtube.com/watch?v=qhrj5CO6yfs

First of all, your environment texture called "daniel-olah..." is not using an Environment Texture node. It is an Image Texture node set to Flat projection which will not be displayed correctly in the viewport. You have to use an Environment Texture and use Equirectangular projection (it should be set to this by default). In the last screenshot there is an Environment Texture node - but the background is set to Transparent, so of course you cannot see it.

The reason why the glass material works on your cube and not on the moebius is because you disconnected the Geometry Nodes' Geometry Input:

So, all materials that were assigned to the original object also got disconnected.
Here is a cube with dummy material and a geometry node setup with the input geometry connected; material is intact:

And here's the same Object with disconnected Geometry Input (similar to what you did, but with a simple cube primitive); material is gone.

To fix this , you can insert a Set Material Node; Material is back.

Although you might be correct about the missing glass material, the question also has one screenshot where there is marked in red that the background does not seem to represent what is expected to be seen. And that has nothing to do with a missing glass material. Actually in a purely mostly homogenous greyish environment the glass material wouldn't look much different. And the difference pointed out in the world shader nodetree between the Möbius band and the cube is there and it will result in a seemingly incorrect background image - independent from the glass material.


text:
How do I stop my model from warping horrifically when bones are rotated?
I'm new to using Blender to make models, and wanted to make a custom VRChat model as a test of skills and even if I have the capacity to upload a model (and be Quest viable). I've watched dozens of tutorials but just can't seem to understand how this works.
So, I rig up my bones and try to scale them and move them around to match proportions. (I used my Roblox avatar so that way I didn't have to make a custom model from scratch.)
When in default pose? It works just fine, no questions asked.

But the very MINUTE I try to rotate any bone in any direction...

I have a vague idea on how this happened, but I need a fix.
When I was making the bones, I messed with the scaling to get the proper height and width of the avatar, so that may have messed something up.
But now I need serious help trying to find a way to reverse the weird bone scaling. Maybe that'll fix the issue.
Please, if you can, try to help me with this. I'm completely lost and already spent 3 hours watching tutorials for THIS to happen, and I don't want to undo everything (but will as a last resort.)
Thank you SO much in advance.

Apply the scale in Object mode (Ctrl A > Scale). If you need to scale the bones, do it in Edit mode, not Object mode

Most likely, you are right about "messed with scaling". Eventually, you need to apply the scale (or all transforms) of your mesh, because a child object (your mesh) will inherit all transforms of the parent mesh (your Armature) on top of its own transforms. As long as the base mesh has "zero shift", this is normally a good thing (makes your rig work), but with different scalings etc., things get a little weird:

But wait! To avoid further problems, it might be good to "reset" the Rig by:
1.) either clearing the parent-child relation of the Armature... Then apply Scale, then re-parent:

2.) Or you could try to temporarily disable the Armature Modifier, then Apply Scale (Quicker way, and non-destructive... Not sure if this really works, though)

Let us know if this solved your Problem. If not, please add the .blend file to your Question so we can look into it further.


text:
Python - Pick collection with eyedropper
I have created a system that lets users assemble pieces from collections, placed inside of a master collection. Right now I am letting the users choose which one is the master by manually typing the name of it.
But is there a way to get this information with the eyedropper tool instead? And then access the name of what was chosen in that field?
For context, here I've actually named the collection "MasterCollection" but the system just looks for whatever name was typed in the UI. So if the user called it "BigCollection" they could then select it with the eyedropper directly. Or if they have multiple of these master collections, easily pick a different one:

And this is what the simple UI looks like right now, where I'd like to use the eyedropper instead of the StringProperty fields:

not a direct answer but you should use something like this https://blender.stackexchange.com/a/252682/86891

@Gorgious Oh nice, this almost solves the problem, thanks! It could still be problematic if the user has a lot of collections and overcrowds the list, but the searchability of the field does help with that so I'm definitely seeing this a viable alternative.

oh actually I thought this gave your an eyedropper on the field, it does with object pointers but not with collection pointer it seems


text:
How can I show an animated action which happens only with triggered precondition?
I am new to Blender and its been almost 3 months, using it. I have a big presentation coming up and I want to show my Manager my animated CAD Design.
So Basically I Want to show a Door Open (Sliding), only when we push a button. Is it possible to do this in Blender? (Just like a Train DOOR)
I know the normal animation method of sliding the DOOR, but I am looking for something where an action needs to happen for the next action to take place.
Can somebody please give me a reference or a video where I can see how it can be done?


text:
Howto setup a python virtualenv on your system, and connect it to your addon
I am using Blender 2.83 on ubuntu.
I am developing an addon that I am very happy with, and would like to include other 3rd party libraries such as scipy and vectormath. In the most ambitious goal, i would like to merge other projects into my Blender addon, and port all the work that has been done previously into the Blender scripting tab, replacing lots of old ugly visualizations and crappy mesh operations with the awesome Blender functions.
In order to do this, I have found only one sane solution online. Start blender with the PYTHONPATH set to a local interpreter, combined with the proper CLI command (--python-use-system-env).
However, I dont want some hack that will only work on my machine. I do not want to go by trial and error finding what versions of different libraries needs to be present. So, my questions:

How do I make a requirements.txt or similar from the bundled python interpreter, so I know how make a local virtualenv that will not break Blender?
Is there some built-in function in Blender to accomodate what i want to do, so that I could actually deploy this addon to wider audience, without it coming with extra instructions on how to install?

@Robert Gützkow 's answer here may not answer, but will help fill you in...

Thanks. I am looking at his repository now. I may end up doing something like that, especially since I now have a great starting place with his code. However, it corresponds to modifying the bundled python environment, without any kind of virtualenv. I wonder if changing the virtualenv could work dynamically? This could be a workaround, resulting in very slow execution times for the addon however. This would be way to work with another version of Numpy say, without breaking other functionality.


text:
How do I get the name or identifier of my newly created mesh from an operator
For example, I can run:
retCode = bpy.ops.mesh.primitive_cube_add().

It doesnt return any kind of identifier, just a code (e.g. "FINISHED", if it finished correctly).
When I make my own operator, I can set programmatically what name it should have, and put that into an input argument to the operator. But this still does not solve the problem, because Blender renames meshes with the .XXX logic when names collide.
I would have expected an interface of the kind:
retCode,AssignedName = bpy.ops.mesh.primitive_cube_add(Name, lots of other args)

What am I missing?

Short answer is no: https://blender.stackexchange.com/a/18878/31447 Doesn't matter to much, because the recommended way is to use low level calls anyway: https://blender.stackexchange.com/questions/61879/create-mesh-then-add-vertices-to-it-in-python

Sigh. Blender uses the operator context paradigm. Changes made by the operator are reflected in the context. The name of a new primitive object would be context.object.name directly after running the operator successfully.  (It is expected  of operators that create objects to set the new object as both active and selected,) What would be your expectation of the return codes for bpy.ops.object.delete() or show splash screen?

https://blender.stackexchange.com/questions/45101/adding-named-objects-in-blender-with-python-api

Thanks @batFINGER. Clear answer, and great link to the connected question. Must be tiring with so many new users interested in this stuff :)

Apologies , was getting flak elsewhere..  it's  to late to "de-sigh" comment above.


text:
How does python bundled interpreter work, and why am I getting thees crashes?
I have experimented quite a bit with extending the modules that come with the blender bundled python. It is confusing to me, and seems not well documented anywhere how it actually works.
A folder called Python exists in the Blender folder, and it is described in numerous places as the bundled python. In it, you can find a structure very similar to that of a Python venv. That is, you can create a virtual python environment by using the venv command as:
python3.7m -m venv myVenvFolderPath --copies

This follows regular python convention. Since the python folder contains some other dependencies you need to copy them as well, in order to recreate a venv that is as similar to that of the bundled python that comes with Blender (see this explanation for details)
Furthermore, this binary (python3.7m in the blender python folder) is referred to online virtually everywhere as the bundled python interpreter.
however, i doubt that it really is. If you delete this binary, Blender will still run very happily. In the python console inside of blender, you can then run:
import sys
sys.executable

and you will find that Blender will have just found some other python 3.7 binary, whatever it can find in the path of your system. Blender runs perfectly fine with this, even if the python binary that it found was actually another version. On my system, Blender finds the "Python3.7m" version that is in the path, that is actually version 3.7.10, and not 3.7.7 version of Python. Again, that is all fine with Blender. I also have built Python from source, and have fed the python binary (as a venv) to blender, using a wide variety of build options. Inside of blender, there is never any problems that I have encountered, and mysteriously Blender always reports version 3.7.7 in the startup of the python console inside of blender.
Right now, I am inclined to guess that the python binary that comes with Blender is actually not the interpreter at all, but that the interpreter is either statically linked into blender, or available as a dynamic library. If someone could verify that, it would really illuminate me, thanks.
Second part of this question, which I think is connected to the first part, is why I am getting very odd errors and crashes of Blender, when i add certain modules to my python environment. This happens regardless of what version of python I am using to create the venv, or even doing the pip install.
This happens when i try to run matplotlib with any backend that is interactive, except for the "webagg" option. Since the built-in python interpreter (which is located somewhere mysteriously) does not have tkinter built in, I have tried using QT4 and cairo as visual backend frameworks. Using any of them will properly bring up the matplotlib.pyplot figures I want in interactive mode, but afterwards Blender becomes unstable and will always crash on me after some time. The error is always the same, a full immediate crash due to segm fault, and the output in the terminal reading:
ERROR (gpu.shader): GPU_material_compile FragShader:
      |
10412 | const vec3 cons26 = vec3(0,000000000000, 0,000000000000, 0,000000000000);
      |
      | Error:  C1068: too much data in type constructor
      |
10414 | const float cons28 = float(0,000000000000);
      |
      | Error:  C1068: too much data in type constructor
      |
10415 | const float cons29 = float(1,000000000000);
      |
      | Error:  C1068: too much data in type constructor
      |
10416 | const float cons30 = float(1,000000000000);
      |
      | Error:  C1068: too much data in type constructor
      |
10418 | const vec3 cons35 = vec3(0,000000000000, 0,000000000000, 0,000000000000);
      |
      | Error:  C1068: too much data in type constructor

All interactive backends that "work" yields this instability, with the exception of "webagg", which requires the tornado webserver to be installed with pip. This one works great, using the web-browser for the plots, except that I need to go to the terminal to issue a ctrl-c, in order not to freeze up Blender.
System Info
I am working in Ubuntu 18.04, with Blender 2.91.2. I am on a laptop, Lenovo thinkpad P1, gen 2, with a Quadro T1000 graphics card

You put way too much detail before asking the question! For an explanation, I just learned today from somewhere else on the Stack Exchange that if you delete blender’s native Python (it is indeed python, make no mistake) blender will make up for it for you, and try to find python somewhere else on your system. It’s not because it’s secretly a scam python or something. Blender improvises.

Check out the comments on this question https://blender.stackexchange.com/q/212945/73575 They might help you :-)

@ZargulTheWizard, if you delete the python directory, then Blender is supposed to look for another interpreter, yes. I did not delete the python folder, but the python binary from within the folder in the example above. Nonetheless, no matter what I have tried,it seems that the binary is actually not changed... that is, the python interpreter seems to not be changed, although the folder that contains all the modules will be the only thing changed. That is how it seems from the observations I made

Why are there commas and not dots in the floats in error message? Should the be float2?

@Emil, that is truly weird indeed. If that was C or GLSL code, it would be a likely bug by a coder from a culture using comma as a decimal seperator.

Some speculation: looking closer at the source code of Blender, this looks like is a bug of dynamically compiling the frag shader into GLSL incorrectly. For whatever reason, when including python modules on my system that use graphical resources it will trigger the frag shader to be compiled incorrectly (with these weird illegal comma seperated values that are too long) for both the vec3 and float types. I wonder if this will ever be fixed? I am guessing this is of extremely low priority for the developers, seing as this does not seem to trigger unless you add modules to python manually.


text:
Deployment of complex addons
On Blender 2.91.2, windows and linux
Here is my situation:
I have developed an Addon that uses several dependency python libraries.
I first made an "install dependencies" button in the GUI interface of the addon, inspired by this example. On windows this requires elevated rights to run, and doesnt work properly on the windows installer version of Blender(only on stand-alone).
To make it more complicated, some of the libraries are not reacheable by pip everywhere, as they are internal libs. This addon is not intended for public use either.
To get these libs working, I simply added them manually to the "/python/lib/python3.7" folder, which worked flawlessly.
To make it even more complicated, in order to run the addon properly, certain settings are required that are not straightforward to do. The most annoying one is to set the default backend to matplotlib to WebAgg, which requires changing a config file in the library location.
Lots of other settings needs to be set as well (that could be done through the python api with effort).
This led me to the approach of deploying using a full stand-alone blender, with all the dependencies installed and with everything configured. The addon itself is simply put in the internal Addon directory: "/2.91/scripts/addons/"
This brings the new difficulty of handling new addons that the user would add to this version. I would like to have a stand-alone system fully, where new addons would be put in a sub-folder to the folder of stand-alone blender.
This doesnt seem to be allowed. In the filepaths option of blender, one can set relative paths only relative to where blender is run from (where the blend file lies, or from where you ran blender on command line). I would need to be able to set relative paths to the Blender binary.
I would like to know if there is a better approach to the above deployment. Preferrably, I would like to not deploy using a configured stand-alone blender install at all, but at the very least i would then want to get this install to have all addons installed put in a sub-folder.


text:
Losing reference to class variables after undo
I have a simple script that instantiates random objects from specific collections. In order to make sure I always do this correctly, I've created a class with some internal variables to access those collections. But if I hit UNDO it appears that Blender deletes them, at least until the script is manually run again. The variables I've made are:

master_collection: A Collection for directly getting the topmost collection by name.

sub_collections: A List of Collections for dynamically getting all of the immediate child collections inside of the master.

The simplified version of the problem is shown here:
class GFC_gen_start(bpy.types.Operator):
    bl_options = {'REGISTER', 'UNDO'}

    # The collections that go missing on UNDO
    master_collection = bpy.data.collections['MasterCollection']
    sub_collections = []

    def execute(self, context):
        self.initCollections()

    def initCollections(self):
        """Initialize references to subcollections"""

        # Clear list if any data from last use still exists
        if (len(self.sub_collections) > 0):
            self.sub_collections[:] = []

        self.sub_collections = self.master_collection.children

The error message that occurs when running this after hitting undo is:
"ReferenceError: StructRNA of type Collection has been removed", which points to the very last  line of the script.
As long as I never UNDO, this code works and continues to work on subsequent executes. What would be a good way to secure these variables? I am considering moving everything into execute and handing them down as function arguments instead of easily accessing with "self.", but I am curious to know if there is a better way to handle this before I start hammering it into shape.

try removing UNDO from bl_options = {'REGISTER', 'UNDO'}

This is not how you serialize data in Blender. You need to use a CollectionProperty and a PointerProperty. But operators can't reference these, so you either need to store them on another object, eg the current scene, or reference these by name using a StringProperty. To answer your question, python pointers to blender objects are lost on undo / redo and on save / load unless you save them using the supported property system

An answer was posted by Gorgius as a comment on my question, so I'll just quote it here and mark it as closed for anyone searching for this in the future:

This is not how you serialize data in Blender. You need to use a CollectionProperty and a PointerProperty. But operators can't reference these, so you either need to store them on another object, eg the current scene, or reference these by name using a StringProperty. To answer your question, python pointers to blender objects are lost on undo / redo and on save / load unless you save them using the supported property system

Thanks for the help! If anyone needs more to go by, I recommend checking out this video on PropertyGroups by Darkfall.


text:
Fit new value range of driver to 0-1
I'm making a new facial rig and I'm using the x location value as a driver for the shape key.
I want to fit my x value in the driver between 0-1, does anyone have any suggestions.

Perhaps you could clarify by telling us what 'the' x location is.  X location of what, exactly?

((driverValue) - startMin)/(startMax - startMin) * (endMax - endMin) + endMin

In the Driver Editor, the  f-curve graph, instead of controlling the map from frame on X to property on Y as it does in animation,  controls the map of driver input on X to driver output on Y.
So your driver might look like this:

.. by moving the control points, you can change the offset and ratio of input value to output value. The relationship does not have to be linear.
And the curve can take modifiers. Here, to clamp the output value between -5 and 5. (That could be 0-1, in your case.)

So, in this example, this is the result of red X driving blue X ....


text:
How to animate along any axis according to this picture?
I want to animate flipping book to both sides without separate planes. So how do I animate this plane according to the picture? Sorry about my grammar problems. I just trying to tell my problem. I think you guys can understand.
Thank you very much ☺

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

make a loop cut to your plane like this:

Add an armature like this:

in object mode, select the plane, shift-select the armature, ctrl-P -> with empty groups

in face select mode, select that face, select the first bone group and press assign.
Do the same with the other face and the second bone group.
now select the armature in object mode, go to pose mode, select the bone:

move your timeline to frame 1
press I to insert keyframe
move your timeline to frame 20
press R X and rotate the bone as much as you like, hit I
result:

Thank you so much Chris. I really appreciate your work. It's really helpful.

you are welcome


text:
Can I create equidistant hull meshes (3D level sets) in Blender?
given is:

a very complicated mesh object, with potentially a large amount of inner detail.
a positive value (a parameter) called alpha

I want a watertight mesh that is defined as the following:
"every point on the mesh is exactly alpha meters away(minimum distance) from the original mesh".
I would want this for alpha values higher than 2 meters. Solidify modifier doesnt work as advertised in this setting (when alpha gets high), and skin modifier just crashes Blender.
Also would love to hear an established name for such a mesh.
approximations that work on the convex hull would be ok as well.

You can use a Displace modifier, but like Solidify it wont account for inner geometry

@DuarteFarrajotaRamos, thanks. It looks great when I modify the strength and midlevel paramaters. I would like a single parameter (denoted alpha in the question) that governs the margin inbetween original surface, and new displaced surface (in the normal direction). Say that I want 0.5 meters, 1 meters and 1.5 meteres... what should midlevel and strength be set to?

Always set the mid level to zero, then control only from Strength


text:
How to provide large data at operator execution, arguments or otherwise?
What I want to do:
Create an addon that "inflates" 2D polygons into 3D meshes (using more ways than just extrude). There will be an option to select predefined polygons as an enum type (letters as well as basic geometries).
An option to select a CSV or json file that will load a shape from file.
It should be able to take any size of array of 2D coordinates(10 to 1000 pairs normally), defining a polygon in 2D using python scripting/console
This operator will be added to the "add mesh" context menu (shift-A).
However, when I call the operator from the console, I would like the option to provide the list or array of 2D coordinates directly.
The Question:
How can I make user provided array/list of 2D coords available to the operator, during its execute?

Passing a csv file or text document is acutally a good idea and easy to implement. Just declare a StringProperty as part of the operator and you're allowed to pass the path as argument when calling your operator in the console. Another option is to pass a comma seperated string... not sure what the max char count is though. However, hard to give an answer without seeing the actual data, suggest add your code and a slim version of the csv table.

@brockmann, thanks. If I understand your suggestions they are both based on storing the array as a string (either via a StringProperty, or via CSV file). The StringProperty would then be the better option, as this would not require the step of writing to a file. However, consider an array of 1000 pairs of floats, that I would want to write into a string. for each of those 2000 floats, I would need to write them without loosing precision. The solution is sluggish and not pretty. There must be a better way

If so, then just passing the filepath is most likely the best option and easy to implement as mentioned. Declare path = bpy.props.StringProperty() as part of the operator, done. Then you can pass the filepath using the console like so bpy.ops.mesh.your_custom_op(path="//data.csv").

This misses the point I believe (or I misunderstood). I am interested in creating 2D polygons (potentially alot of them) in python code. Then I would like to run the Operator for each of these created polygons, and make meshes out of all of them. Your suggestion would mean that I would need to use a temporary file (or string variable) where I dump everything first. While this would work, it would be sluggish and yield cryptic code. All I really want is to call the operator, with the actual data. Isnt there some better way? thanks again

The issue is that there is no real composite data type like an array to pass this huge amount of data when calling the operator using the console: https://docs.blender.org/api/current/bpy.props.html There is our famous CollectionProperty but this won't help either I guess. If the goal is to create an add-on you can also provide the data in a seperate python file using numpy or something to speed it up a bit. But perhaps I don't get your point, not sure.

I think you understand me. After quick googling "CollectionProperty", can i do the following?:
Create a class that contains the data of the 2D coordinates of the polygon.
Add a CollectionProperty to my operator
Send this in to the operator manually during console call (making sure i create an instance of the class with the correct coords)


text:
Keep Custom Operator (created by python API) properties expanded/open by default
My question is exactly the same as this one, except it is for a custom-created operator using the python API. I would like to know how to programmatically keep the properties popup expanded.
Background: In my Addon, I can invoke the operator in a few different ways. One way, is by explicitly clicking on a button in the panel stating "edit". It is for that particular use-case that I want to force the properties to be expanded. Otherwise, the user may not see the tiny interface element that popped up in response to clicking "edit".

Maybe you want to explore the invoke method that can be used to open an unmistakable popup near the cursor ? with https://docs.blender.org/api/current/bpy.types.WindowManager.html#bpy.types.WindowManager.invoke_props_dialog or https://docs.blender.org/api/current/bpy.types.WindowManager.html#bpy.types.WindowManager.invoke_props_popup

That worked. Not directly out of the box, but nearly. thanks


text:
How to set Custom Operator parameters by custom logic
In my addon dialog interface, I customize the content using the overridden draw function.
I would like to have buttons in that interface, that sets the parameters by some custom logic. For example these buttons:

Set the parameters to their default values (as specified in class definition, eg. FloatProperty(default=1.0))
reads values from a json files, process it, and set the parameter values from it.
checks all blender scene object locations, calculates the mean, sets the values based on it.

I have only found one solution that I am happy with (for option 1). It is by using the built-in operator "wm.operator_defaults".
in my draw function, it might look something like
box = layout.box()
c = box.column(align = True)
r = c.row()
r.operator("wm.operator_defaults")

to get functionality for points 2 and 3, i have created a secondary operator. It looks like this horrid thing:
class ResetROperator(bpy.types.Operator):
  """Small operator class to reset the parameters for a R operator"""
  bl_idname = "mesh.reset_r_operator"
  bl_label = "Reset R object to defaults"

  def execute(self, context):
      op = context.active_operator
      if op.name != 'Add R Object':
          raise RuntimeError("must be called from R operator only.")

      # PERFORM LOGIC, E.G. READING FILES OR ANALYZE SCENE CONTENT

      op.VARIABLE_NAME = RESULT_OF_ANALYSIS
      return {'FINISHED'}

I then call this operator from within my draw, just as with the "wm.operator_defaults" example, but explicitly as "mesh.reset_r_operator".
This puts important logic of my operator outside of the operator, and opens for errors. It is just not a nice solution from a SW engineering perspective, and I am hoping for a better solution from the community. Thanks.

Hello. This would be done in an operator invoke or using custom properties stored on the scene for example for better serialization.

invoke is only called once, correct? So how can it be used to implement the three buttons? Custom properties on the scene (as opposed to in a json file).... I dont understand how I can get to a solution.

A diagram mockup would help a bit, I have trouble visualizing what you want to achieve


text:
How can I export a blender file as an .stp?
My manufacturer requires that I supply the files that I've edited in Blender as .stp files but Blender does not offer this as an export option. I've tried exporting as .stl and then converting that with external software but they all seem to come back with errors. It's also a very detailed body scan, so I think that adds an additional layer of difficulty. Any advice very welcome! :)


text:
How to use Intel(R) UHD Graphics 730 for Blender?
Here is the issue:
I am trying to use my Intel(R) UHD Graphics 730 GPU for Blender, but I can't add it as my GPU when I try to add it in preferences.
Just to prove I have a GPU and that Blender is currently using it, here is my Task Manager:

The minimum requirements for Blender say I need 2 GB memory on my GPU, and I have 5.8 GB of GPU memory. It should work, right?

Blender needs CUDA, OptiX, HIP or oneAPI for rendering Cycles.
Enable CUDA or OpenCL:

Depending on your GPU, you might need to enable either CUDA or OpenCL.
For NVIDIA GPUs, choose "CUDA" or "OptiX" as the Compute Device.
For AMD GPUs, choose "HIP" as the Compute Device
For Intel Xe GPUs, choose "oneAPI" as the Compute Device

Configure Blender:

Open Blender and go to "Edit" > "Preferences."
In the Preferences window, select the "System" tab.
Under the "Cycles Render Devices" section, choose your GPU as the Compute Device.

Make sure you have compatible GPU in your PC and updated drivers are installed


text:
hexagonal ball with internal structure
please tell me how you can get such a model

with the possibility of setting different sizes of hexagons and, accordingly, their number.
I've already figured out how to create a hexagonal sphere using a Tissue Addon and a grid modifier. The question is whether it is now possible to get a model as in the first figure. Inset faces leads to bad results (file *.blend https://drive.google.com/file/d/1fkA9pqOhGIKLMQMdFVtmHcSwSyt_HLNI/view?usp=share_link)

Maybe the Inset doesn't work for you because the tissue workflow might result in not-so-clean geometry. You could try this addon:

In Edit Mode, select all and hit I (Inset) and I again for Inset Individual Faces.

Then hit I again to inset another time, and with the last inset faces still selected, hit S to scale down:

For insetting individual faces, you don't need to set the Pivot Point to Individual Origins. And for scaling them later you need Median Point or else you could have simply inset them further. 2. Your method does work with symmetrical shapes that can be scaled down to a Median Point, with irregular shapes this will be problematic. There I would use a second insetting while holding Ctrl to create depth, then release Ctrl to change the inset size. Or later scale down, this time with Individual Origins.

Good point. I have removed the Individual Origins from my post. Also, you are right about the limited use when dealing with irregular shapes. Thanks for the hint with the inset depth (Ctrl) - Didn't know that one! ;-)

Yeah, I always think Inset is a very underrated tool :-)

Inset works as expected.

(Duplicate your mesh first.)
Merge by a small distance m. Make faces f.
Inset. (Make sure individual faces is turned ON.)
Inset again. (Hold Ctrl to extrude the faces inwards.)

Instead of extruding and shrink/fatten you could simply hit I again, hold Ctrl to move inwards, then release Ctrl to change the size.

Updated. Numbers of steps seems to stay the same, though.

This was more for general solutions, Shrink/Fatten might give problems with more irregular shapes. And by the way, when you merge by distance, the vertices are not all merged at their center, so the shape becomes a bit asymmetrical.


text:
The process of creating a complete character, including animation
I have a simple low poly 3d character.

I would like to use some method to add more polygons to the head area to create more detail to the head area (then sculpting modeling). Which network densification method should ideally be used, or why?

When I implement point 1. What is the next procedure? Unwrap, texture painting and rigging?

Thanks for any clarifications or tips

This is not really a tutorial site. You can add and then apply a subdivision surface modifier to increase the number of vertices, but if your character is a single object that will affect the whole model. As far as the rest of your question is concerned you should watch some basic modelling UV unwrapping and texture painting tutorials and the same with rigging. There are hundreds online including many YT videos.

Are the new details supposed to be part of the topology of the object or do you plan to bake them to the low-poly? In that case duplicate your object, apply a Subdivision Surface modifier to the copy and sculpt on it. But you don't give enough details here

Hi, I have a human figure, about 40,000 polygons. I would like to apply some modifier to the head, such as subdivision, which will thicken me in that area. I will use sculpting then to add more details on head. I will have a finished model. Subsequently, I would complete the unwrap, textures and add bones, animation to the character. Just a need a short answer to the question of whether and possibly what modifier I can add to the head. In the 3ds max its common workflow, I can thicken selected polygons and sculpt. Is this possible in a blender or do I have to separate the head from the body?


text:
Object emission only on illuminated side
I'm trying to simulate an image taken by a telescope of objects close to the moon. So far, I have managed to have the moon correctly illuminated, and using the lightpath node, it emits light without blowing the textures.

The problem now is the dark side of the moon is not very dark. To solve this problem and make the scene more realistic, I would like only the portion of the moon illuminated to emit light. Is there any way to basically create a mask of the illuminated portion to use it as a factor into the mix shader for the light emitted?

This was asked just today https://blender.stackexchange.com/questions/288377/is-there-a-way-to-change-emission-strength-based-on-the-amount-of-light-hitting and as been asked multiple times before already

https://blender.stackexchange.com/questions/86775/make-light-paths-only-pass-through-non-emitted-areas/ https://blender.stackexchange.com/questions/116394/how-to-make-texture-appear-only-in-dark-spots https://blender.stackexchange.com/questions/167948/is-it-possible-to-have-a-node-value-correspond-to-how-much-light-is-hitting-that https://blender.stackexchange.com/questions/166465/how-to-achieve-dynamic-lightning-for-day-night-earth-planet https://blender.stackexchange.com/questions/5845/how-can-i-mix-two-materials-based-on-incoming-light


text:
Realistic material for Moon landscape
I'm trying to create a realistic material for my moon landscape  The real image has a lot more details, but I'm interested in the white areas exposed to sunlight. I would like this to be a property of the material so that I can use it with different illuminations. How can I overexpose only the areas with normals close to the directions of the light rays?

You should be able to find real images with corresponding height maps online. NASA's website probably has loads of material on this in high resolution. So you get albedo and displacement maps and that's pretty much it. You can probably get away with a diffuse shader. The misunderstanding about lighting being a property of material will probably have to go though. Not really sure what you could possibly be struggling with here. Maybe providing the context would help.

The white areas around craters are recently exposed material which hasn't darken yet. Some craters are young (bright), some are older (dark). If you want to go for a realistic look, it would be easier to use NASA color maps and height maps as Martynas Žiemys said. Otherwise, you'd have to build a somewhat complex shader to reproduce these colors. Depends on your needs.

I have the height maps and the real images. The issue is that those images are taken at precise illumination conditions. I was wondering if it was possible to have an effect similar to the real images (the white areas exposed to the sunlight) with a dynamic illumination.

Color maps aren't "at precise illumination conditions", they represent the color with a perfectly homogenous lighting. Just the color of the surface https://svs.gsfc.nasa.gov/4720. If you are using photos with a specific lighting, you're basically screwed.

Indeed, it is what I'm using. I want to use high-resolution images for my model. Those are available only with the LROC's NAC (narrow-angle camera). Unfortunately, I don't think they have done many passages in the same areas; therefore, the images are in a specific illumination condition. I tried to use the WAC color map for the whole moon, but the details are not great for areas that are only a few km wide.


text:
How to change the action being shown on 3D viewport?
I would like some help with the actions being shown on the 3D viewport window.
I imported a character from a different software, and I also imported several animations (.fbx) that I saved using different actions for each animation. However, even If I change the selected action in the Action Editor, the 3D viewport window will not show the action I am currently selecting. Is there a way to change the action shown on the viewport ?

Actions have to be applied on the proper object: the armature.
Probably you're applying the action to the mesh, while you should select the armature and then choose an action from the action editor dropdown menu.
In this way the action in the 3D view will reflect the choosen action, unless there is some NLA strip that overrides it. So check your NLA editor also, and eventually delete/disable all action strips in NLA.

Thank you very much for the fast answer ! I'll try this.

It worked ! Thank you so much :D

If useful, please mark the answer as "accepted".


text:
Why does Blender crash when I use the Subdivision Modifier?

I apply the subdivision modifier to one section (The Selected Handle) and Blender instantly crashes upon applying it. Is it my computer specs or a problem with blender itself?

It's difficult to be certain without knowing more (e.g., you might upload your .blend file), but 8 GB is not an especially large amount of RAM, and the subdivision modifier increases the number of vertices (etc) exponentially (something like a factor of 4 increase per subdivision level, but this depends on the object's geometry). So, my naive guess would be you are running out of RAM.
You can also inspect the crash log to try to determine why Blender crashed: https://docs.blender.org/manual/en/latest/troubleshooting/crash.html Or, for similar information, can start Blender from command line

I found out that I was using GPU subdivision, turned it off and that completely solved the problem.

Mike, consider copy/paste your comment into the Answer below, so that this becomes an answered reference posting.

I found out that I was using GPU subdivision, turned it off and that completely solved the problem.

Turn off GPU Subdivision in Preferences > Viewport > Subdivision. In case you were as clueless as I was about where to get the GPU subdivision.
Got it from This question.


text:
How to create Fabric texture?
How to create this kind of texture in blender?

Here's a procedural hexagonal weave.
There may be a more economical approach, but this seems to perform well enough. It starts with a single spoke:

.. which is a mapping of the dot-product of (1,0,0) in the texture-space, masked to Y > 0. That's grouped and used at three rotations in a higher-level group: 'Spokes':

and is also diminished by distance from (0,0,0)
That texture can be mapped using a tiled hexagonal UV space, as explained here. Three overlapping offset tilings are overlaid selecting the Maximum height at each point:

.. all grouped up into a hexagonal weave, and used to generate a bump/displacement map:

The offsets of the tilings are more 'weave like' if they are not mathematically exact, so they are left to be set by hand.
The combination gives variations on this result:

this is exactly what I am looking for. thanks, bro

@UNIQUE MASTER in that case mark it as the good answer   ;)

You can make these knots with the Add Curve: Extra Objects addon then bake the normals in order to fake the 3D relief (it's better to fake the 3D wit a normal map because a whole mesh of this kind will be rather heavy).
First create a plane, subdivide it a bit:

Create a Curve > Knots > Celtic Links:

Change the parameters to get the shape you want:

It's very helpful. thanks, bro

@UNIQUEMASTER If this answer helped you, you can give it an upvote or accept it, so others can find it easily. =)


text:
grass particle system spinning
I have been working on a project , I used a grass model , and I wanted the grass particle to react to the turbulence and the wind force , so I can make a realistic grass wind , but the grass , but some of the particles are spinning around which is very ugly I basically tried everything and searched the internet did not find this specific issue , I would really love to know how to fix the issue to make at least a realistic grass , very thanks in advance

you misunderstood the behaviour of the particle system.
This

is your particle.
But this is one object and has one pivot point, which Blender then tries to bend and rotate.
And of course this looks not that good.
If you delete (or separate and use collection) all except one blade of grass and move it so that the origin is at the bottom, apply scale and rotation, you will get:

I changed of course the number of particles, children, adapted the forces and animation.
Here the adapted file:
https://www.dropbox.com/scl/fi/03wjp6p8dg3x71fgvnh2x/particle-system-1.blend?rlkey=2ooiay9gy8oskwtlrq6zziybr&dl=0

that is actually a very good info , thank you for that


text:
cloth simulation with wind
so I have been working on cloth simulator added with wind , I m trying to play with the setting , basically I wanted the coat object to interact with the wind but whenever I do this the coat just split with many pieces? Is there anyway to make it stand still and only effected by the wind without splitting into pieces? thanks in advance

Hello could you please share your file? https://blend-exchange.com/

sorry for the late reply , here is the link to my file

I can't see the coat that you show in your image, there's a dress but you didn't give it a Cloth simulation, are you sure that this is the good file?

im really sorry my friend that was an accident file my bad here it is https://drive.google.com/file/d/1V3WoGcjDal18M2htRznHVcgnPaB7z51s/view?usp=sharing

No problem but this time your link asks for an authorization   ;)

a bit noob when it comes to one drive , its all done now , thanks in advance mate

It looks like you have plenty of overlapping vertices, select all and press M > Merge by Distance. Also in the Physics > Cloth panel, under Collisions enable Self Collisions. You may also want to simplify the topology, press AltJ to untriangulate then CtrlE > Un-Subdivide (the topology is still not perfect though).


text:
I wanted the object to follow the character model
hey all I was trying to add a needle on the character's hand so it can follow where he is going , I tried many methods like add an empty and keep transform but its not following the hand it keeps still stand, the character is walking forward I just wanted the syrinnge to seem like he is holding it and walking , its kind of hard process I dont know why I have A hard time figuring it out , I can upload a gifs but I dont know how to actually do it so this an  image , or I can upload my blend if you ask for more details , thanks all

give it a Child Of constraint with the hand bone as target?

so basically I tried it, but the problem is i put the armature as a target but still not following , or should i try the bone hand itself? I reckon  i need to go to pose mode and find the hand bone ? still confused sorry I probably what exactly to do

yes the target needs to be the hand bone

my life saver , you are the best moonboots , always here helpful and give best tips , best regard

Give a Child Of constraint to your needle object, with the hand bone as Target:

If the character needs to drop the needle, I recommend the Dynamic Parent addon, by Roman Volodin, it makes things easier.


text:
face rig for my character model
Greeting everyone , I have a similar question I asked here with this topic but just different model and different idea
so here is my character model I created , first I want to animate the face rig , but this is a bear character kind of , so I want to rig the eyes the face the nose everything , does the face rig work? even though its a human rig not like an animal rig , and I could not find a good meta rig in the option , and My main question here is , I want to animate the blink eye , which is I never tried it before , there is a video I was watching : https://www.youtube.com/watch?v=X1cY7Dr_ly4&ab_channel=MoazzamShah
my bear character his eyes are big outside his his face but that is what I wanted to be , its more like a cartoonish character or a pixar character etc , and every time I follow tutorial my body mesh is passing the eyes inside of it , there is no way I can make it outside , it just mess it up
is there  away to make it better? thanks in advance, I Will upload the blend file as if its hard to see the character in a picture

It seems to be doable with your current topology, just make sure that the eye lid comes forwards enough so that it doesn't go behind the eye globe:

Topology of the second shapekey (use the Proportional Editing and enable its Connected Only option):

thank you for the help mate , appreciate it atleast worked but the bad news is , its my self i dont know why i have a hard time doing it , i tried the top eye top one and went to 3d cursor and tried it but didnt know exactly how to put it down , seems a bit hard or im not doing it properly , i am sorry im pretty bad with rigging as if i didnt try it much before , maybe like more detailed if u dont mind , thank you mate in anyway

Hello, a bit hard to explain in details but if you can join this Discord I can try: https://discord.gg/E6wXbR7A5S


text:
Script to output vertex coordinates and triangles
I was wondering if anyone could help me. I'm hoping to come up with a simple Python script that exports data from an object in a scene.
I've written a little 3d renderer for fun, and my project relies on me manually setting vertices and triangles in script to set up objects. It would be a lot easier if I could just copy and paste from the python console into my script.
So far I've come across this script:
import bpy

current_obj = bpy.context.active_object

print("="*40) # printing marker
for face in current_obj.data.polygons:
    verts_in_face = face.vertices[:]
    print("face index", face.index)
    print("normal", face.normal)
    for vert in verts_in_face:
        local_point = current_obj.data.vertices[vert].co
        world_point = current_obj.matrix_world * local_point
        print("vert", vert, " vert co", world_point)

However this outputs the vertices in no particular order, and in the format
face index 4
normal <Vector (0.0000, -1.0000, 0.0000)>
vert 8  vert co <Vector (0.0000, -0.0000, -3.0000)>

I'd really like to get it in a format like this:
vertices[0].SetVertex (-1.0, -1.0, -3.0); //vertex coordinates
vertices[1].SetVertex (1.0, -1.0, -3.0);
vertices[2].SetVertex (1.0, 1.0, -3.0);

and
mesh[0].SetTriangle (0, 3, 2); //vertex indices

It would make copy/pasting into my script a lot easier.
Is this possible? Can anyone help me? I've never used Python before and I don't know too much about Blender.

current_obj.data.vertices contains all the vertices of the object. You can read these before you loop over the faces. As you already got the vertex indices of the faces, all is left to do is using the desired format string for your output.
import bpy

current_obj = bpy.context.active_object
verts_local = [v.co for v in current_obj.data.vertices.values()]
verts_world = [current_obj.matrix_world * v_local for v_local in verts_local]

print("="*40) # printing marker

for i, vert in enumerate(verts_world):
    print("vertices[{i}].SetVertex ({v[0]}, {v[1]}, {v[2]});".format(i=i, v=vert))

for i, face in enumerate(current_obj.data.polygons):
    verts_indices = face.vertices[:]
    print("mesh[{i}].SetTriangle {v_i};".format(i=i, v_i=verts_indices))

This will generate output like below. But it does not check whether the faces are really triangles and will call for the creation of “triangles” with four or more vertices if your object does contain quads etc.
========================================
vertices[0].SetVertex (0.0, 1.0, -1.0);
vertices[1].SetVertex (0.8660253882408142, -0.5000000596046448, -1.0);
vertices[2].SetVertex (0.0, 0.0, 1.0);
vertices[3].SetVertex (-0.866025447845459, -0.49999991059303284, -1.0);
mesh[0].SetTriangle (0, 2, 1);
mesh[1].SetTriangle (1, 2, 3);
mesh[2].SetTriangle (3, 2, 0);
mesh[3].SetTriangle (0, 1, 3);

If you want to differentiate between triangles, quads and so on then you might want to differentiate the format string based on the length of the vertex list.
N.B.: In my version of Blender, by default the text in the systems console can't be copied. I copied the text above from a text file that was generated by writing the output to a file instead of printing it to the console. Another option could be to start blender from a terminal from which you can copy text.

Thanks man, that's brilliant! Very helpful, you're a legend. One more thing though, is it possible to truncate the vertices to something like 5 decimal places?

Yes, precision, alignment and similar things can be specified in the format string. E.g. {v[0]:.5} instead of {v[0]} will display up to five decimals. The web page PyFormat.info has a good overview of the Python format string options.

I am getting the following error Element-wise multiplication: not supported between 'Matrix' and 'Vector' types on verts_world  =


text:
Generating blue normal map channel from red and green channels
I have a normal map texture where the blue channel is used to store some other map of information since it is normally used in a program which calculates the blue channel from the red and green channel automatically. Now I want to use that same texture in Blender and figured it shouldn't be too hard to do the math in the node editor so it jus works regardless of which normal map I use. However, it doesn't seem to work. The result I get has shading issues quite similar to how it looks without any information in the blue channel. This is despite me having found the formula and I believe created it accurately in the node editor. Does anyone have any idea why this wouldn't create the desired results?
The formula I found to generate the blue channel is "B = sqrt(1 - ((R * R) + (G * G)))"

Blender uses OpenGL format for normal maps. Maybe you need to invert the green channel?

Also... the texture node should be set to use Linear or Non-Color Color Space.

In case somebody wonders why you can drop the blue channel: If it's a tangent space normal map it only stores vectors in the hemisphere with a positive Z component. Since we also know that it's a unit vector, we can retrieve the Z component by subtracting the squared components of X and Y from 1, because we know the unit vector has a magnitude of 1. sqrt(X^2+Y^2+Z^2)=1 can be transformed to Z=sqrt(1-X^2+Y^2). This trick doesn't work for object space normals because they store the full unit sphere. That's the point I missed when I wrote my answer late at night :)

Thanks for the suggestions guys. I changed the color space to Non-Color which changed the result a bit but still doesn't look how it should. The engine these normal maps are used in is OpenGL so shouldn't have to invert the green channel. I tried anyway but didn't fix it.

I managed to generate the Z channel in the normal map according to this scheme (taken from UE4). In the "normal" texture, everything is as usual, only the Blue channel, replaced by roughness.


text:
Editing the normal direction to be parallel with the face.
So I am looking to change the normal direction from being 90° on the face to just kind of lay flat on the face. Is that possible to achieve in Blender? Or are there any addons that will help with this?

May I ask why you want to do that? It is just that blender calculates its normals. They are not something that can easily be modified.

If you want to modify specific normals of specific faces of a mesh, the only way I know of is the "Normal Edit" modifier.
Basically you create a vertex group, containing all the faces you want the normals changed of. Then add the Normal Edit modifier, choose Directional, select the vertex group and pick a target object. After that all normals of all faces of the selected vertex group will point in the direction of the center of the target object. If you want the normals be parallel, select Parallel Normals in the modifier.

Hmmm, when I enter edit mode to see the normal as shown by a line coming out of the face it just stays at a 90° angle from the face regardless of what I do.


text:
Is there a way to select the lines between two verts?
So I have recently been working with objects made with photogrammetry that I need to UV Unwrap. For that, I want to mark the seams of course but I find it very hard to select the lines I want to mark as seams because the mesh is triangulated. If I could just select two vertices and then the shotest way between those points that would be super useful. If not then what other methods would you suggest to UV unwrapping such a mesh?

See https://blender.stackexchange.com/questions/36047/is-there-a-way-to-choose-a-beginning-and-ending-edge-and-auto-select-all-the-edg

In edit mode:

Select first vertex.
Press Ctrl+Shift and select last vertex.

Ctrl+select is enough. Ctrl+Shift+Select does something different

Ctrl-Shift fills the region between the vertices. Ctrl selects the shortest path, with various options.


text:
Only Keeping a single frame of Smoke Simulation
I have a smoke simulation that I want to render and the frame I want to render is around the middle of the whole sequence. Since I'm going to upload this on a render farm, I must keep the cache size minimal. But the whole bake takes about 4GB of space. Is there a way to bake the whole simulation (because otherwise it doesn't work) and then keep only a few frames of cache?

New user here but I think you just need to find the simulation files (look for dir with prefix like "blendcache") and upload only those named with the frame number you want to render. For example, 43756265_000034_00.bphys is for frame 34. (I know this same idea works for fluid simulations...I thought it worked for smoke as well...but given the lack of answers here maybe I'm out of my depth.)


text:
trying to add bones to my character model but its too laggy
hey everyone so I am trying to add bones to my character model , but when I try to press ctrl j to join all all together it just wont work , it will freeze and than crash , I Might add my character to mixamo so it can automatically add bones , but unfortunately Its just I cant export it , maybe its just too much veritcies , I will add a blend file because Its better details , thank you in advance

You have all the subdiv modifier viewport levels set to 4 which is far too high while the render levels are set to 2. If you reduce them all to 2 you'll get rid of any lag. Not had time to look at the rest of the model yet, but that might be why joining your model is crashing Blender. - You'll also need to convert all your Bezier curves to meshes before joining them.

i actually did it and it worked thank you actually , if u can see my last comment below , i could get a help also , thank you

See my edited comment.

yeah i did thank you , but how do export it to mixamo with colors ? sometimes i do this but exported without colors just white

Assuming you're exporting in fbx file format, see https://blender.stackexchange.com/questions/57531/fbx-export-why-there-are-no-materials-or-textures

Different modifiers are assigned to different parts of this model. If you want to merge the model into one object you will need to apply these modifiers first.

thank you so much it worked , last question if i wanna export it do mixamo , what option should i pick to make the colors appear in the mixamo , thank you


text:
building destruction slow motion
is there a way to make the building destruction go slow motion on a specific frame? I have a project that I wanted to make the building destruction normal at first but at frame 8 , go slow motion? thank you
also I want the pieces to go all together not only one piece as I don't know how to make all pieces slow motion together , best regard

unfortunately I cant really add the blend file here , as its too large

You can animate the the Speed property of the Rigid Body World:


text:
accidently applied mirror modifier
hi all so I have been working on a character here , I used mirror modifier , after a while I accidently applied the mirror modifier on the character , I did not want to apply it , because I Also Want to rig the character , without the mirror modifier I don t think IM  Able to use x y z for the rig? is there a way so I can Redo it Manually ? thanks in advance

You can delete half of the mesh and give it back the Mirror modifier, but what you mean with the XYZ for the rig?

sorry didnt explain much , i meant when you  rig a character you cant use the X axis so you can disable for example the other left hand bone , so i can use 1 bone not the other basically a mirror

the mesh and the armature are 2 different things, you'll be able to use the symmetrize option of your armature even if the mesh has its mirror applied if this is your question

ohh okay thank you moonboots always helpful for the tips , as  im actually still new at rigging , best regard

The mesh and the armature are 2 different things, you'll be able to use the symmetrize option of your armature even if the mesh has its mirror applied.


text:
uv mapping opposite way
hey all so I have a normal texture written a name on it 'MARIA* when I UV project from view , the texture on the mesh is fine but the letters are the opposite way as you can see in the picture? how can I make letters as normal ? thanks In Advance

In the UV Editor, select the UV faces that display the logo and reverse them (SX-1).


text:
armature keyframe timeline?
hey all a quick question here , so I have this armature (object mode ) which is already animated as keyframes , when I go to pose mode to animate every bone , the keyframe of the object mode are in the timeline with the pose mode keyframe? I m just confused , and how to make every bone or armature have a keyframe on it own ?
best regard

If you open the Dope Sheet and activate the Only Show Selected option, you'll only see the keyframes of the selected bone(s). Note that in the same action you'll also see the keyframe of the armature object as well if you've keyframed it. If you've keyframed the armature object (in Object mode) as well as its bones (in Pose mode), both these keyframes will be part of the same action. That's why it may be better to parent your object to an empty, this way you'll keyframe the empty, not the armature object itself.


text:
rig armature not working properly
I had a recent same project I was doing here , but I'm gonna get to the point here , I tried To rig my character as everything works fine , when I move the head , the does not move with the head , it just stand or bugged inside the head , as I'm figuring out how I can manage to do it , everything are joined together
blend

Separate meshes (like here eyes and cheeks) often get not correctly parented, to fix that you can select them in Edit mode and assign to the head bone (called spine.006):

That said it won't be perfect because you have 2 bones for the neck that influence the head so the eyes and cheeks won't correctly stick at a certain rotation angle of spine.006, if you don't need these bones you should remove them, parent spine.006 to spine.003, reparent the mesh to the armature.


text:
How to use linked objects in boolean modifiers
I have tried linking objects programmatically using the guide found here. This works great also when manipulating objects w.r.t position/pose. When I try to use linked assets in boolean modifiers, it does not work however.
In particular, the modifier gets applied at the original location/pose of the linked object, not at the new position I have put it. Using apply transform does not work, as it will only force-place the asset back to its original position, loosing the  transform.
Is this bug or feature?
How can I use linked assets in boolean modifiers with the proper position/pose?


text:
How can I generate occlusion effects in meshes
I have meshes representing complicated fields of views of observers (positioned at local origin of the mesh). I would like to calculate new meshes that take into account occlusions inside the fields of view meshes.
I have implemented something that kind of works using a combination of constraints and boolean modifiers:

this solution scales badly to more complicated geometries, is buggy (inherited from the boolean modifier).
Is there a way to do this in a better way? in particular, I am thinking of geometry nodes and mesh-to-volumetric based logic.

Hello. Iv'e explored something like that some time ago. You can read about it there https://wiki.osarch.org/index.php?title=Visualize_a_Line_of_Sight_in_Blender it's a technique used in video games to draw line of sight effects. It has its limitations but it should be pretty fast to generate. Would it be a good solution for you ?

@Gorgious .. wish I could UV that! Nice presentation.

@Gorgious. At first glance, it looks perfect! Thanks. Feel free to put up an answer.

have looked at the solution by @Gorgious in more detail. Its pretty straightforward, but its accuracy is tied to number of vertices used in the FOV mesh. My current solution does not have this drawback. Shouldnt there be a solution where mesh edges on the occluders can be cast towards the view point? this could be the basis of an accurate solution, not dependent on the resolution of the FOV mesh?

how about something like: 1) uniformly scale up all occluders around their centre of mass by 0.1% per unit distance to centre of view .2) project all the visible vertices of all the occluders to a low res ico sphere. 3) scale back the occluders to original size 4) remesh the sphere, so that those points are part of the mesh with same connectivity as on their original object (thus projecting the geometrical edges) 5) apply the geometry node that @Gorgious posted (but with this dynamic, ad hoc remeshed sphere).  Would that provide full accuracy, but with low-poly mesh?

as a first step, will add a simple subdivision modifier to my low polys, and then remove redundant vertices after. This will likely give pretty high accuracy as a good stand-in solution.


text:
Matplotlib python import broken
In current release of Blender, 4.2.2 windows, I can no longer use matplotlib, after having sucesfully pip installed it with.
$BLENDER_PYTHON_BIN -m pip install matplotlib

When trying to import it in the scripting tab with
import matplotlib

I get the following error:
ModuleNotFoundError: No module named 'PIL'
I tracked this error from the alpha release as well, when the same issue was present, except the error was then:
ModuleNotFoundError: No module named 'Matplotlib'
When I start up the embedded python interpreter, I can import and use Matplotlib without fault, so it is installed and working in the environment.
It seems that some special hack has been done when starting up the interpreter from within blender. My guess is that this is done so as to block modules that devs have found troublesome with the rest of Blender. Matplotlib and Pillow libs certainly fit in this category. I am only speculating at this point to what the reason for this error is, have found no documentation of this change from 4.1 -> 4.2.
Previously, I could easily include a large code base in my script. This code-base makes use of matplotlib, but the addon I create never uses matplotlib to create dynamic figures, or even the Agg backend to dump files on disk. There is a workaround to get Matplotlib to work perfectly fine with the existing code: namely to install also the Tornado webserver, and use the WebAgg backend. I have used this for years now without any issue on various systems/oses without fault. Now however, my large addon is broken since I cannot import matplotlib.
Since 4.2 is the LTS version, this is quite the deal-breaker for us, and I wonder if there is any workaround?
It is not possible for me to modify the large code-base with a check for every import of matplotlib, and check if it is running in blender.

Hello, are you certain the module is installed in the Blender python environment ? https://blender.stackexchange.com/questions/5287/using-3rd-party-python-modules


text:
Force scientific notation in Blender GUI
I have an addon in development, and create various meshes in it. I have several physically based parameters, that are often extremely small, but make sense in the context they are. I have in my GUI class, for example:
poly_0: FloatProperty(
        name="POLY_0",
        description="Some description...",
        default=1.26587922531743e-16,
        min=-1000.0,
        max=+1000.0,
        )

In the GUI, I would like to force this Float member to always be displayed in scientific notation, and always with some set precision (number of digits). Looking in the API docs, I cant seem to find this option.

AFAIK setting the precision argument to 6 (max) is the only thing you can do...

@brockmann, very valuable information. I thought the precision of FloatProperty was per default 64bit, as with python floats. When you wrote 6 as display-preciscion max, I looked up the documentation. It does state that it is single precision link. This puts my addon development in trouble. I am going to ask a new question about this instead

Make a Scientific Notation Property Group.
As a workaround could set up a property group to handle scientific notation. Restricted to the significant digits of the float property, but allows to set the the power.
Here I've used a generic python property with getter and setter. can do same with bpy.props. properties and expose to the UI.
import bpy
from bpy.props import FloatProperty, IntProperty, PointerProperty
from bpy.types import PropertyGroup
from math import pow, log10, floor

class ScientificNotation(PropertyGroup):

    def set_num(self, value):
        self.power = floor(log10(abs(value)))
        self.number = value / pow(10, self.power)

    def get_num(self):
        return self.number *  pow(10, self.power)
    number : FloatProperty(min=-10, max=10)
    power : IntProperty()
    value = property(get_num, set_num)

bpy.utils.register_class(ScientificNotation)
bpy.types.Scene.foo = PointerProperty(type=ScientificNotation)

Layout with both number and power to set. Use the value property in calculation.  Could use a string property for the number, to get more sig digits.

Example of use in python console.
>>> C.scene.foo.number = 6.62607004
>>> C.scene.foo.power = -34
>>> C.scene.foo.value
6.626070022583007e-34

>>> C.scene.foo.value = -344233.44e-44
>>> C.scene.foo.value
-3.442334413528442e-39

>>> C.scene.foo.number
-3.4423344135284424

>>> C.scene.foo.power
-39

Can add pythonic methods as well, eg repr or str
class ScientificNotation(PropertyGroup):
    def __repr__(self):
        return f"{self.value :6e}"

to
>>> C.scene.foo
3.442334e-39

See also  https://blender.stackexchange.com/a/134310/15543

is there a way to have multiple instances of the ScientificNotation class in a menu? Right now I'm having to specify separate classes, as otherwise the value from one shows up as the suggested for another in a different part of the menu. Is there some kind of PropertyGroup collection I could use to avoid that pattern?


text:
Triangles Appear in Texture After Sculpting
I'm applying a texture based on this video; it works well. The textured grid and its wireframe is shown:

This is fine. I'd like to do a little sculpting on the grid. The simplest way to show the problem that arises is to just enter the Sculpting screen, activate Dyntopo and smooth shading, then go back to layout and render again - without doing any actual sculpting. This triangulates the grid and when rendered the triangulation is visible (note: scale of render and wireframe is slightly different, but rendered triangles match wireframe subdivision):

I've tried a variety of clean up: everything available in the Edit->Mesh menu, especially things related to normals; tris to quads; removing and replacing the texture on the grid; rebuilding and reapplying the texture node by node; changing the angle of view and the angle of the grid; tweaking the texture settings. Nothing I've tried gets rid of this pattern.
Note: this is a completely procedural pattern, no images are involved; the node tree is shown below. Also, this is the simplest example I could concoct; actually sculpting something produces the same problem. There is also a subdivision surface modifier applied, and "Displacement and Bump" is selected.
Any thoughts on how to fix this?

If you want quads, you'd have to turn off dyntopo. "Dyntopo is a live tesselation depending on brush settings for topology." from https://blender.stackexchange.com/a/135841/31447, manual link: https://docs.blender.org/manual/en/latest/sculpt_paint/sculpting/tool_settings/dyntopo.html

I don't specifically want quads; I ran tris to quads in an effort to fix this problem. Note that the problem remains whether left as triangles or converted to quads. The example shown hasn't been converted to quads, although doing so doesn't produce any change to the triangular patterning shown.


text:
Slow Rendering 4K Images, Fast When 2K Done First
I have a fairly large scene I'm rendering with Cycles in Blender 3.4.1. If I render at 2K all is well - it takes about 15 seconds per frame. If I then switch to 4K, it takes about 60 seconds per frame, exactly as I would expect.
If I shut down and restart Blender and begin with a 4K render, it is enormously slow, taking about 15 minutes per frame. For some reason, the running the lower resolution first seems to cache some settings and speed up the higher resolution rendering that follows, while trying to do the higher resolution initially bogs the system down to the point of being unusable.
What's going on here?

If you have persistent data turned on, that could explain it.


text:
I don't know why my 3D object has been cropped on default shading view (the right window), anyone can figure it out?
I don't know why my 3D object has been cropped on default shading view (the right window), I have a really strange thing happening right now - I'm sure there's a reason for it, I really want to figure out a way to fix it.

it's Clipping Border, see here: https://blender.stackexchange.com/questions/18783/gray-cone-obscuring-clipping-the-3d-viewport

It looks like you accidentally enabled clipping region.

Also I can see your camera clipping start distance is set to 4.6 meters, and by the scale of things in your scene this distance seems too big.
You can change the camera clipping settings by going into the camera properties tab and checking the clip start distance.

Just so you know, if you want to change the viewport clipping (and is not in active camera view), go into the "view" tab and see if the clipping start distance is set to a high value. (the viewport clipping settings can be different than the camera clipping settings).

Thanks you Alexandre, I fixed the problem. I am a beginner on Blender, thanks for your recommendation ;)


text:
After render, some objects turn to basic mesh
When I render, one collection of objects remains/reverts to basic shape.
I've tried the toggling enable render, checking cycles settings but no luck.
I am a beginner at blender and never came across this before. I did earnestly try to search if anyone else came across this, but always came up with people not seeing their rendered object.
What have i checked/unchecked that caused this for the render output?

There is cylinder in your scene that is hidden from preview but not from render:

Delete that last Cylinder or click on that camera button at the right side to hide it from render and you will be okay

Thanks for the immediate reply. The problem was carelessness and not paying attention. Thanks again for your time and the lesson provided.

@Jeffri: If Miko's answer helped you, please check the checkmark left to his answer


text:
Set keyframes and change origin problem
I want to build this simple animation without switching to different collections.
https://youtu.be/OXWZ6dNqdLc
From frame 1 - 30 change origin, rotate then set keyframe locrot
go to frame 60 change origin rotate then set keyframe locrot
oooh ... frame 1-30 is ruined ... ahhh
Try it and this drives you mad.
There is a better way to do this ?

why don't you do that with bones?

You can create a hierarchy with parenting the objects to each other, you don't have to use collections.

Meanwhile I tried with empties but get weird spin. With bones it worked well. Hierarchy of parented objects ? I dont know how to do.

I tried it with parented objects in hierarchy and yes it worked too. Thx very much !


text:
Looping Hue Animate
I'm using cycles and have a texture that I want to animate by changing the hue so that it cycles through the rainbow. I know how to make keyframes of nodes, however I'm not sure how to make it seamless when the hue slider operates on a 0-1 scale. Would it just be a matter of changing the animation curves??

You can use a Maths node set to 'Modulo' to convert an input value into a repeating range; the output will vary between 0 and the value set on the second input. For example, with the following nodes :

Varying the 'Value' will produce Hue that varies between 0 and 1, then restarts back at 0. This will produce a continuous repeating range of hues as Value increases from 0 upwards (simply keyframe Value from 0 to, say, 5 to result in 5 repetitions of the range of hues : 0.0->1.0, 0.0->1.0, 0.0->1.0, 0.0->1.0, 0.0->1.0).

As @RobinBetts pointed out, using the Modulo function can cause strange effects then using negative values as the Blender 'Modulo' function (as is the same for many programming languages) flips the output for negative input values. To correct this we can add a couple of additional Maths nodes :
For example, here's the usual output from the Modulo function :

Notice how the output flips in the centre as it crosses zero.
Adding Maths nodes to Add the Value, followed by a second Modulo corrects for this - by effectively shifting all values that are less than zero back to being positive :

I was trying this earlier this evening, and it seems to raise an anomaly, crossing zero. In Python, -0.3 mod 1 ==  0.7 mod 1, so you get a sawtooth, continuous down the number line. I doesn't seem to be so with the modulo math node? The results of -.3 and .7 are different?  I think in the node, the sawtooth reflects about / rounds towards 0, where Python rounds toward -infinity. .. see here

@RobinBetts It seems that this is implementation dependent - so different programming languages can potentially produce different results. The Python result that you mention follows the strict mathematical definition of negative module - ie, it's always positive and follows the same 'pattern' as for the positive side of zero. Some languages (eg, JavaScript, C) produce negative results for negative values - effectively (-x) mod y is equivalent to  -(x mod y).

So in order to avoid  ..(1,0),(1,0).(1,0),(0,1),(0,1)..  @Toadhands  has to  stay one side of 0, I think...

@RobinBetts Yes - staying to positives would certainly avoid the problem. I presume from the question that won't be a problem since it's just some arbitrary value that's being animated. However, by adding a couple of additional maths nodes you can avoid the problem of negatives - see edit.

Cunning. I spent quite a time trying to figure out how to fix this in a snappy way...... I thought it probably wouldn't take you long.... Glad I didn't put my clumsy solution up :D... also quite important for procedural textures, etc.

Thanks. Yes - very useful when using Object coordinates that can go negative. It’s something that’s caught me out in the past. Until you pointed it out I didn’t realise so many programming languages did it differently.

Rich, I reconstructed your nodes and played with settings. I got 15 different (very interesting) results as posted in Facebook group. I did over 10 more patterns before that. https://www.facebook.com/groups/Blender.Nodes/?multi_permalinks=2714073138633740&notif_id=1559358625505001&notif_t=feedback_reaction_generic

@Rich, All this time later, I ran into a hitch with your node implementation of  positive saw-tooth modulo. Because of the way the native modulo node  handles division by zero, 0 mod x is evaluated as -x, outside the [0.0 , x) range. Now floor is available, probably better to use x - (y * floor(x/y))

Hi @RobinBetts - well spotted... that's a really interesting case.... and it actually explains some behaviour I've seen (but not understood) with some of my shaders when using Generated coordinates for some sides of the default cube (since they start at zero). I think your suggestion could work... but I'd be a bit concerned about the divide by 'y' - what happens as it approaches zero...? Could be rounding or precision errors. I think the original Modulo behaviour is definitely a bug since it's inconsistent at x=0 and think it's probably worth reporting. Shall I submit a bug or do you want to?

@RobinBetts I’ll raise it - it looks quite convincing to me. As an example, consider 0.00001 mod 10, -0.00001 mod 10, 0 mod 10 - all values very close to each other. Using the Node implementation you’ll get results of 0.00001 for the first, -0.00001 for the second and -10 for the third - wildly different but they should actually all be very close.

I’ve put together an example that visualises it quite convincingly (I’ll update the answer when I get chance).

My demo, stripped down. Blend file  here.

Thanks @RobinBetts. I've raised this as a bug at https://developer.blender.org/T69978, including an image that shows the discrepancy at x=0 quite clearly.

Excellent description. Yup, following that, it's a bug.

@RobinBetts Looks like the issue has already been resolved in Blender 2.81 - so it appears it was a long outstanding bug that's now fixed.

Okydoky, case closed. Apologies for taking us up a dead-end.. but we weren't to know....

@RobinBetts Thanks for pointing it out - and at least it prompted me to install the latest 2.81 :-) Looks like it’s a bug that’s been there for a long time so it’s good it’s resolved now.