text:
Trying to change directory and read data file in Python
I would like to write a script that can change the directory, have the user browse for a file and then read the data from the file.  I am trying to use os.chdir to change the directory, ImportHelper to browse for the file and then read the data file.  The problem is that the os.chdir does not seem to work at all.  There is no error message, and the file browser window opens with the directory of the blend file I started with.
I can browse for the file using ImportHelper and my example program reads the data.  However, in my larger code, I would like to read the data in the same operator after I open the file.  In this example, TestReadFile works, but when I put the same operator in my larger Addon, the name of the file prints in the system console, but the first line of the file does not and I do not see any error messages.  I got around this issue by using one button to get the filename and another button to read the data, but I would prefer to do it all in one operator.
I started with an example I found online.  Here is my code:
bl_info = {
    "name": "File Read Test",
    "author": "Your Name Here",
    "version": (1, 0),
    "blender": (2, 80, 0),
    "location": "File -- Export",
    "description": "Tests opening and reading a file",
    "warning": "",
    "doc_url": "",
    "category": "Add Mesh",
}

import bpy
from bpy_extras.io_utils import ExportHelper,ImportHelper
from bpy.types import Operator
import os

class OT_TestOpenFilebrowser(Operator, ImportHelper):
    """Select a file with data to create a shape"""
    bl_idname = "myops.open_filebrowser"
    bl_label = "Open the file browser (yay)"

    def execute(self, context):
        os.chdir(r"C:\Users\username\Downloads")
        filename, extension = os.path.splitext(self.filepath)
        print('Selected file:', filename,extension)
        return {'FINISHED'}

class OT_TestReadFile(Operator, ImportHelper):
    """Select a file with data to create a shape"""
    bl_idname = "myops.read_file"
    bl_label = "Read the first line from the file"

    def execute(self, context):
        os.chdir(r"C:\Users\Shari\Downloads")
        filename, extension = os.path.splitext(self.filepath)
        print('Selected file:', filename,extension)
        f=open(self.filepath,"r")
        datadesc=f.readline()  #first line is type of file
        print(datadesc)
        return {'FINISHED'}

# Only needed if you want to add into a dynamic menu
def menu_func_export(self, context):
    self.layout.operator("myops.open_filebrowser", text="Test Open File")
    self.layout.operator("myops.read_file", text="Test Read File")

def register():
    bpy.utils.register_class(OT_TestOpenFilebrowser)
    bpy.utils.register_class(OT_TestReadFile)
    bpy.types.TOPBAR_MT_file_export.append(menu_func_export)

def unregister():
    bpy.utils.unregister_class(OT_TestOpenFilebrowser)
    bpy.utils.unregister_class(OT_ReadFile)
    bpy.types.TOPBAR_MT_file_export.remove(menu_func_export)

if __name__ == "__main__":
    register()

Sorry, what's your question? How to always open up a specified directory or just allow the user to load an arbitrary file? For the later you do not need the ImportHelper class necessarily: https://blender.stackexchange.com/questions/26898/how-to-create-a-folder-file-dialog/26906#26906 otherwise have a look into https://blender.stackexchange.com/questions/229100/how-to-get-filename-and-directory-of-selected-files-in-filebrowser-python/229103#229103

Sorry.  The main question is that I want to allow the user to choose a file, but open up the file browser at a specific directory.  I have also been trying to read a data file after the user chooses a file (currently I have the user choose a file and then press a button to read the data).  It works in my example,  but the same code is not working in my larger script.

I just want to control where the user starts looking for the file, and the directory will probably be a string so that can easily be changed.

Pretty sure link posted above does that. On one file or many.  If you have set a filepath elsewhere, say in user prefs, op = layout.operator(...).directory=that_file_path  The import operator reads the selected files.  This is usual practice. No need for two operators.

Posted wrong link above, see this one https://blender.stackexchange.com/a/198926/15543  Test call with bpy.ops.test.open_filebrowser('INVOKE_DEFAULT', directory="/home/batfinger/Downloads") will open the file browser in Downloads folder.  Read the file(s) in the executte method of operator after selected.

... also consider that the StringProperty can have a default value. Copy/paste the code from: https://blender.stackexchange.com/questions/26898/how-to-create-a-folder-file-dialog/26906#26906 and set the default attribute to e.g. default="your/fancy/path", which is open up the browser at that specific location and is easy to setup. You can even add a check for all operating systems using python's platform lib: https://stackoverflow.com/a/1857


text:
I would like the parent to rotate and translate with the child but scale the parent independently
I have parent and child objects.  I want the child to move and rotate with the parent, but I would like to be able to scale the parent without affecting the child in my Python script.  I know that I can set the parent to transform independently with this:
bpy.context.scene.tool_settings.use_transform_skip_children = True
or in the Options menu in the upper right hand corner of the 3d view window.
In my Python code, I would like to be able to detect that a translation in the parent object is occurring, set the parent to transform independently, and then reset that the child transform with the parent. Is that possible?  I am not sure if a modal operator would work, and I do not know what to call the event that would trigger it.

If your overall goal is to have the child translate and rotate with its parent but scale independently, then one option is to use a Child Of constraint instead of parenting. Clear any parent the "child" object may have with Alt+P, then add the Child Of constraint. Once you assign the "parent", you can then choose which components of its transform are inherited (you can disable all three scale axes).

This is an answer TTJ

@TheTrueJard please write this as an answer and not as a comment, so that it can be upvoted and accepted.

I originally added it as a comment cause it seemed the OP might want a python solution, but after re-reading it I see otherwise. I've added the answer now.

If your overall goal is to have the child translate and rotate with its parent but scale independently, then one option is to use a Child Of constraint instead of parenting. This solution does not require any Python scripting.

Clear any parent the "child" object may already have with Alt+P.
Add the Child Of constraint. Once you assign the "parent" object, you can choose which components of its transform are inherited. In your specific case, you'll want to disable all three scale axes.

I had not used constraints before, so this answered my question.  I do need to use Python, and this is what I came up with: constraint=objchild.constraints.new("CHILD_OF"), constraint.target=obparent, constraint.inverse_matrix = objchild.matrix_world.inverted(), constraint.use_scale_x=False, etc. I think it is mostly working.

source: Stack Exchange

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

sort: votes


text:
Blender 2.83 object selection not working correctly
I just downloaded version 2.83 and am following a tutorial, but things aren't working like how the tutorial is. When I select an object it doesn't highlight completely like in the tute; only the outline does. When in Edit Mode, I can't see the edges or the faces, but can see the vertices for some reason. I played around in the Overlay box, but it hasn't helped. I'm sure it's probably just some quick setting somewhere. Thank you to anyone who can help me.

when you are in the edit mode press 1 for vertex selection, 2 for edge selection or 3 for the face selection. Try to press alt+H in edit mode it will unhide everything. If it does not help please provide me with the sreenshot

The 1, 2, and 3 part was actually in the tutorial. The alt+H didn't help. Don't know how to add a screen shot.

I was faced with a similar issue, the way I solve that was to go Files top left, scroll down to Defaults, under it you will find Save Startup File and Load Factory Settings.
Click on Load Factory Settings and it should definitely solve it.

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


text:
Vertical Line Artifacts in Blender Cycles 2.83
just got Blender 2.83 today and noticed these weird artifact lines in my cycles renders. It happens in the render viewport, and in final renders. It only happens when I use GPU acceleration, CPU is fine. I have a Sapphire RX 580. They seem to fade if I ramp up the render passes, suggesting that they're a type of noise. I made a test scene with three point lights in a volume, 256 passes and no denoising. You can really see it just to the right of the red light and the top edge. Is this a known issue?

Looks like it could be a bug. Is it possible you could upload your file so we can try on other hardware?

https://pasteall.org/blend/b4c7f70570da429dbc47b19a987c25e8

Figured it out, kinda stupid. Just had to update my graphics drivers.


text:
Issues with Pointiness
This will be my first post to the forums and I hope this is in the right place.
So I have recently switched from Modo to Blender and am really enjoying it
Im at a stage where I am trying to add some wear to my edges on my current project, and I'm getting some weird results on certain portions of my model
My have applied subdivision because I heard that the pointiness node works well with Hi poly models
I  am also using bool tool for my punches and have tried applying booleans and keeping them non destructive with the same results
Here is an image of my current situation

Any help will be greatly appreciated
Thank you
Laurence

It is important to note that booleans do not generally make clean quad-based topology. Therefore, no matter how high topology you go, you'll generally get tris and even sometimes n-gons that can destroy an otherwise passable result. Pointiness needs to rely on vertex data, and it seems that the model was nowhere near high poly enough to look clean with the pointiness node. (matching the topology density of the boolean and base model can help somewhat).
Because it's vertex based, the program can only really check if the vertex is bent, or the angle of its sides and other quads. this means the pointiness node will look up to 2 vertices away from any given point of measurement. The best way to combat this, is to make sure it always looks just as far, no matter what direction it tries. That's accomplished, normally, with retaining loops.
Your model may be high poly, but there will always be vertex-sized artifacts in the texture if you make it using vertex data on bad, or even normal but booleaned topology. you can only make them smaller.
there are only a few ways to deal with this in a boolean workflow:

brute forcing geometry density to millions of vertices.
retopology, to make proper retaining loops manually or via some remesh algorithm
wait until modeling is over, and paint the area by hand without baking textures
use a very low poly boolean object, so you barely have to work to retopologize just the area around the booleaned geometry.

The boolean workflow is nice, fast, and easy on the eyes, but when it comes to topology it's just about the most notoriously inadequate workflow. I would personally tell you to manually retopologize the part after if you absolutely must use pointiness to texture it, and if you do, you should probably use this proven topology, it's a favorite among hard surface modellers:
this is what you have, simply subdivided then booleaned

but if you just cut a low poly hole and put some nice loops around it to tell it where the curve is...

it ends up like this, with only a few polys, with the help of the subdiv modifier! (ignore the creases, I was too lazy to put retaining loops on the cube other than the hole)

buuuut I've gotta say I wouldn't suggest using pointiness other than as something to mix with a noise texture, so that I can get some nice paint chipping or grime on corners as such:

Thank you so much man! This is awesome! you answered this in such detail which I really appreciate :) Yeah I was planning on hand painting but now im playing around witht he bevel node (I still have no idea what Im doing in Nodes :P ) In future I shouldnt be lazy and actually make simple holes with loops instead of destring my model in a non destructive way :P Thank you for your example file too! Now I understand how masking works!

sorry for the late comment, but there really is nothing wrong with non-destructive workflows- I just find they suit quick design and blocking out well, and advanced textures, animation, and modifiers poorly. After you have the basic shape, you should retopologize for texturing, whether you're sculpting or any advanced workflow. some shapes would be nearly impossible to work out easily without first having a booleaned model to build on. and yeah! masking is super important- essentially the basis of procedural texturing alongside noise and shaders!


text:
Evenly space out object instances from array modifier in curve
I'm currently in the process of creating a fence that follows the same path as a curve. I simply created a fence (starting off with a simple model, which I can and might change later when I got this figured out), arrayed this (fit curve) and added the curve modifier. All set, you'd think. However, this is not the case.
Some fence posts along the curve are smaller in it's width than other instances of the fence posts.
First, I added the array modifier:

All fence posts are evenly spread out, as they should. However, when I add the curve modifier, it's starting to show the weird behaviour:

Firstly, it went a bit left on the x-axis. Secondly, as you can see (especially the last few fence posts), some are spaced out less than others.
What did I do wrong or what do I need to change so that the fence posts are evenly spread across the curve?
Bonus question: Before I add the curve modifier, the last post on the right is slightly after the curve ends. This could be solved by reducing the offset between posts ever so slightly. Is there a way to do this as precise as possible? A calculation, a function or whatever?
Thanks so much in advance!

https://blender.stackexchange.com/questions/125095

Is there a non-destructive method? I like to not apply modifiers whenever possible, so it's easier to change things.


text:
How do I attach a mesh to a rig?
I've spent hours trying to use the Automatic Weight option in Rigify, but the left forearm of my mesh deforms(tried merging verts and scaling).  Everything looks fine until I parent them.  I want to keep the generated rig, but are there any alternative methods to attach it to the mesh?

do you mean it deforms as soon as you parent it or it deforms when you move the bone after parenting?

Have you tried the Automatic weight?
Did you do the retopology?
The first time I tried doing Rig, it didn't work until I learned about retopology, wich is (im not that sure) putting less ''points''. I don't know how to explain that correctly, you should watch the video of FlippedNormal on retopology for begginer.
If you already learned about this, maybe look if you have only square, for me when I have triangles it dosen't work.
Hope it will help. Good luck

Hi, retopology isn't just about having less vertices, its also about how the faces/edges/vertices flow.  If they don't flow correctly it can cause weird deformations.  Retopology is only necessary if you didn't model the object to account for flow or if you sculpted the object.  I just thought I'd explain it more fully in case @ably6 hasn't heard of it before.  Cheers!


text:
How can I fix "Bone Heat Weighting Failed" Issue?
When I try to use the Automatic Weights option to parent my mesh to the Rig how come it deforms the meshes left arm?


text:
Vertices as particles?
I'm new to blender. I'm trying to build a galaxy for a home page on a website. Was wondering what is the least intensive way to get star like particles for a galaxy that can be used for a website. Right now I have cubes for the particles, but I heard vertices could possibly be used. If so how would I go about using the vertices and coloring them?

You used to be able to render vertices as halos. That only worked with the old Blender Internal renderer which was completely scrapped. I miss the halos.
Anyways, there is an alternative option called Point Density, I'm not going into this here, because it renders slowly and is not well suited for your situation.
I suggest you use icospheres, or stick to the cubes if they looked good enough.

Thank you for the input!


text:
Bloom in Cycles for animation or ring transparency in Evee?
I am making a space scene and I am having a problem with not being able to solve either one of these problems. Cycles renders the rings around my planet properly by making the space between the ring transparent. In Evee it displays the black between the rings and doesn't recognize it as transparent. For making a shadow on the planet it also shows the full ring that the texture is on and not the pattern the texture is making. In cycles I can not find a way to to do the bloom I can get in Evee and have it to where it is over the whole animation; but the rings and shadows from the rings onto the planet render correctly. If anyone knows a solution to either problem it would be greatly appreciated.

Use glare in the compositor.

Go to the compositor and add in a glare node between the render output image and the composite node. Then for the type, choose "Fog Glow". Adjust the settings to your liking.

When using the compositor those changes are just for the image and will not be applied to all the images in an animation correct? I saw this method, but wasn't sure if it be applied over the entire timeline of an animation.

The compositor node setup will be applied to every frame that is rendered, no matter what (unless you disable it inside output settings). So yes, it will be done for the entire animation if you plan to make one.


text:
Creating Face from 4 Vertex Points making Triangle Instead?
I am following this tutorial and every time I click the same 4 vertex points as in the video is creates a triangle instead of the face like in the video.
Here's my model

But in the video I am watching he does this and makes it like this

It looks as though you're working under a Mirror modifier(?), in which case the vertices you're trying to bridge to with F do not exist in the editable mesh.
Has your tutor applied the modifier?
Or maybe the tutor has EX or EY extruded the edge orthogonally to the mirror-axis, with 'Bisect' checked for that axis?


text:
Cloth simulation crinkles and goes through object?
So I want to create another blanket on top of the blanket I already made. This is what happens right now

When I look at the normals it looks like this, but I don't know if that matters or not

That’s normal. Cloth physics is a close approximation at best in my experience. I recommend you use a shrink wrap modifier with altered settings to move the second blanket outside the first.

Has the first blanket a collision modifier?

yes I added one but the top cloth still goes through it

And the collision modifier is below the cloth modifier, right?


text:
Only See Camera View in Viewport and Black Out Background?
So I saw people have the camera only show the rendered image in the viewport with the entire background blacked out.
How do I do that? I tried ctrl + b but it just did nothing but make the camera outline have different cursors to drag it

Select your camera and in Object Data > Viewport Display, increase the Passepartout value up to 1:


text:
How limit the Musgrave Texture Effect in the mesh on Geometry Nodes?

I am new in Blender and I trying to make a "churros" (food) in geometry nodes.
Are there some way to prevent the musgrave effect in some part of the mesh in geometry nodes?
In my case, on tho top of the mesh, I did not want that line was generated.
I follow this tutorial (in latin spanish) to make the "Churros": https://youtu.be/41MUnBxNCOk
I tried this solution, but this don't solve, unfortunately: Texture Coordinate Node for Geometry Nodes?

Please share your blend file with us. The screenshot is not really helpful and does not give enough information about how this thing is constructed. I did look at the tutorial, but I'm afraid the problem is more of a structural one, which simply produces a miserable topology as a result (so shouldn't be your fault, but that of the tutorial's author).

Hi, quellenform!
Sorry for come back late and thank you for try to help me. I will send the file with the Chris solution already appplied.
It worked, but no perfectly, I will comment the anothers problems that appeared .
Here is the file: https://drive.google.com/file/d/1RCx5nYC-9xROySd-BhlnPiz4x2i5VtLj/view?usp=drivesdk

UPDATE:
for a "smooth" transition, you can e.g. use this node setup:

There are several possibilities to achieve this effect, e.g. you could use the position of the vertices to influence the behaviour, here i just apply the texture to z values lower than a certain value:

or you could use a vertex group to use musgrave only on the vertex group like this:

Note: this only works if the mesh was not generated by GN.
or with this node setup the musgrave texture will be applied only if the distance is within a given range to a point:

Hi, Chris.
Thank you so much for your helping. You until sended a gif to ilustrate the modification, this effort must to be very appreciated.
So, I tried the 3rd solution, using the Compare operator than the Less Than and work very well, but this generate 2 problem and I will understand if the help ends here because it escape of the main subject.

I wanted smooth the transition between the part without and with the Musgrave effect;
I created others "Churros" with the Draw tool in Edit Mode and one, because is in horizontal plane, the Compare Operator work wrong.

If you want to see the Blender project, here is the file: https://drive.google.com/file/d/1RCx5nYC-9xROySd-BhlnPiz4x2i5VtLj/view?usp=drivesdk

Hi, Chris.
Thank you for your support, I really appreciate that, but, sorry, I'm stupid a lot in Blender and I need to learn so much to do what I wanted.
I will classified the topic to solutioned with your answer because of your efforts.

Hi Mat. Thanks. Don’t think or say that. Geometry nodes is quite complicated especially in the beginning. And if you are not familiar with these „node thing“ and how geometry nodes calculates its values - it is hard to understand. But if you keep watching GN tutorials e.g. from Erindale, you will learn more and more and one day you will understand a lot and think: ha, wasn’t that difficult

You can separate the materials used for the ends.
Select all the polygons that you don't want the material on. Create a new material and assign them to it. Change the material to the existing churrro material.
In object mode, make the new material a separate user by clicking on the number next to the material name.
You now have a copy of the original material but any changes won't affect the original one.
you can remove your displacement and try to find another texture that works.
Also UV unwrapping the ends would help too. Plenty of tutorials to be found for UVs
Your churro looks great by the way :D

...unfortunately this will not work, because we are talking about Geometry Nodes here. Have you watched the tutorial?

Hi, elCamsterino!
Thank you for help me, but, how the quellenform commented, I am using the Geometry Nodes and not Modeling the Mesh. But anyway, I appreciate you help!


text:
Show addon tab panel in just the Compositor, not in Shader Editor
How can I only place the panel in the compositor NOT the shader editor as doing bl_space_type = 'NODE_EDITOR' doesn't specify a specific node editor and places it in both?
Relevant code portion:
class ExamplePanel(bpy.types.Panel):
    """Creates a Panel in the Node Compositing window"""
    bl_label = "MyTab"
    bl_idname = "OBJECT_PT_my_tab_pnl"
    bl_space_type = 'NODE_EDITOR'
    bl_region_type = 'UI'
    bl_context = "View"
    bl_category = "My Panel"

You can add a poll function:
@classmethod
def poll(cls, context):
    snode = context.space_data
    return snode.tree_type == 'CompositorNodeTree'


text:
Hotkey to set playhead to Left mouse click
In the Video Editor (Sequencer), left mouse anywhere used to move the playhead. Now one must click in the frame numbers (since left click now select, which I like) to achieve the same thing.
Is there a way to set SHIFT + left click anywhere moves/scrubs the playhead?
Some research shows change frame but I think that is now gone (can't find it in the hotkey list) How to map “CHANGE FRAME” to mouse right click in Blender 2.80 in the VSE.

Shift + Right Mouse Button
At the top of the hotkey list is a search box, search for change frame and see/set the Sequencer value.


text:
How to use a driver to pan and zoom an image
I am trying to follow this answer: Pan or zoom in the VSE (accepted answer)
After I right click on x offset and select Add driver, the x offset turns purple. I am not sure how to see the graph screen or how to add keyframes as suggested in the answer.
How does one see the graph screen, and add keyframes (So I can animate the x-offset of a photo to get  a pan and zoom effect)? Could someone please provide some more detail?

Either you should be using a driver OR you should be using keyframes - not both since one will override the other. It sounds like you should actually be using keyframes - so right-click and Remove Driver.
Using keyframes the field should be yellow/orange/green to indicate the keyframe. Move to your frame, set the value, then hit ‘i’ to insert keyframe. No need for driver.

Im in the Sequencer, and press i, but no keyframe is inserted. I can't find insert keyframe in the menus either.

You need to hover over the field (Position X or Position Y) before pressing 'I'. At newer versions of Blender there is also a dot/diamond toggle alongside which you can click. Right-clicking the field should give you 'Insert Keyframe' although if there is already a keyframe then you'll have 'Replace Keyframe' and 'Delete Keyframe' options instead.


text:
Digital Circus Style Facial Rigging?
https://youtu.be/ZZh5Ny-fTjU?t=7
The video shows a 2D facial rig that appears to be controlled by 3D elements. It looks like the final result is rendered separately and then applied to the character. I might be mistaken, but I thought you all could help me figure out how this works so I can learn the techniques behind it.
It doesn’t seem to use separate images on a trim sheet; instead, it’s done "live" in real-time.
How can this be achieved in Blender alone? Are there any tutorials or resources that explain this method?

As written on the bottom of the YouTube video, the animation is performed on a proxy character, which is flat and composed by layers of 2D planes in a 3D world, deformed by bones, shape keys and lattices.
Once the animation is done, it gets rendered as a Black and white mask Image Sequence, that is then used to drive the colors of the final texture of the 3D model.
I tried a simple version of it and it works fine.
Brilliant Rig and workflow, anyway.

@Starius Which kind of details do you need? What do you already understand? It's difficult to offer a complete rigging course on a single answer ...

sorry for late reply man. I’d like a lil more detailed guidance on how to render the black-and-white mask sequence and correctly apply it as a texture driver for the final 3D model in Blender


text:
Wireframe shading issue in Blender 2.91 viewer
I'm new to Blender and I've been trying to get the wireframe shading to work since 2 days and been having this issue shown in the image below:

Whenever I try to go into wireframe shading mode it makes the object transparent.
Things I have tried:

Uninstalling and reinstalling Blender.
Loading factory settings.
Turning on wireframe in overlay drop-down.
Selecting wireframe in viewport display under object properties.

Any help regarding this issue is appreciated.

AMD graphics card? https://blender.stackexchange.com/questions/203615/how-to-fix-material-and-render-previews#comment342453_203615

if it is not your graphic card...please provide your .blend file via https://blend-exchange.giantcowfilms.com/

Go to the viewport shading options while in wireframe and check x-ray. You probably have it disabled.


text:
texture baking is having a problem

so I have procedural texture that I made in blender and wanted to baked it and add some additional details in substance but whenever I bake it it gives me this result. I don't know what to do I hope anyone can help me

"Whenever I bake it it gives me this result" What results were you expecting, what was it supposed to look like? What is your question?

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

helloo i dont know if you will get a notification on this i dont know how to mention users in this website hahahaha, but what i expect was to have a skin with all the added procedural texture, and i did fixed it tho, the direct and indirect light is getting in the way of baking, if you have a suggestion on that plst let me know


text:
normal map node plugged in bump node have better results
hello ive been researching for a while now about how normal map works, one thing i acquire is that you simply cant just "strengthen" normal map since it stores vector data. and been messing with shaders and i found out that plugging in normal map node to bump give your more details. than when you simply plug normal map node into the shader. why is that?
and what are some cases when you can just use normal map node alone and bump alone?

Hello, I prepared an answer but it's not clear what you're asking, normal map and bump map work differently, please show an example

If you plug a normal map into a Bump node, the node will use the values of the normal map (its black, greys and white spectrum) to give heights. It may look good in some cases but it generally won't give the expected result as, as you say, the normal map colors are about directions of the normals, not heights.
Example, at the top, a normal map plugged into a Normal Map node, at the bottom, the same normal map, but plugged into the Height input of a Bump node, it doesn't work at all:

For the second question, what do you mean when you say "use normal map node alone and bump alone"? You may find some textures that provide both the normal map and the bump map but you need to choose between the 2. If the 2 maps are supposed to create different kinds of details, you can overlay them: Just plug the Normal Map node into the Normal input of the Bump node.

hello im not sure if this is how you reply but and i dont know if youll be able to access this but https://imagizer.imageshack.com/img923/7430/h0GHyx.png
https://imagizer.imageshack.com/img922/3869/4bqXU2.png
https://imagizer.imageshack.com/img924/9332/h9j4kN.png this are the images for example. first tow are when i plug in the normal map alone and strengthen it, and last picture have the normal map node plugged in bump. my guess is that the bump gives the normal map a smooth and easier transition thats why it looks good

hello, It may look good on small details but it's not correct, you'll see it if you use a bigger 3D relief  ;)


text:
can I make a 3d printable hollow cylinder?
I am trying to hollow out a cylinder, however I need to have a thickness in the walls and when I try to use the extrude tool, the mesh breaks. is there another method?

why not just duplicate the cylinder with Shift+D then scale it bigger and apply scale with  Ctrl+A > Scale. then select both cylinders and join them with Ctrl+J. have you tried that? If the cylinder has one side open, then you can just do Add Modifier > Solidify and adjust the thickness, then apply it.

You can extrude, accept the extrusion without moving it, and scale the result on x and y to achieve thickness. Or add a solidly modifier instead of extruding and apply the modifier.


text:
What [bpy.context] is needed to use/apply bpy.ops.geometry.attribute_convert?
I want to write a script that combines all geometry in one collection into a single (separate) object. With all modifiers applied.
I got most of it working but since I’m using geometry nodes to set UV coordinates in some of them, I need to convert the UVMap attribute beforehand for the joining to work properly.
Now the problem is everytime I call
bpy.ops.geometry.attribute_convert(mode='UV_MAP')

It says invalid context (or something like that)
I tried overriding object, active_object, selected_object and selected_editable_objects
with the object(s) I that had the operator applied
First I thought it was because I was using evaluated meshes (which seem to play by their own rules, but even mesh_from_object (or whatever it’s called) didn’t help it

Operators in bpy.ops are for interactive use through the UI and should be avoided in scripts because they depend on context. Using them through scripts may yield unexpected results at best, or fail entirely at worst. Manipulate data directly from bpy.data instead.

Yeah figured, I just hoped there would be a way around it cause iterating over thousands of vertices/face loops and copying data may not be the most efficient way

Just because you are manipulating the data directly doesn't mean you have to iterate over every vertex. You're just doing things like new_obj = obj.copy() rather than bpy.ops.object.duplicate().


text:
Assign imported .obj file to variable Python API
I want to use scripting to import a .obj into an existing scene, then rotate and scale that .obj. Here's what I've been using to do that:
import bpy

#open the scene
scene_loc = '#the location of the scene'
bpy.ops.wm.open_mainfile(filepath=scene_loc)

#deselect everything
bpy.context.view_layer.objects.active = None

#open the object and assign it a variable
object_loc = '#the location of the object'
obj = bpy.ops.import_scene.obj(filepath=object_loc)

#make the selected object the active object
bpy.context.view_layer.objects.active = obj

I've tried various iterations using answers from here to make the .obj active right when it imports, but none of them have worked. It would be nice if I could assign that imported .obj to a variable and then rotate/scale it from there. Is there a way to assign a variable to an imported .obj in the Blender Python API?

ops only return whether they succeeded. It should already be the only selected and active object after import (same is true for any op that creates an object).

@scurest  I thought non-modal operators returned {'CANCELLED'} when they fail and {'FINISHED'} when they work.

@MartyFouts Wouldn't you call that "whether they succeeded"?

@scurest I misread 'whether' as 'when' in your comment.  My bad.

You can't assign a variable to an imported object

First deselect the active object before importing
Import the object and set it to the active object
Rotate/Scale the active object

import bpy
from math import radians

bpy.context.view_layer.objects.active = None

def import_obj(filepath):
    ''' Import OBJ file.

    filepath (str) - Filepath of OBJ file.
    '''
    bpy.ops.import_scene.obj(
        filepath = filepath,
        filter_glob = '*.obj',
        use_edges = True,
        use_smooth_groups = True,
        use_split_objects = True,
        use_split_groups = False,
        use_groups_as_vgroups = False,
        use_image_search = True,
        split_mode = 'ON',
        global_clamp_size = 0.0,
        axis_forward = '-Z',
        axis_up = 'Y'
    )

import_obj('') # filepath

bpy.context.view_layer.objects.active = bpy.context.selected_objects[0]

obj = bpy.context.object
obj.scale = (2, 2, 2)
obj.rotation_euler = (radians(90), 0, 0)

Worked on its own, but did not work to import a .obj to the existing scene. Getting the same error I was getting before: "'Context' object has no attribute 'selected_objects'".

Provide the screenshot of the error message


text:
Image in compositing showing and then disappearing
I've been following BlenderGuru's Donut video tutorials for Blender 3. I'm up to the Compositing chapter, however I'm stuck at the very beginning, because the compositing backdrop isn't showing:

After a bit of investigation, I realized that when pressing this icon in the "Render Layers" node, it shows me the rendered frame and then disappears:

What I've tried:

I have rendered the frame using F12
"Use Nodes" is enabled
Backdrop is enabled
My "Render Layers" node connects to the Viewer node and Composite node via the "Image" pin
Removing the connection and then re-adding it to refresh it

So far I have followed these troubleshooting tips, but to no avail:

Rendered Image not showing up in compositing tab
Backdrop doesn´t work/ image won´t show up (for compositing)
Backdrop not available in Nodes

You can see my .blend file here
Any help much appreciated!

In the Output panel > Post Processing, you've enabled the Sequencer option, and you have a video strip in your Video Sequencer editor, so it will try to render the strip, not your scene. So either disable the option or remove the strip. In my opinion it's better to manage the videos in another blend file, you'll avoid this kind of problem. Also you can activate the Backdrop option of your Compositor if you want to see your render as background.

That solved it, thank you!

did not help :( please see my comment added with details on my same issue. would appreacite your ideas!

Please don't use the Your Answer field to ask a question, instead click on Ask Question, also please share your file so that we can check


text:
Blender UV Map collapses into one small dot in UV Editor
I'm trying to unwrap the mesh. It appears as very small dot in the down left corner in the UV Editor and I can not make it significantly bigger.
The texture also does not appear on the object.
I tried marking seams but it does not make a difference.
It works just fine with all other objects in the scene.
Thank you for the help:)

probably you need a blend file to find out. Until then, try to select all the points of your object and press "U" twice

Select dot in uv editor, right click and unwrap.


text:
Product Render RGB Lightning Setup
Does someone know how to make this RGB lightning blur on a fan in Blender? Or you suppose to do it in another software? Does it have to do something with motion blur setup?
Thank you in advance:-)

version 01
One quick ... Emission shader directly to blades with Gradient Texture > Radial

Enable Motion Blur ...

version_02
One more natural effect - To light blades add two rings (with the same material as above in version 01) ... under Object Properties > Visibility > Camera - disable it.

For blades add Translucent shader ...

And again render with Motion Blur ...

Model original taken from https://skfb.ly/o76tH

Thank you very much for the responser! Top answer!!!

Start by making a fan "spiral" on the faces you want to be a fan. The spiral is accomplished by using the Z coordinate (isolated) from a Spherical Gradient Texture as the input vector for a Radial Gradient Texture. The Fraction Node turns it into "steps" (blades) and the Multiply determines how many (number of blades). Note that the texture has to "line up" properly, so adjust your multiply value accordingly.

To give the illusion of "jittery movement", add a Wave texture after the Radial Gradient, and give it the same fraction/multiply treatment. This will give a bunch of uneven lines in the "Swirl" mix the 2 with a Noise texture to make the "movement" more apparent in some areas than others.

Multiply this whole thing over your background color - Make sure to use a noise texture (and a ColorRamp) to obscure most of the "fan blades" from the mix - the less you see, the faster your brain thinks it's "moving". Run the mix through an emission texture and turn on Bloom for extra effect (the glow helps the blur effect):

Thank you a lot for the answer! Thank you for taking time to answer in length:-)
Top!


text:
Baked texture is distorted - it has some weird lines
When I try to bake my texture it comes out looking like this:

I thought at first it were my textures but it seems to be not the source of the problem. I already tried everything I could imagine that could solve the issue but unsuccessful. I would really appreciate the help!
Here is the file:
Shelf_Bake_Test
Thank you very much for any help:-)

You've set a Max Ray Distance, it will stop the ray before it hits the face it is supposed to bake. Bring back this value to 0 so that the ray is infinite and the bake will work fine.
Also increase the Extrusion value,  it will move away the start point of the ray so that you won't miss any high-poly topology that would protude out of the low-poly.

Thank you for the answer @moonboots

Thank you @moonboots I tried it just now. My Max Ray Dist. was set to 0.01 before. So I tried as you commented the value of 0 which produced a similar result with the stripes. I also tried the value of 1 and it almost looked the same as the value of 0 also with the stripes. So I tried to change the Extrusion setting and omg it works just fine with Extrusion at 0.001 and Ray Dist. at 0.01. But I do not understand way.  As I understand the Extrusion setting works only with the Cage ticked? https://docs.blender.org/manual/en/latest/render/cycles/baking.html

No you don't need any cage for Extrusion, actually Extrusion acts like a kind of cage, it will move away the start point of the ray so that you won't miss any high-poly topology that would protude out of the low-poly

Top! Thank you very much @moonboots:-)


text:
How do i convert hair curves to hair particle system on a mesh so i can export it to ue?
I have made a hair curve object with the new hair system (the one where you press ctrl+a and add empty hair from the curves tab) and i want to convert it to a particle system on a sphere so i can export the sphere into ue5 as an alembic file. I tried the HairNet addon but it gives gives me an error saying the curve object doesnt contain the bevel_depth attribute. Does anyone know how to go from curve hair to particles or at least curve hair to nurbs path hair and then to particles?

Select your hair curves, go to object menu > convert > particle system.

Wow, it was that simple, thanks a lot, this took so much more time than needed xd!

Check if your sphere had all transform applied (Ctrl A) before adding hair curves: it should have rot 000 and scale 111 (and loc 000 not strictly necessary, but a good habit).


text:
How should i go with modeling this pistol grip piece?
im trying to make this pistol grip or at least somewhat resemble this.

Add the image in your 3D view and draw its profile:

Extrude the mesh, use a Mirror modifier:

Work the geometry in 3D:

Give it some additional edge loops in order to sharp some edges:

ay! thanks man, i appreciate the step by step process you gave.

instead of building the shape and then using the knife to make the indent, i started off with the shape of the indent, and then extrude to create the shape of the body, but i want to define the imprint a little more.

https://imgur.com/a/aXxb2Co

you are using a lot of edge loops, I'm not sure they are very useful, it makes it more difficult

ok, i"ll lessen the amount

https://imgur.com/a/Wvu2kxf

yes it's better in my opinion, don't forget these two part that you can get with extrusions: https://zupimages.net/up/20/39/cknp.jpg

ive actually went about to modeling the rest of the gun! i didnt so the two parts yet, because i just saw your comment, but i thank you for your help! mind telling me what you think so far? There are some parts of it that i was a bit lazy on, but i'll go back to them once complete with the whole model

https://imgur.com/a/nh7dXSo

Maybe join all the parts unless you have good reason to keep them separate? I think there are several issues like ngons and tris that you should try to avoid, or useless edges, also make sure that your normals are correctly filpped. Is it for a game or for a Blender image or animation? In the latter, use the Subdivision Surface to have a smooth appearance

the model is for a game i plan to create.

Oh ok in that case you won't be able to use the Subdivision Surface modifier

the foreground is the gun with subsdivision, the one behind that is all peices joined together.https://imgur.com/a/3ETGf3K

I don't know a lot about games, I guess the choice between low-poly and high-poly is both an esthetic and technical choice

yeah, this model is meant for more being seen closer up, so i just want it to at least look pleasing to the eye when holding, i just hope the weird shading doesn't make it look too bad.


text:
How to fix these weird shading problems?
when ever i use the Boolean modifier i usually see these weird cuts in the shading, the same thing happened when extruding too. Does anyone know how to fix this?

You might have some artifacts in your mesh after using the modifier. If it's just a shading issue, you could try turn on "Auto Smooth" in the object data properties and see if that fixes it. Auto Smooth also works best when your shading is set to Smooth. Another thing that can help is to clear the custom normal data on the model to make sure there aren't any other settings affecting  your shading.

The "Clear Custom Split Normals Data" worked for me on Blender 4.0, thanks !

You have a lot of ngons (faces with more than 4 vertices), it tends to create artifacts for example when the faces are non planar. You can try to fix it with the Auto Smooth option:

But the best is to fix your topology with quads:

i went ahead and remade the piece, trying to keep the quads consistent, it looks pretty good so far, and thanks for the tip.


text:
Object with Modifiers always shaded smooth and not flat
In my example I am having a simple path and using Screw and subsequently Solidify modifier. I cannot display it shaded flat. (Object > Shade Flat). See Screenshot.
When I convert the object into a Mesh it is still "shaded smooth", but at least I can change it to flat (Object on the right in Screenshot). For the object with modifiers I cannot.
I hate the "smooth shading" when using Modifiers. I could activate "Wireframe" in the Object Properties via "Viewport Display". But that is only a bad workaround I don't like.
P.S.: On a different note, it is very confusing that there is an Option Object > Shade Smooth/Shade Flat which cannot be found anywhere in the Properties of the object (or maybe I didn't find it?). Why is Blender doing it this way? Seems very inconsistent.

Hi :). To answer your sub-question: shading is applied per polygon, so it can't be an 'object property'. One object can have differently shaded areas ;)

The screw modifier itself has a setting under Normals to change whether it shades smooth.  Clear it and you won't get any smooth shading from the screw modifier.
The solidify modifier does not change the shading.


text:
What is the trick for getting grid snapping to work?
Using Blender 2.90 now, with hopes that it might be more functional than 2.83. All I am trying to do is have objects snap to the grid when moving, rotating, and resizing them. Here are the steps I took:

Select the object.
Open Edit mode and select one of the vertices.
Shift-S and "Selection to Cursor"
Object menu > Set Origin > Origin to 3D Cursor
Open Snapping menu and select "Absolute Grid Snap"

Now, when hitting G and moving the object around, it is not snapped to anything. After all the steps above, one would think something this simple would work. What am I missing?
I have already looked over the bug reports, and someone mentioned today that since 2.79, snapping doesn't work. So perhaps I am expecting too much. Nonetheless, over 60% of the functionality I have tried (according to docs, forums, and online tutorials) either looks nothing like the screenshots or doesn't work as described. I'll do my best not to go on another diatribe. I was able to calm down yesterday and except that re-meshing objects wouldn't be possible with this tool. Having a grid snap may be an ambitious goal for Blender, but hopefully not impossible.

Did you enable the snapping icon? The magnet next to the snap menu shows blue if you have.

Why are you running an experimental build of Blender when you would appear to have very important work to do? I base this assumption on the earlier question you posted, where you indicate that you either work for or with some entity that is contemplating a purchase of Maya. If your work is serious enough to consider such a purchase, it should be serious enough to abstain from using experimental builds of Blender, which are known to be unstable. By the way, I use 2.83 and I don't have snapping issues. Don't know why you do.


text:
Object operators causing crash
I have a Blender project which won't allow me to use object operators (in this case bpy.ops.object.parent_clear(type='CLEAR')), without crashing.
I have tried it on different objects in my scene and get the same result. I have tried adding a cube object and trying to clear its parent and it also causes a crash. Running Blender from the command line doesn't help as Blender stops responding before printing anything to the command line. The same thing happens when I try any object operator. Trying to execute the operation from the console also causes the crash.
I've never had this problem with any other projects, but something about the way this Blender project is set up is causing Blender to crash. I try to avoid operators in general, but I need to run a script to set the object origin to a certain point and have not found a way to do so without using an object operator.
I wish I could give more information but I have no idea what's causing this.
Here's the first few lines of my code (which run fine until the dreaded operator must be used):

def origin_to_bottom(obj):
    ''' obj is a Blender object containing a mesh'''

    # pedantically make sure that I don't affect the wrong object
    for selected in bpy.context.selected_objects:
        selected.select_set(False)
    obj.select_set(True)
    bpy.context.view_layer.objects.active = obj

    # get parent and clear parent
    parent = obj.parent
    bpy.ops.object.parent_clear(type='CLEAR')

As commented when you asked this before, can set the origin without using operators (links posted to prior)   IMO without more info, eg full code, test blend,  or test code that when you run crashes your blender, as opposed to a single method which doesn't appear to have any "danger" in it. ... as you say "something about the way this Blender project is set up is causing Blender to crash"  Without a genie or a crystal ball to rub would be a minor miracle to answer this.

As @batFINGER said, this code totally work fine on its own. So, did you call your function in anyway Blender doesn't like? eg. Thread. There is a full article in API document elaborate something might go wrong when you are not aware of these problem

@batFINGER even running the single line of code calling the clear parent function crashes blender. I've tried running this in the Blender python console. Strangely, if I right click the object and select Parent > Clear Parent works fine. Copying the code from the Info Editor into the blender console crashes. Even if it's possible to set origin without operators, I would like to understand how this is happening. Happy to send my project file but not sure how to do this. Can send a dropbox link?

@HikariTW I'm not in edit mode, don't get a poll incorrect error message, only running one line and not referencing a data block so not sure how it could be an issue with memory allocation. Not a big project file, surely not running out of memory. I've read through the Gotcha stuff and don't see where I'm going wrong!

@JakeRSA Upload to https://blend-exchange.giantcowfilms.com/ this one is the most acceptable place for BSE


text:
Moving edges and vertices UVs on one half of an objects UV map
I am trying to straighten the UVs of one half of my pegboard, but I can't straighten the edges without it interfering with the other UV half of the pegboard.  I did all this in Maya and I no longer have it, so I had to do it here cause the textures became extremely warped.  What can I do to fix this?

On UV editor, set "Sticky Selection Mode" dropdown to "Disabled".

I don't know where the UV editor in Blender 9.3 is.  Can you send an image?

The UV editor viewport is what you're showing in your pic, just cropped.

Sorry, I just don't see the option anywhere.

It's the icon with the dropdown arrow just to the left of the View menu on the UV editor toolbar.


text:
Gravity Collider Bone Physics does not work when cube is hidden
Gravity Collider Bone Physics
https://modelinghappy.com/archives/43818
I added physics to this add-on to show the cube and weight paint on it, but when I export with the cube shown, the cube appears and seems to reflect it.
If I hide the Armature_bone physics layer, physics and weight paint don't seem to work. Is there any way to hide the cube and have it reflect?
I can't put my model in the photo so I have to replace it with another model.


text:
How to repair the color?
My model was changed by another person.
The cloth border color changed to blue.
I want repair green.
How to repair it?
Why changed?

blue Bad color.

Green correct color

Ok I've edited my answer to make it clearer

The material are not the same, they don't have the same Image Texture, as you can see in your blue file, the material called cloth.008 has a blue stroke image affected:

To fix it, select the image atlas_equipment_blue.003 instead:

I don't know really why, but for some reason the Principled shader is interpreted differently between the two, even though they are seemingly the same, and even after I tried to perfectly match the shader and all options I could think in other places.
Maybe the person that changed your model used a different Blender version where the Principled BSDF shader was different, and it somehow corrupted the file.

In any case, you can append the material you need:

Open the file blue.blend
Go in the menu File > Append:

Navigate to green.blend > Materials, select cloth.005 and click the blue Append button:

Select your model
In the Properties Editor > Material tab, click the - button to remove all material slots except one:

Click the Material list drop down and select cloth.005:

The final result should be this:

Additionally, I encourage you to rename your material into something clearer like "MAT_Cloth_Green", and also purge the other material duplicates and texture files if you don't need them.
For this, go to the menu File > Cleanup > Recursive Unused Data-Blocks:

This way, you will no longer have tons of duplicated materials and texture files that to the same thing, you will have a cleaner file, and also lighter:

I tried to do that but there are no c loth.005.
And I tried to search atlas_equipment_blue.png
But there can not choose png data.
And, I tried to append a green file folder.
But It appears to be an error.
The message is "not a library".
What is wrong?

I updated my answer to detail the procedure, please try again and let me know how it goes.

I could do it that way.
Sorry really late.
And thanks.


text:
Avoid rendering transparent object
I am a newbie in Blender. The rendering speed of my animation is very slow (about 1-2min per frame) even with a pretty simple project. My project can be briefly described as scene A -> A disappear -> scene B appear -> B disappear -> scene C appears. Each scene only involves about 4-5 basic 3D shapes.
This is how I implement the project. When I only want to display scene A, I will make all the objects in other scenes to transparent, by setting the alpha value = 0. I wonder if this is the cause of the slow rendering, because all the objects will be rendered in every frame. Is there any way to optimize the situation?

Hi :). Why not disable the objects from rendering instead? Transparent objects still need to be loaded into memory and may slow things down.

@JachymMichal, oh you are right. I think I can separately render the 3 scenes and then use video editing software to combine them. thanks!


text:
vertices cannot be scaled (skin modifier+subdiv. modifier) Blender 3.0.0
I'm currently trying to model a tree by setting single vertices, connecting them and then using the skin and subdiv modifiers.
This method comes from this video from Agustín Hönnun
Link:
https://www.youtube.com/watch?v=pUyoDHYKt8Q&t=11s
Now the problem is that I cannot scale the individual vertices.
In the video you can see that this should work, but it doesn't.
Can someone tell me why this is?
I've tried reducing a cube to a vert and then expanding it AND I've set a single vert and expanded it, neither of which worked.
Changing the pivot point also didn't work.
Blender version is 3.0.0
Thank you for your Help

Vertices cannot be scaled. They are single mathematical points, and have no size. You’ve misunderstood something in the video.

It's called extrusion. select a vertex and press E to extrude it

@TheLabCat oh he probably is refering to skin resizing with Ctrl+A https://docs.blender.org/manual/en/latest/modeling/meshes/editing/mesh/transform/skin_resize.html

@HarryMcKenzie Thanks, I needed that.

When using the Skin Modifier, use Ctrl A to scale a vertex.
Joey Carlino has some good YT videos on modelling with the Skin Modifier. This one is about character modelling, but shows all the techniques and shortcuts that you can use.

you can't scale a vertex. it's called skin resizing

@HarryMcKenzie I will not enjoy this, I will not enjoy this, I will not enjoy this…

My terminology may be wrong but it does the job! :^)


text:
How do I customize the draw_item method in UI List
I created a ui list in which each item in the list has 3 properties--name, type, and number.  In the list in my panel, I would like to have the type and number, but not the name.  Here is my Python code:
import bpy
from bpy.types import  PropertyGroup, UIList, Operator, Panel
from bpy.props import StringProperty, FloatProperty, CollectionProperty, IntProperty

class CustomItem(PropertyGroup):
    """Group of properties representing an item in the list."""

    name: StringProperty(name="Name")

    type: StringProperty(name="Type")

    number: FloatProperty(name="min",)

class LIST_OT_NewItem(Operator):
    """Add a new item to the list."""
    bl_idname = "my_list.new_item"
    bl_label = "Add an item"

    def execute(self, context):
        item_list=context.scene.my_list
        item_value=context.scene.my_list_item
        item=item_list.add()
        item.name = "Name"
        item.type = "Height"
        item.number = context.scene.my_list_item
        return{'FINISHED'}

class UI_TEST_LIST(UIList):
    """Demo UIList."""

    def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):

        custom_icon = None
        split = layout.split(factor=0.3)
        split.label(text = item.type)
        split.label(text = str(item.number))

        # Make sure your code supports all 3 layout types
        if self.layout_type in {'DEFAULT', 'COMPACT'}:
            layout.label(text=item.name)

        elif self.layout_type in {'GRID'}:
            pass
        return

class VIEW3D_PT_ListTestPanel(bpy.types.Panel):
    """Test List Panel"""
    bl_label = "List"
    bl_idname = "VIEW3D_PT_ListTestPanel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "List"

    def draw(self, context):
        layout = self.layout
        row = layout.row()
        row.template_list("UI_TEST_LIST", "Test List", context.scene, "my_list", context.scene, "my_list_index",rows = 5)
        row = layout.row()
        row.prop(context.scene,"my_list_item")
        row.operator("my_list.new_item",text="Add")

classes = (VIEW3D_PT_ListTestPanel, UI_TEST_LIST, LIST_OT_NewItem, CustomItem)

def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    bpy.types.Scene.my_list = CollectionProperty(type=CustomItem)
    bpy.types.Scene.my_list_index = IntProperty(name="my_list_index")
    bpy.types.Scene.my_list_item = FloatProperty(name="my_list_item")

def unregister():
    for cls in reversed(classes):
        bpy.utils.unregister_class(cls)

Even if I just set name to "", the UI List still leaves space for it.  I would like the other two properties to fill up the space, horizontally.

This should be a minimal working example.
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
    row = layout.row(align=True)
    row.prop(item, "type")
    row.prop(item, "number")

IMO you can start worrying  about the different layout types (compact, grid, default) when you've figured out how UI lists work. In most cases you don't really need them.

Don't draw the name label or do not use use split factor. The value 0.3 would reserve too much space for the number even if you won't draw name.

Actually, I don't think the split factor is relevant.  The problem is that I don't understand the layout types and I did not realize that I was using DEFAULT layout (and the layout.label(text=item.name) line).


text:
Create and drive shape key in Python
I am trying to create an drive a shape key using Python.  I used this answer to create a shape key: Creating shape keys using Python
I have been able to use this answer to create a shape key in Python and I can modify it in the shape key panel.
I would like to be able to change the shape key value in a custom menu or panel, so I tried this answer to add a driver: Python: drive a shape key with scripting
The driver Python script works if I create a shape key in Blender using the GUI, but I can not get it to work if I create the shape key using Python.  I tried to incorporate the corrections in the comments related to creating the shape key, but I still can not use the shape key driver to change the value of a shape key created in Python.
Here is the code I am using the create the shape key:
import bpy
import bmesh

context = bpy.context
obj = context.object   # add a shape key to the active object

# now set up shape key in Blender
mesh=obj.data
sk_basis = obj.shape_key_add(name='Basis',from_mix=False)
sk_basis.interpolation = 'KEY_LINEAR'
obj.data.shape_keys.use_relative = False

# create new shape key
sk = obj.shape_key_add(name='Deform',from_mix=False)
sk.interpolation = 'KEY_LINEAR'
sk.slider_min = 1
sk.slider_max = 2

bpy.ops.object.mode_set(mode='EDIT')
bm=bmesh.new()
bm=bmesh.from_edit_mesh(mesh)
bm.faces.ensure_lookup_table()

for face in bm.faces:
# make sure the zeros are actually zero by rounding
   curr_normal=[round(face.normal[0]*1000)/1000,round(face.normal[1]*1000)/1000,round(face.normal[2]*1000)/1000]
   if curr_normal==[0,0,1]:  # find the top face
       print('this is the face: ',face.index)
       for vert in face.verts:
           vert.co.z=vert.co.z+2
bmesh.update_edit_mesh(mesh,True)
bm.free()

bpy.ops.object.mode_set(mode='OBJECT')

Can anyone tell me why the value of a this shape key created in Python can not be changed using a shape key custom property driver.

Why are you setting slider min and max to (1, 2) instead of (0, 1)?

My goal is to put a slider in a custom panel which the user can move and see the object with the shape key modified.  Those two lines don't appear to do anything.  I was trying to create a slider with variable minimum and maximum values, but I am not sure if that is possible.  However, at the moment, I can't even change the value of the shape key in Python.

The slider min and max are hard limits on values the shape key will accept, they are not just for the UI

After you set the mode back to "OBJECT" change the shape key to relative mode if you want to adjust the key with its .value property:
obj.data.shape_keys.use_relative = True

If you're not in relative mode you must adjust the key with
bpy.data.shape_keys["Key"].eval_time

Edit: This version of your script builds a working shapekey:
import bpy
import bmesh

context = bpy.context
obj = context.object   # add a shape key to the active object

# now set up shape key in Blender
mesh=obj.data
sk_basis = obj.shape_key_add(name='Basis',from_mix=False)
sk_basis.interpolation = 'KEY_LINEAR'
# must set relative to false here
obj.data.shape_keys.use_relative = False

# create new shape key
sk = obj.shape_key_add(name='Deform',from_mix=False)
sk.interpolation = 'KEY_LINEAR'
sk.slider_min = 0
sk.slider_max = 2

bpy.ops.object.mode_set(mode='EDIT')
bm=bmesh.new()
bm=bmesh.from_edit_mesh(mesh)
bm.faces.ensure_lookup_table()

for face in bm.faces:
# make sure the zeros are actually zero by rounding
   curr_normal=[round(face.normal[0]*1000)/1000,round(face.normal[1]*1000)/1000,round(face.normal[2]*1000)/1000]
   if curr_normal==[0,0,1]:  # find the top face
       print('this is the face: ',face.index)
       for vert in face.verts:
           vert.co.z=vert.co.z+2
bmesh.update_edit_mesh(mesh,True)
bm.free()

bpy.ops.object.mode_set(mode='OBJECT')
# Switching to relative must be after
# switching back to Object mode:
obj.data.shape_keys.use_relative = True

I noticed that the shape keys I created with the GUI had use_relative=True, so I had tried that and the object still does not change size.  I just tried leaving the use_relative-False and bpy.data.shape_keys['Key.001'].eval_time=number, but the object still did not change when I tried different numbers

Thanks.  That works!


text:
Google Maps 3D to Blender not working

Hi guys!!I could really use some help. Ive followed the tutorials to convert Google Maps into Blender but this is what appears instead of the landscape. Im not sure why?

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


text:
My hologram looks great in preview but when I render it, it looks bad
You'll see... I'm creating a small mod for a video game and, among other things, I've taken one of the original models to introduce it with a hologram appearance at a specific moment, and the result looks very good to me during the preview...

But after rendering (I render it in PNG images) look how it looks like...

All the internal and external bloom effect seems to have disappeared and only the contour lines are observed. How could I fix it?

i believe the thing that makes you think the render look great is the "bloom" feature in eevee.
.
if you are rendering in cycles, you will not have "bloom" unless you add a glare node in the compositing tab.

or
if you are rendering in eevee, and the output not showing the "bloom", its because you are rendering in transparent png, which the alpha of the image cut s out the bloom. so the solution is render with a background, don't render with transparent on.

this setting

or
the most proper way is, render in eevee/ cycles and you will not see any bloom, and give the "glow" or "bloom" in other compositing software like after effects, fusion or nuke.

Thank you vey much for your answer, I need it to be transparent, I'm gonna try adding the bloom effect with after effects...

your welcome ! and yes its the most proper way to do things in post production workflow, so you still have the flexibility to change the glow without needing to re-rendering everything.


text:
OBJ import creates messy geometry, what is going wrong?
I'm having problems importing a public source file containing 3D buildings in The Netherlands into our 3D BIM software ArchiCAD. The website (https://3dbag.nl/en/viewer) offers 3 types of files, including OBJ-files. The proposed workaround is to import the OBJ-file into Blender and export a Collada file for use in ArchiCAD. However, when I open the Collada (.dae) file in ArchiCAD the geometry is all messed up and doesn't look like the preview in the website's viewer anymore. Is there a way to import the OBJ-file into Blender and retain the exact geometry that should be in the file?
Another method we have tried is using the CityJSON-file and importing/exporting through QGIS, but that resulted in a non-solid wireframe. This wireframe did have the correct geometry though...
Another method was using a plugin called Modelport which imports OBJ-files directly into ArchiCAD. This works, using the same OBJ-file, and gives the correct geometry. However, this plugin is not open source and costs quiete a bit.
The above trials show that the correct and accurate geometry IS included in the OBJ-file but somehow gets distorted while importing into Blender. I know the software is called Blender but I would expect it to be possible to import a 3D file 'unblended'.
If anyone has any idea how to fix this it would be very much appreciated!
The file I'm currently looking for is this one: https://3dbag.nl/en/download?tid=1024
Below are screenshots of the 3D buildings in the online viewer on the left, and the final 3D model imported into ArchiCAD (through Blender) on the right.

This is a floating point precision problem. Then you import objects in Blender, do the following (imported objects should be selected):

reset object centers by pressing Object → Set Origin → Origin to Geometry

reset position:

Look at transforms:

Press G, then  X and subtract the X position by pressing the same number:

Do the same for Z axis. If you do everything right, objects will appear on the screen:

Objects, that are close to scene origin, are more likely to have less precision problems. Proceed with export.

YES! Thank you for this, this works! Now I'll try to clean up the triangulation some more and try to find a way to ungroup this model so I can export a selection to ArchiCAD.


text:
Points to volume setup optimization?
in order to greatly optimize my geometry node setup, i need to find a way to remove the two nodes circles in blue (let's call it the blue group) on the pictures.
These nodes are responsible for the generation of my shapes, but creates a lot of computing time. The 3D shape is then smoothed with a repeat zone setup and flattened on XY plane.
Lastly i'm deleting everything inside to extract the outline curves.
I need to instance at least 200 of those shapes and my computer starts lagging at around ~20 instances. My guess is that the "Blue Group" is the limit since it generates around 1.5k vertices.

Thanks again !

It is look like that using volumes is overkill for your setup, since you only care about flat outline.
So maybe try to set this like this:

This setup extract shapes from a flat plane, avoiding voxels

Well I used a better computer and computed a few hundreds shapes with my setup under 5 seconds, so i'll stick to it. But your method will allow me to generate details which is what i was looking for. Thanks a lot !

To "Debug" your Node Graph I suggest to turn on "Timings" in the Geometry Node Editor.
As an alternative to your current approach you can use the Convex Hull Node

I don't know why you're getting downvoted, the use of convex hull is very nice. I'll use it for this project ! Thank you !


text:
Python script output in geometry nodes
Is it possible to generate a bunch of strings inside a python script, then use the ouput of the script inside geometry node ?

Sure, simply add some "String" nodes to the node tree, using Python. Or fill existing node(s) with Python.

That can be. But could you elaborate a bit more about the string usage inside gn (as if not several possibilities to do it, and it depends of your use case)?

well, i'd like to make a name generator inside python since i'm starting to get used to it. Then use those strings inside geometry nodes to create curves.
Those curves are then converted to gcode and printed with an axidraw (that part is already done)

and what do you mean markus by "filling existing nodes with python ?" I'm new to coding inside blender

ok, but one string = one object having a gn modifier? Or other?

Here's an example: set the geonodes string to my last answer on BSE:
import requests, re
from bpy import data as D

response = requests.get(
    'https://api.stackexchange.com/2.3/users/60486/answers',
    params={
        'site':'blender.stackexchange',
        'pagesize': 1,
        'filter': 'withbody'
    }
)
response.raise_for_status()
html = response.json()['items'][0]['body']
pattern = re.compile(r'<[^>]*>')
plain_text = re.sub(pattern, '', html)

# the answer:
D.node_groups['My geonode tree'].nodes['String'].string = plain_text

So i tweaked it a bit for it ot work on my blender, but do you have any idea on how can i stock each generated text as a single instance ?

@DoanFARON if you had that in the question, I probably would address it in the answer :P


text:
Body deformed when changing name of vertex groups
I’m having this weird moment when renaming the vertex groups, the body starts getting deformed. What do I do?

maybe your mesh is rigged and renaming the vertex groups changes the relation between vertex group names and bone names.

As lemon says you need to keep the same name as the bones, otherwise the bones can't control the vertex group anymore, if you really need to rename the vertex groups what you could do is rename the bones as well

To figure out what is happening with your mesh, first ask yourself a few questions:

Am I using an armature modifier?
Armature modifiers utilize vertex groups with specific names to deform your mesh. They reference them through the names, so editing them results in "vertex group not found" issues.

What exactly am I trying to achieve by renaming the vertex groups? This is an open question, can you clarify further? What's the purpose of renaming them?

Are there any other modifiers I am using on my mesh? Do they use these vertex groups? Try to enable/disable each modifier one by one to check which one might have an effect on your mesh.

If all of those don't help, we might need more information from you. A few screenshots of your deformed mesh and the vertex groups prior and after renaming. Modifiers, and just anything related to the issue.


text:
What to do if uv editing don't work and how to delete unnecessary material in blender 4.0
In the video all the problems are visible. I want to add a logo for the perfume, but for some reason it is not displayed in uv editing, but I added it to the materials. (I just wanted to remove the main material from the logo, and not remove it completely, I also don’t know how to do this). further in the video I showed that the vertexes of the logo on the cube are displayed in uv editing, but for some reason the result is not visible in the render. please help me.
The video on Google Drive is not long, about 1.30 min, please help: https://drive.google.com/file/d/14dmDOC4zgSGZTil0TRYL5WemWTmZ4zs9/view?usp=drive_link

You're doing a lot of things in the video, it's very hard to understand what you are trying to do, if you want to assign a material to an object you need to select its faces, select the material in the list of the materials and click on Assign, also make sure that you are in Material or Rendered preview mode, and that you don't have overlapping faces

My problem is that I'm trying to make a logo on a material and place it on a selected object, but for some reason the object turns completely black, and in uv editing my edges are not shown, although they are selected.
Perhaps this is due to the small size of the object, since I can easily apply a logo on a cube, but not on my small object (perfume).

Please pack your images (File > External Data > Pack Resources) and share your file

I solved the problem, I just had to select the edges and right-click and apply UV UNWRAP FACES > CUBE PROJECTION.


text:
What to do if the render does not work correctly

I think the photo shows what's wrong.

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?"

Also verbally explain what the issue is, don't just post an image. It may not be immediately clear what you are talking about, and the question can't be found by searching, making it useless to visitors with similar issues that may be looking for an answer

A guess... this cube is rendered but hidden in viewport:

If not this one, most likely something around that (something hidden in viewport but rendered).


text:
Modifiler Boolean doesn't work. Why?
My problem is that I want to delete part of an object on an object using another object and a Boolean modifier, but for some reason all this does not work correctly, below I left a link to a video in Google Drive. If there are not enough explanations, then don’t hesitate to ask. I really need your help.
Video: https://drive.google.com/file/d/16_vDS4YPluWkI_LytreJZ01ac_p-nK93/view?usp=sharing

Hello, under Solvert Options try the Hole Tolerant option, and also try the Fast option, if it still doesn't work please share your file

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

have you checked both objects are manifold using the 3D-Print tool? You could also poke the cylinder cap face incase that's causing issues


text:
Extrusion or Keyboard shortcut Ctrl + B doesn't work correctly
I want to make smooth edges on an object, but for some reason artifacts appear in the form of unnecessary edges, I ask for your help. I also attached the project file below in gogle Disk.
File: https://drive.google.com/file/d/1h_KX-J4KJ_ZLE1N2DcYCpAGIPb1nsxPg/view?usp=drive_link

It's called bevel, not extrusion. Extrusion is a different thing.

You have overlapping vertices on your model.
In Edit mode, select All then M > Merge by Distance. You'll briefly see a message in the bottom status bar saying that 68 vertices have been removed. You can now select your edge again and use Ctrl-B to bevel it.

Although it isn't making much difference here, you should also apply the Scale to your object using Ctrl-A > Scale in Object mode before bevelling because it currently doesn't have uniform scale.

thank you so much


text:
How to model a pyramid of specific lengths for each edge?
I am trying to model a triangular based pyramid and have a unique length for each edge. I am new to blender and finding it difficult.
The pyramid I am trying to model has a base of edges length 53 / 27 / 31 cm and then the edges reaching up have lengths of length 43 / 48 / 51 cm
any help would be great!

You can use this formula: https://www.mathpages.com/home/kmath424/kmath424.htm to find the volume and this formula to find the area of the base https://en.wikipedia.org/wiki/Heron%27s_formula Wtih that you'll have the height of the tetrahedron, which solves the problem. Based on this: https://math.stackexchange.com/questions/2910855/how-to-find-the-height-of-an-irregular-triangular-pyramid

And this: https://keisan.casio.com/exec/system/1329962711

You could try this:

Enable Edge Length measurement:

Create a regular cone of 3 vertices and enter edit mode, now when you move a vertex you will see the length of each segment as you move:

I hope this helps.


text:
Why do multiple loop cuts appear when I try to add only one?
Okay so I was trying to model something for a friend. and when I made a paw mesh. and joined it to the legs. it does this when I try to add a loop cut?

do you want the loop cut to slice through the highlighted horizontal face loop area? can you share a blend file https://blend-exchange.com

From what I can see, I presume the topology is spiraling. What you perceive as multiple cuts is probably a single cut on that topology. This happens often when the topology was generated with some auto-retopo mechanism.
To check if this indeed the cause, select the edge loop, it will be clear if it's clean or not.


text:
How to quickly remove all zero-weight vertex groups?
I wonder what is the quickest way to remove vertex groups in which all vertices have zero weight.
Currently I got nearly 100 groups listed there after days of hard working, and I'm sure some of them are completely zero-weight groups and should definitely be removed, but it seems not so easy to quickly locate and remove them all.

This python snippet should work if you paste it into a Text Editor's new buffer and click Run Script.
import bpy

def survey(obj):
    maxWeight = {}
    for i in obj.vertex_groups:
        maxWeight[i.index] = 0

    for v in obj.data.vertices:
        for g in v.groups:
            gn = g.group
            w = obj.vertex_groups[g.group].weight(v.index)
            if (maxWeight.get(gn) is None or w>maxWeight[gn]):
                maxWeight[gn] = w
    return maxWeight

obj = bpy.context.active_object
maxWeight = survey(obj)
# fix bug pointed out by user2859
ka = []
ka.extend(maxWeight.keys())
ka.sort(key=lambda gn: -gn)
print (ka)
for gn in ka:
    if maxWeight[gn]<=0:
        print ("delete %d"%gn)
        obj.vertex_groups.remove(obj.vertex_groups[gn]) # actually remove the group

The last line contains a bug though. When it removes from vertex_groups the index changes, which might lead to an IndexErrors or even deleting the wrong groups.

Thanks. But like Mutant Bob said, it doesn't work very well.

@LeonCheung Just curious, as I think I must be blind.. Where did Mutant Bob say that?

@gandalf3 Oops, I really mean user2859.  :P

@LeonCheung if the example isn't working, here is another variant

Ya, the variant works fine for me so far, like a magic. :) Thanks a lot. It would be nice to implement too, since it is a nice group cleaner. (Why not update the variant here instead of external link?)

Just realized lately that we actually ignored one weight tool off the shelf - Clean.
You can simply click it then use the default Limit value 0.000. Done.

Note that it may not exactly solve the question, specifically, but might be useful for others who get smilar problem.

If you are having trouble cleaning, set the limit to 1.0, it only worked for me when I did it like this.

This version is: Delete all empty vertex_groups for all selected objects
import bpy

def del_empty_vgroup(obj):
    try:
        vertex_groups = obj.vertex_groups
        groups = {r : None for r in range(len(vertex_groups))}

        for vert in obj.data.vertices:
            for vg in vert.groups:
                i = vg.group
                if i in groups:
                    del groups[i]

        lis = [k for k in groups]
        lis.sort(reverse=True)
        for i in lis:
            vertex_groups.remove(vertex_groups[i])
    except:
        pass

for obj in bpy.context.selected_objects:
    del_empty_vgroup(obj)

nice, slim, love it +1

This is a modification of CoDEmanX's code that doesn't delete mirror vertex groups, *.R vertex group has the info and *.L is empty, useful for objects with mirror modifier and armature deformation, use in the Text Editor
https://github.com/sambler/myblendercontrib/blob/master/remove_unused_vertexGroups.py
import bpy
import re

ob = bpy.context.active_object
ob.update_from_editmode()

vgroup_used = {i: False for i, k in enumerate(ob.vertex_groups)}
vgroup_names = {i: k.name for i, k in enumerate(ob.vertex_groups)}

for v in ob.data.vertices:
    for g in v.groups:
        if g.weight > 0.0:
            vgroup_used[g.group] = True
            vgroup_name = vgroup_names[g.group]
            armatch = re.search('((.R|.L)(.(\d){1,}){0,1})(?!.)', vgroup_name)
            if armatch != None:
                tag = armatch.group()
                mirror_tag =  tag.replace(".R", ".L") if armatch.group(2) == ".R" else tag.replace(".L", ".R")
                mirror_vgname = vgroup_name.replace(tag, mirror_tag)
                for i, name in sorted(vgroup_names.items(), reverse=True):
                    if mirror_vgname == name:
                        vgroup_used[i] = True
                        break
for i, used in sorted(vgroup_used.items(), reverse=True):
    if not used:
        ob.vertex_groups.remove(ob.vertex_groups[i])

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


text:
Geometry Nodes: Points and Vectors
i want to create lines (edges) connecting the vertices of two grids (what i'm really trying to do is have an array of parallel vectors) with geometry nodes.

I thought i could

take a grid and convert to points
instance and move it (set position)
Get the position of each point
subtract the positions of the two grids
be done

But somehow i cannot find a way to convert points to vectors and vice versa

I think i am a little bit confused that a geometry of points is handled differently from a list of vectors (if there is something like that in geometry nodes). After all a point is just a set of 3 coordinates - i.e. a vector.
Also blender shows that the output of vector math/subtract is not compatible with the curve line input ( i guess it doesnt like having more than one vector as input, right?)
I guess that one implicit question is: how can i handle a list or array of vectors in geometry nodes?
Thank you for any help!

if you grids have the same number of x/y vertices,  you can connect them like this:

Thanks, the "Field at Index" and Index every second by applying the modulo helped. With indexing you can also calculate the vectors.

You are welcome

The simplest way to create an array of parallel (and equal length) lines is the following:

Extrude the vertices of a grid in one direction with Extrude Mesh.
Remove the excess geometry with Separate Geometry.


text:
How to fix box-projected normal maps?
The Image Texture node offers a box projection mode with optional blending. But the Normal Map node doesn't have a matching mode to allow functioning box-projected tangent space normal maps out of the box. As a result, most surfaces receive wrong light direction.
I have calculated the output normals manually: by taking the input normal map in world space, splitting it into components, and using them as coefficients for normals, tangents and bitangents. It looks correct for surfaces pointed along the XYZ axes, but on oblique angles it's still incorrect. Note the horizontal red lines on the bevelled edge of the middle object - should be pointing right instead.

Could someone check my math please. Or maybe there's an easier way to go about doing this?

I'm not sure if I feel like taking a stab at a full answer-- it's a big job-- but there are a few pieces to the puzzle.  One is that if you want to use box blend, you need to build your own box mapped (triplanar projection) texture lookups, because you're not getting anything remotely usable on a blended normal map lookup.  The other is that I would want to recreate the normal mapping in nodes, which means some base baking incompatibility with Blender (because it uses interpolated vertex normal and tangent, not orthonormal.)

So you're saying setting blending above zero produces nonsense vectors and there's no way around this? It would have to be flat-mapped either way? If that's the case, seems like it might be easier to just build six instances of the same shader rotated for each direction and blend between those. That way at least I won't have to deal with manually doing the normals.

Well, one of the issues is that the blended normals are really two or three different normals with different tangents.  I'm not sure if you'd need to do the normals manually after all, it might work to just rotate them in 90 degree chunks, mix normals by blend weight, then renormalize.

I was hoping blending tangents would compensate for blended normals, but I guess that was wishful thinking. I'm not sure what you mean by rotating in chunks - by that point, don't we just have a vector defined by blending colors "as colors", i.e. nonsense?

Well, if we can get an accurate normal for the +Z face, we can rotate that normal 90 degrees in Y to get an accurate normal for the +X face.  But in any case, I still think that we'd need to do manual normal mapping for the general solution (not just a beveled cube.)  I will probably take a stab at this after all, I guess my curiosity has been aroused, but it will be a while because I've got some other work for right now.

I see. That's sort of what I meant with "shader per side" aproach. And I've actually taken a stab at doing triplanar projection by hand, but haven't touched the normals there. Maybe it would save you some time: https://blend-exchange.com/b/DR6Jpvns/

It's easy!  Just do manual box mapping and manual normal map calculation and then mix the normals by blend factor!

That should be perfectly clear, right?  Right?
So our basic plan here is to lookup our normal map from generated coordinates, depending on the direction of the particular sample's normal, then create three modified normal vectors from those lookups, and then to combine those with weights, on the basis of how much our base normal agrees with our 3 basis object vectors and on an arbitrary, 0-1 blend factor.
Let's go through our node groups.  We'll start with the idea of a triplanar projection, in our "triplanar lookup" node group:

Here, I'm doing three lookups on a texture, using generated coordinates.  Each translates a particular pair of our XYZ coordinates into two UV coordinates.  We'll manage these three lookups separately, by moving on to manual normal mapping, in our "NormalMapNode" node group:

This node group is sent a world-space normal and an arbitrary, object space tangent.  We repair the tangent to be orthogonal to our normal with a pair of cross products and generate a binormal vector in our "repair tangent" node group:

Returning to our NormalMapNode group, each of our lookups is going to be associated with a different object space tangent.  We will remap the normal map color from the 0,1 space to the -1,1 space, then we'll scale our normal, tangent, and binormal vectors by the amounts given to us by our normal map and add those vectors back up to generate a normal in an arbitrary, object space tangent.
We now have three normals for every sample.  We need to know how much of each to use, so lets look at the normDotObj node group:

We start by checking our object space normals against our three object space basis vectors.  To get the same value regardless of which direction the normal is pointing-- eg, to get the same value on +x and -x faces-- we take the absolute value of the dot product.
We'll then use those in our "weightTriplanar" node group to mix with our arbitrary "blend" value.  We want this value to emulate Blender's, so we'll use a 0-1 range, although 0 (and other very low numbers) will be buggy, because division by zero.  (For more work, we could check for very low numbers and have a different path, but I don't think it's necessary, not compared to just living with very tiny amounts of blending.)

We'll move  on to our weightedMix3 node group:

Our weights aren't normalized, so we'll start by normalizing them, so that everything adds up.  To mix three, we're basically multiplying each by its normalized weight and adding them up.
It's okay that we're using color nodes to deal with vectors.  Blender doesn't know the difference.  We can vector math/scale colors, we can mixRGB vectors, it's fine.
At the end, to deal with imprecisions, we do a final normalization operation on our normal and send it into a shader.
There is something to take note of here, which is this is not exactly how Blender computes normals from normal maps.  This treats normals maps as existing in an orthonormal tangent space, whereas Blender does not.  (I know, that's total Greek, but you don't have to understand if you don't want to.)  However, it's better than how Blender computes normals, and it's how almost everybody else computes normals.  If your plan is to normal map from popular texture packs, this normal mapping technique is appropriate, but you will notice differences between this and Blender's default.
It is possible to bake orthonormal normal maps in Blender, despite Blender's defaults, but I don't think it's worth getting into that for this question, where you are most likely interested in using normal maps that were baked as orthonormal to begin with.
Addendum based on comments: Well, I said it was a first draft :)  You're absolutely right that it doesn't handle the negative faces correctly.  That's because the binormal is going the wrong direction for those faces.
Let's fix that by first editing our normDotObj node group to output facing with regards to our basis vecs:

We're checking whether these are positive or negative faces by getting Greater Than 0 before we absolute value the dot product, then we're remapping that to a -1, 1 value: -1 if the values are opposite, 1 if the values are the same direction.
We can then edit our normalMapNode to have an option to flip the binormal from a new Scale input:

We can plug the facing into the scale like so:

After that, our binormals are pointing the right direction on our normal map node.
As for editing three different image texture nodes being cumbersome, I feel that this is the least cumbersome issue here.  This is a complicated structure; we're not really supposed to use normal maps like this.  (We're not really supposed to use normal maps independent of meshes to begin with, but this is the world we've found ourselves in.  Maybe in some parallel world, texture artists are distributing packs with 16bpc .png bump maps rather than normal maps, and it's my own bad karma that landed me in this world.)  However, you can link changes to a texture node by using linked node groups:

Here, I've just put the image texture node into a node group, then duplicated that node group and used it in lieu of the image texture node.  I've also put an unconnected copy into my base node tree.  Now, to change the texture image used, I only have to edit it once, in any instance of those linked groups.  Because they're linked, editing the group affects all instances of that group, changing it everywhere.
Edit 2: Again, you're correct in comments that the +Y face is wrong (backwards tangent.)  Actually, both Y faces are wrong.  I was designing things around the +Y face, but the +Y face is actually pointing in -Y, so we're flipping that tangent instead of the face opposite it.
We can fix this easily just by reversing the sign of our tangent for the +-Y lookups.  Instead of sending that middle normal map node a 1,0,0 tangent, we can send it a -1,0,0 tangent:

In our viewport, we can see a box-blended Suzanne and bevelled, subdivided cube, and a basic cube on the right (well, UVs rotated/scale to provide appropriate tangents) getting the normal map via Blender's basic normal mapping.  I've set the view to display material normals.
Updated file:

Images aren't packed, so you'll have to provide your own normal map.

This will take me some time to fully take in, but on a quick test this currently doesn't handle flipsides correctly (some colors are inverted): https://i.imgur.com/VvOzoGi.png The other three sides seem to be in order though. Ideally of course, one wouldn't have to change three textures deep inside the graph for every material. Maybe feeding in unblended box-projected texture could be a way to avoid that.

You're right about the flipsides.  See edit, including updated file.

I forgot to reply, but in the updated file the green channel is flipped on faces pointing along Y. It's an easy fix, but I'm not 100% sure what the actual reason is.

@chedap Okay, I think I got it now.  The fix broke it :)  Both Y faces were wrong, but they're right now.  Added edit and updated file.

@Nathan that is absolutely brilliant!! Thank you so much for sharing this info and for sharing the shader... it works great! Curious, if one wanted to scale the normal map texture size bigger or smaller, is that possible to do with the current setup? Thanks!

@Nathan Just solved it: simply add a mapping node into the "TextureLookup" Group and connect the "Vector" Group Input into the "Vector" input of the mapping node. This is simply fantastic!!! Thanks again!

As a side note, if the normal map being used features mostly inward "dents" rather than outward "bumps", then in the NormalMapNode Group connected to "color2" of the "weightedMix3" group, the Tangent value in X should be changed to positive 1. :-)