text:
Active material slot
I have 200 material slots. I know how to iterate through them, but I cannot make them active.
for o in bpy.data.objects:
    for m in o.material_slots:
        if "screen" in m.name:
            bpy.ops.mesh.select_similar(type='MATERIAL', threshold=0.01)

But I cannot execute the last operator, as I cannot make them active material.
I have to just select similar materials by name and separate them as a new objects. Unfortunately, I cannot way of selecting textures by name, so I cannot execute select_similar and separate operators.
To be more precise, I have a .obj file. It contains 200 materials. I should separate it into 2 groups, group 1 is wall, and group 2 is furniture. I am able to iterate through material_slots and find certain materials which I need. But I cannot select them in edit mode. I have every material's name, I should select 20 or 30 of them and separate them into new objects.

Hello and welcome. your operator will throw an exception because you did not specify the context https://blender.stackexchange.com/questions/6101/poll-failed-context-incorrect-example-bpy-ops-view3d-background-image-add

I have to just select similar materials by name and seperate them as a new object. Unfortunetly I cannot way of selecting textures by name, so I cannot execute select_similar and seperate operators. I have been stucked for a week.

Do you need the operator or is a bpy.context.object.active_material_index = idx good enough to make the material active? It's not really clear what you are trying to achieve. Select Similar > Material has no threshold, and it looks like it only works in Edit mode. A bit more context on what your goal is would help.

Ok, the threshold is shown in the Python console. But bpy.ops.mesh.select_similar(type='MATERIAL', threshold=0.01) selects all faces with the material that the active face in Edit mode has. So why do you need to loop through all material slots and look for a material with "screen" in the name?

sorry, it is my very first post in forums. To be more precise, I have a .obj file. It contains 200 hundred materials. I should seperate it 2 groups, group1 is wall, group2 is furnitures. I am able to iterate through material_slots and find certain materials which I need. BUT i cannot select them in edit mode. I have every materials name, I should select 20 or 30 of them and seperate into new group.

Don't worry. Welcome :) I think (and hope) what you're looking for is bpy.ops.object.material_slot_select() in addition to the ...active_material_index = idx from the comment above. I'll post a complete script below.

Here is a script that checks the material slots of all mesh objects. If there is the word screen in the material's name then it selects the vertices of this material and checks the next material. After the check, the selection is separated into a new object if there were matches.
I think what you were actually looking for are lines 31 and 32:
31:         bpy.context.object.active_material_index = idx
32:         bpy.ops.object.material_slot_select()

but you also need to select the object to have the correct context (line 21) and do a few other safety checks.
The complete script looks like this:
import bpy

# save objects because the operation 'Separate Selection' creates new objects
objects = set(obj for obj in bpy.data.objects)

# ensure we are in object mode
if bpy.context.active_object.mode != 'OBJECT':
    bpy.ops.object.mode_set(mode='OBJECT', toggle=False)

# clear object selection so the context is correct
bpy.ops.object.select_all(action='DESELECT')

for obj in objects:
    if obj.type != 'MESH':
        print(f"Skipping {obj.name} of type {obj.type}")
        continue

    print(f"Checking materials of {obj.name} ")

    # select object, switch to edit mode & clear vertex selection
    bpy.context.view_layer.objects.active = obj
    bpy.ops.object.editmode_toggle()
    bpy.ops.mesh.select_all(action='DESELECT')

    # check material slots
    found = 0
    for idx, slot in enumerate(obj.material_slots):
        if "screen" in slot.material.name:              #  <-- materials to look for
            print(f"Found material slot #{idx}: {slot.name}")
            # select the material slot, then select all vertices with this material
            bpy.context.object.active_material_index = idx
            bpy.ops.object.material_slot_select()
            found += 1

    # do 'Separate Selection' if we have a selection from at least one match
    if found > 0:
        bpy.ops.mesh.separate(type='SELECTED')

    # switch back to object mode
    bpy.ops.object.editmode_toggle()

Example output for materials with "Blue" in their name:
Checking materials of Cube
Found material slot #1: Ocean Blue
Found material slot #2: Deep Blue
Found material slot #3: Blue Sky
Checking materials of Cylinder
Skipping Camera of type CAMERA
Skipping Light of type LIGHT
Checking materials of Cube default
Checking materials of Sphere
Found material slot #1: Night Blue Sphere

thank you a lot bro, that is exactly what I was searching but couldn`t find in forums and Blender API documentations. Thank you

Hello everybody!
May I ask you about the script from Blunder?
I've tried this script in Blender 3.6 but it leaves me with this error:
File "C:\Program Files\Blender Foundation\Blender 3.6\3.6\scripts\modules\bpy\ops.py", line 113, in call
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Nothing selected
Allthough with print statement I verified in the console, that the correct slot was found:
Checking materials of Plane
Found material slot #1: metal_ornaments_29_55

Mark as Asset

I am trying to to mark the active material slot as an asset! Thx! :-)

Hi there. The "ops.py" is a Blender internal script. I guess the error is more likely in your script ;-) It looks like there is something not selected as expected. It's hard to tell what's wrong without seeing your script. Feel free to post a new question, show your script - or even better an example that causes the error, the full error message including the calls and line numbers, and link this question here so we know what you have done.


text:
How do I link to objects movement with each other?
I want to create like a animation but not a animation, so what I want is whenever I rotate cube number 1 I want number 2 to go in a vertical movement, so when I rotate cube 1 by 360 degree cube 2 should go to a point in a vertical world and come back by the time the cube 1 has done the 360 turn.
Is there any way to solve this? I was thinking about motion linking but don't know how it works. Any help? (:

Hello and welcome to BSE! Have you tried looking into Drivers?

As mentioned in comments, you can use a driver to do that.

1- Select Cube2, right click on its Z coordinate and add a driver.
Open the driver editor window, and
2- Use Cube1 and its Z rotation as source. Name it zAngle
3- Define the formula you want. For instance, abs(sin(zAngle)) will ping pong between 0 and 1 and multiply it with some factor (for instance 10).

thanks very much man solved my problem

hi  me again  there is a slight problem well i am trying to make a engine animation by using this and i want to animate the pistons and as you know piston move in a V shape inwhich x and y axis are moved so how to i rework it to behave i want it to do ?

You can add another driver for another axis.

source: Stack Exchange

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

sort: votes


text:
Problems with the materials when trying to export as FBX mesh
I am a newbie in Blender, and this is the first time I have used UV unwrapping and texture painting. I followed this tutorial: https://www.youtube.com/watch?v=C1CFWDWTamo
for most of the characters, I've used simple materials by changing colors, and for the head some texture painting (for the eyes).
The issue I am facing is when I export the project. Only the texture painting is exported with the mesh but not the materials.
I tried everything I could find on the Internet but with no result.
Here is the project in blender :
Here is the project when exported as FBX :
PS: I've tried to pack the resources; I've exported the FBX file with the texture + the selected objects
Here is my blend file :

Is it the same discussion here? https://projects.blender.org/blender/blender-addons/issues/96538

none of this fixed my problem

The problem is the dot/period (.) in the names of the images.
In Blender, object names must be unique. When you duplicate an object (mesh, bone, image, etc.), Blender adds a dot with an ascending number such as .001 to the name of the copied object to ensure that it's unique.
If you check your images in the Image Editor you will see that you have:

Untitled (that's OK)
Untitled.001 (problematic)
Untitled.002 (disturbing!)
Untitled.003 (troublesome!!)
Untitled.004 (just bad!! ;-)

Those with the dots are bad because when the model is exported the images are saved in files like Untitled.001.png. The "double" file extension is causing the problem and the loading of the images fails when you import the model again. (This should not happen. It might be a bug or an oversight.)
Fix: Simply give the images real names without a dot in the name or with the right file extension (*.png, *.jpg, etc). Something like jacket or jacket.png
While we're on the subject, a few more problems to fix:

the material CHDA D SABRE has an Image Texture node but no selected image. Select one.
the mesh of the model has duplicated vertices. To remove them, select all vertices in Edit mode and M > Merge them By Distance.

thanks a looot for taking time to check my blend file , ill be fixing these issue and be back with an answer

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


text:
Texture Difference EEVEE/Cycles
I am working on this sofa that I downloaded and I am not sure why but while the texture is rendering perfectly in Eevee, it ends up looking weird in Cycles.
Would anyone know why this is the case?
Eevee:

Cycles:

This is the current texture node

Any help is much appreciated :))

Hello, try to recalculate the normals, or maybe it's a normal map problem? Ifit's copyright free, please share the file

Hi thank you so much for your answer! You can find the file here maybe it's easier: https://we.tl/t-AA9NIuqFW7

That Blend file doesn't include any of the texture files so it's difficult to see what's going on. Also several of the nodes in the Shader editor are displayed as 'Undefined' and shown in red both in Blender version 3.65 and 4.0.2. (The normals are correct.)

it looks like a bug of the material, what does it give if you recreate the material from scratch? (remove the current one, create a new one and so on)

Hello and welcome. Please don't write in all caps in the title or body of any posts, it is the written equivalent of shouting, is harder to read and may be considered rude. Please use the [edit] button below the post to change you text into regular case.

The screenshot shows that even in your Blender at least one node shows red and says "Undefined". For which Blender version was this model created? If we would know what the "Undefined" were supposed to do in the compatible version it might be easy to replace them with current nodes


text:
How to select points based on whether they changed their position?
I'd like to mark points, that have changed their position for a geometry node simulation:

My idea to solve this, is to compare the position of the points before moving to their position afterwards. If the position changed, they get a new material to indicate just that.
This doesn't work and I can't make out why
Here is a .blend file with the attempts (and some other stuff):

This is because Set Material node works with the Face domain. Since you have instances, not a mesh, there are no faces to evaluate the comparison on. You can test this by using an Index selection like below. Even though they are all instances, Set Material thinks of the the given indices as face indices:

You can Realize Instances before Set Material to make the setup work, but obviously that might not be desirable. In that case, you might wanna work around the problem by employing a node that can filter instances using your comparison setup; Separate Geometry, for instance:
I'm also using an Index > Modulo 2 for Set Position's Selection, to move only every other cube to better showcase the fitering
Here's an earlier question dealing with an adjacent issue: How to use Geometry Nodes Material Index with Instances?


text:
Why does Blender use so much RAM for a mesh?
I'm noticing when loading a 250mb OBJ file (high resolution mesh), Blender goes from 89mb RAM to around 2.1gb. Loading the same mesh in Preview.app uses around 300mb.
Why is that? Is there a way to reduce usage?
I suspect this is due to Blender using a half-edge (or similar) data structure for loaded meshes. But even so, I'm surprised by the memory usage, given OBJ is a very inefficient text-based format.
Update: following the steps here, I printed out memory usage details:

total memory len: 1077.328 MB
peak memory len: 1077.372 MB
slop memory len: 15.404 MB
 ITEMS TOTAL-MiB AVERAGE-KiB TYPE
 13547 ( 422.624    31.946) Chunk buffer
     1 ( 158.249  162047.156) CDMLoop
     1 ( 118.687  121535.367) CDMEdge
     2 ( 105.500  54015.812) DM_ensure_looptri_data
     2 (  79.125  40511.824) face_nors
     1 (  79.125  81023.578) CDMPoly
     1 (  65.937  67519.648) CDMVert
     2 (  26.375  13503.941) GPUBufferMaterial.polys
     2 (  13.187  6751.980) GPUDrawObject.vert_points

I'm guessing CDMLoop and CDMEdge are part of the mesh data structure, though I'm not sure what Chunk buffers are. Googling and searching the blender repo on github didn't lead to clear results.


text:
Geometry Nodes set subset scale and interpolate others
I'm new to blender and am wondering how I can have n cube geometry nodes in a line where a random subset of x of them are given a random z scale and all others not in that subset have their z scale interpolated based on their neighbors.
I've played around with this for several hours but I have no idea how to only set the z scale on a random subset of x geometry nodes. And from there, I'm not sure how to interpolate others' z scales.
This is what I have so far. Right now, all Geometry Nodes have a random z scale:

Which looks like this:

Are there any specific editor nodes I should be aware of that would help in doing this? I've searched around but haven't found anything useful.
I'm familiar with Python scripting and this seems like it would be easy to do there, so if you have any ideas on how to do this, that would help too. I'm not even sure how to get the references to each node in Python.
EDIT
Ok, so I figured out how to set the scale of a random subset of instances. (I can control the probability of an instance being in this subset, but I couldn't figure out how to get exactly x instances but whatever)

But I still have no idea how to interpolate the scale of the instances between the blue ones. The accumulate field node looks interesting but I'm not having any luck. Any ideas?

Since calculating the heights seems easier in Python, let's combine their strengths by doing that in Python and passing the result as an input to the Geometry Nodes.
The plan:

Use Python to create the grid of points with an attribute representing the desired height.
Use Geometry Nodes to instantiate a cube at each point on the grid, reading the attribute for the instance scale.

Creating the grid
Most of this code is doing the interpolation. You can replace that part with anything you want of course.
import bpy

#### CALCULATE HEIGHTS ####
###########################

def interpolate_list(key_points):
    """
    Create a list by lerping between key points.

    Each keypoint should be a pair (x,y) giving the value y of
    the list at index x. The values at other indices will be
    lerped from the two nearest keypoints.

    The first keypoint must be at x=0. The list will be just
    long enough to fit the last keypoint.

    Keypoints must be sorted by x.
    """
    assert len(key_points) > 0, "Must have at least one keypoint"
    assert key_points[0][0] == 0, "First keypoint must be at zero"

    result = [0] * (key_points[-1][0] + 1)

    # Assign key points
    for key_pt in key_points:
        x, y = key_pt
        result[x] = y

    # Lerp between key points
    for i in range(len(key_points) - 1):
        xa, ya = key_points[i]
        xb, yb = key_points[i + 1]

        for x in range(xa + 1, xb):
            dist = (x - xa) / (xb - xa)
            result[x] = ya + (yb - ya) * dist

    return result

# Replace this with randomly generated points if you like
key_points = [
    (0, 1.0),
    (14, 7.3),
    (35, 5.0),
    (44, 3.3),
    (71, 9.1),
    (89, 2.9),
    (100, 4.0),
]

heights = interpolate_list(key_points)

#### CREATE MESH ####
#####################

def create_line_of_points_mesh(name, num_points, stride):
    """
    Create a mesh object with a line of points along the X axis.
    """
    mesh = bpy.data.meshes.new(name)
    verts = [(stride * i, 0, 0) for i in range(num_points)]
    mesh.from_pydata(verts, [], [])

    ob = bpy.data.objects.new(mesh.name, mesh)
    bpy.context.scene.collection.objects.link(ob)

    # Make new object active and selected
    ob.select_set(True)
    bpy.context.view_layer.objects.active = ob

    return ob

ob = create_line_of_points_mesh(
    name="Mesh",
    num_points=len(heights),
    stride=1,
)

#### ADD HEIGHT ATTRIBUTE ####
##############################

attr = ob.data.attributes.new("height", 'FLOAT', 'POINT')
attr.data.foreach_set("value", heights)

Geometry Nodes
The Geometry Node setup is simple:

And the result:


text:
Why am I getting these random wires in simple 4 cube cut in a large cube, nothing should be overlapping
I am just doing a basic boolean cut of small cube mirrored across x,y axis (4 cuts) in a larger cube.
I can't bevel it afterwards. Why am I getting these additional lines there?

Ultimately I would want to get 3d box insert that looks like this (but beveled a little, no sharp edges):

Blender faces don't support un-connected holes, and the automated Boolean fix  for that doesn't know how to find the most 'desirable' connection, which will vary  from case to case. If the cavities here don't need to be procedural (to be animated, for example), there's no need for a Boolean.

boolean ops are never basic, but just unpredictable depending on what you want to do after that.

hmm, so what would be a better way to cut these holes so I can bevel them on all sharp edges of the entire cube with holes?

I think you already have an answer for that. If it's not enough described for your needs, ask in comments.

For your second question, the boolean is a good solution in that case, maybe use a sphere with less vertices to make the corrections easier

@mrblender007 I have a pure-modelling method, but there are quite a few steps, (Maybe just as easy to clean up after a Boolean) Will post when I can. Further to moonboots suggestion, I think you may find a Round Cube giives you a better match, either way, than a UV Sphere.

Something along these lines?

Subdivide
I Inset all
CtrlB Bevel cross-bars
E extrude panes

.. followed by an EZ extrusion downward of the perimeter,  F to fill, and maybe another inset of the bottom.

difference between explained and unexplained answer... +1

will that method allow me to also cut half of a sphere in the middle of the cross and bevel all sharp edges in the model?

Hi, @mrblender007.. please illustrate in your original question where you would like this half-sphere cavity to be .. :)

@RobinBetts added to original question

@RobinBetts also, the way I attempted to do this with boolean difference, it is not possible to easily clean that up and bevel still?

@lemon isn't his name Robin Bestt?

@moonboots ... I'm staying out of this one, if you don't mind :)

@Robin Betts I agree that my answer was lazy but the initial question was a bit vague so you never know how accurate you need to be   ;)

Booleans often give bad topology, therefore the difficulty to bevel. You need to correct the topology or start your shape from scratch with another method (your shape is rather easy and doesn't need any boolean actually). As for the edges that you are showing, you can't cut a hole without connecting the inner edge loop to the outer edge loop.
For the shape, create these edge loops with some CtrlR:

Then extrude down:

ctrl+r doesn't do anything, and btw would that method also work for cutting out half of a sphere in that box?

@mrblender007: I am sorry to say but asking for "additional" things you didn't ask in your question isn't fair and shouldn't be done. Concentrate only on your question asked. If you have additional question, please open a new post. thx.

@mrblender007 Ctrl+R might not do anything on your object since it can only work with quads, but here it is shown how you should build the object new from scratch. And why your object is problemstic for beveling I explained in my answer to your first question which you seem to ignore.


text:
Image texture on Obj drone file?
I have generated an Obj file from a drone surveying (using DroneDeploy). When I import it to Blender it has materials and textures attached to it. I want to change the areal photo (taken by the drone, and now used as texture) to an image texture that I created in Photoshop. I removed all materials and created a new with an Image Texture as Base Color. But the image gets all scattered and misplaced. See attached image.
Any idea what I'm doing wrong?

What do you mean by "I want to change the areal photo-texture to an image texture."? Do you mean you want to change one image texture to another? Could you edit the question and show us how the textures in question look?

Yes, I want to replace the current texture, which is the aerial image from the drone, with an image created in Photoshop.

The current texture and materials are created automatically during the Obj export from the drone program. And it seems that it's positions is handled by code in both the .obj and .mtl-files (when I look at these files in a text-editor)

Look into UV mapping. You can unwrap or project another UV map that would be more suitable for "handmade" textures .

Ah, ok. Kind of wanted to handle it "automatically", need to do this in several projects so won't be able to do it "by hand" :(

You could provide more information about the issue if you want to get a proper answer. A lot of things can be automated in Blender, but at the moment it is hard to understand what you want to do and why. If you describe it in detail providing examples of generated textures and the ones you want to use instead, some example mesh and describe the full context, it is possible someone might be able to help...


text:
Problem cutting
This crank was made from two cylinders and a cube joined as one piece. I popped in a bevel modifier and applied it, then went to cut a hole in one end.  The hole appeared as expected but the other end of the crank disappeared.

Hello could you please show a screenshot or share the file?

As @moonboots says we either need to see a screenshot (Window > Save Screenshot in Blender) or your blend file shared via https://blend-exchange.com/. It's possible that the normals are inverted on part of your object. Turn on the Face Orientation overlay on the Viewport Overlays menu. If any part of the object is red rather than blue go into Edit mode, Select All and then Shift-N to recalculate the normals.

Could you please share your file before you apply the boolean?


text:
Can't see pose elements when I import the fbx file from Mixamo
I have a problem and it happened for the first time after using Blender for several months.
When I export an animation from Mixamo and I import it into Blender, I see nothing. Even the poses are not showing up.
Do you have any solutions?

Thanks for your help

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

Maybe a simple scale problem, press the Home Key to frame all.


text:
Need help with either globaldict or saving to JSON and recalling the saved info
So I've tried using the globaldict to make int properties persist across different scenes, but it doesn't work no matter how I try.
I've followed many tutorials exactly and to the letter, but in the newest version of UPBGE it just does not work. I tried using logic nodes to call the variable in one scene from an object with a variable on it, save it to a JSON file and tried saving it to globaldict as well.
However when I try to call the saved variable in another scene the console says something like it refuses to import the saved variable to scene without an exception.
I'm so lost. There must be a new way. Please I've asked so many people but they all just ghost me or talk trash. I've looked at the whole you scene is a ship illustration but that is way outdated. I would very much love a video showing how you would do this. Or at the very least a step by step instructions guide. Having variables sent and read in other scenes is absolutely necessary to make any decent game.

Tutorial requests are off-topic. See: https://blender.meta.stackexchange.com/questions/1/what-questions-should-be-definitely-off-topic. I don't think a tutorial is needed for this. If you don't get answers, it is because of the vagueness of the question. There aren't many UPBGE users around, so you should make it as clear and specific as possible if you hope to get any answer. Share the code you have tried. If you get an error message, copy it exactly. Don't know about UPBGE, but you can write to a text file with Python in Blender. See https://www.w3schools.com/python/python_file_write.asp


text:
Are "Scatter Generators" dragging performance down?
I started my Blender journey a week ago, since then I'm trying different generators, addons etc.
Nowadays I try to create simple scene which includes only grass, a rock and some ivy.
For grass I used geoscatter and for ivy I used baga ivy generator. But when I add only a little ivy to the scene, fps going down to 10-11 and rendering only 250 frames with wind animation takes hours (even without ivy generate).
My questions are:

Are there too many faces on the scene?
Using generators for eveything is a bad idea?
What I'm doing wrong?

My PC specs:

Ryzen 5 3600
GTX 1070
16 GB RAM

Here are some screenshots in which you can see faces, fps, statistics etc.;
With ivy:

Without ivy:

"Are "Scatter Generators" dragging performance down?" No, the amount of complex geometry is. Its not that generators are bad per-se, but they can easily add insurmountable amounts of geometry your computer cannot handle. Adding similar complexity through other means would be at least as heavy if not worse. Most good scatter methods have some sort of simplification, like the Proxy system in your screenshot.

I would lower the Max Samples render setting (first screenshot). The default value of 4096 for the final render is very high, especially for older hardware. Try 128 samples for render like Blender 2.x had, and 32 instead of 1024 for viewport rendering.


text:
Reading ShaderNodeHueSaturation color output
I am trying to read the color from an HSV-Node via the scripting api.
This is my material shadernodes tree (simple test scene, no other materials etc). I have confirmed that the HSV node is correctly connected to the "Base Color" input of the Principled BSDF, and changes to the Hue/Saturation/Value sliders change the appearance of the default cube using this material.

Why does this simple test script return [0,0,0] for the color? I expected it to be anything else? It correctly confirms that the color is coming from an input, but the color value (black) seems to be wrong.
I can reproduce the problem in Blender 3.6 and 4.0. Other nodes that output a color also produces 0,0,0,0 as value. Windows 11.
import bpy

# Get the active material
material = bpy.context.active_object.active_material

# Assuming your PrincipledBSDF node is named "Principled BSDF" in the Shader Editor
principled_bsdf_node = material.node_tree.nodes.get("Principled BSDF")

# Get the input node connected to the base_color socket
base_color_source = principled_bsdf_node.inputs['Base Color'].links[0].from_socket

# Check if there's a connected node
if base_color_source:
    # Get the output value from the connected node
    print("getting color via input")
    base_color = list(base_color_source.default_value)
else:
    # If no connected node, use the local color of the PrincipledBSDFWrapper
    print("getting local color")
    base_color = list(principled_bsdf_node.inputs['Base Color'].default_value)

print(f"Base Color of material {material.name}: is {base_color}")

There's no API for reading the computed value of a socket. In this particular case it makes sense since your node is a pure function with fixed inputs. But in general it only makes sense in the context of executing the entire shader with all of its inputs, which is only done as part of the render engine, and can't be done "standalone".

You can only read the "default value" of the shader node, you can't access the value at runtime. What you may want to do is bake the values to a texture and then read the color values. Beware of color transform if you do that


text:
Issue with automated slicing on triangulated mesh
My goal is to obtain the profile of an triangulated mesh through a cutting plane

I have a script that automatically applies a Solidify modifier (without which it won't work) and then a Boolean modifier. It works well when I add a plane and scale it only on the X/Y axes.
import bpy

# duplicate selected object in active scne
obj = bpy.context.active_object
new_obj = obj.copy()
new_obj.data = obj.data.copy()
bpy.context.scene.collection.objects.link(new_obj)

# Hide original object
obj.hide_set(True)

# 1 modifier solidify
solidify_mod = new_obj.modifiers.new(name="Solidify", type='SOLIDIFY')
solidify_mod.thickness = 0.001

# 2 modifier boolean
bool_mod = new_obj.modifiers.new(name="Intersection", type='BOOLEAN')
bool_mod.operation = 'INTERSECT'
bool_mod.solver = 'FAST'

# Plane as target for boolean
plane = bpy.data.objects['Plane']
bool_mod.object = plane

# Hide plane
plane.hide_set(True)

# Apply solidify
bpy.context.view_layer.objects.active = new_obj
bpy.ops.object.mode_set(mode='OBJECT')
new_obj.select_set(True)
bpy.ops.object.modifier_apply(modifier="Solidify")

# Apply boolean
bpy.context.view_layer.objects.active = new_obj
bpy.ops.object.mode_set(mode='OBJECT')
new_obj.select_set(True)
bpy.ops.object.modifier_apply(modifier="Intersection")

# Convert Grease epencil
bpy.ops.object.convert(target='GPENCIL')
bpy.context.object.data.layers["Cube_001_Lines"].line_change = -20

But if I rotate the plane, it no longer works: the object is only partially cut. Applying transform to the plane or the object does not work either. I'm looking for some clues to understand where this problem comes from and how to fix it.
I know that there is the bisect tool for this, but I am looking to achieve the same result without entering edit mode and in an automated way.

Does the slices need to have a thickness?

You can use bmesh bisect operation instead of a boolean. All is commented below.
import bpy
import bmesh
from mathutils import Matrix

plane = bpy.data.objects['Plane']

object = bpy.context.object

depsgraph = bpy.context.evaluated_depsgraph_get()

# convert the object to a bmesh
bm = bmesh.new()
bm.from_object(object, depsgraph)

# the plane in the object coordinates
mat = object.matrix_world.inverted() @ plane.matrix_world
plane_co = mat @ plane.data.vertices[0].co
plane_no = mat @ plane.data.polygons[0].normal

# bisect the mesh with the plane
result = bmesh.ops.bisect_plane(bm,
            geom=bm.verts[:] + bm.edges[:] + bm.faces[:],
            plane_co=plane_co,
            plane_no=plane_no)

# get the cut part
cut = result.get('geom_cut')

# translate the indices of the result so that vertex indices start from 0
# (cut result have its indices in the whole mesh object)
index_map = dict()
verts = []
for i, v in enumerate((v for v in cut if type(v) == bmesh.types.BMVert)):
    index_map[v.index] = i
    verts.append(v.co)

edges = []
for i, e in enumerate(e for e in cut if type(e) == bmesh.types.BMEdge):
    edges.append((index_map[e.verts[0].index], index_map[e.verts[1].index]))

# create a mesh with these vertices and edges
cut_mesh = bpy.data.meshes.new('cut')
cut_mesh.from_pydata(verts, edges, [])
cut_obj = bpy.data.objects.new('cut', cut_mesh)
cut_obj.matrix_world = Matrix(object.matrix_world) # the cut in the same space as the original
bpy.context.collection.objects.link(cut_obj)

Resulting cut on Suzanne (poor Suzanne...).


text:
Seams to Sewing
I need assistance with exporting a sewing pattern from a 3D model in Blender. I've used the 'Seams to Sewing pattern' add-on, which exports an SVG file with markers. However, these markers are color-matching ticks, making it challenging to work with many panels. Is there a way to export a UV map with numbered labels or recommend an alternative add-on or script for this task?
Here is what seams to sewing pattern exports as a SVG.

Here is what I'd like to accomplish.

I don't know, but a possibility is to ask the addon's developer ;)

Another user, Misslin Quentin, has added the numbers that you are looking for. The original author of the add-on seems to be not so active lately because the merge request for the changes is still pending. But you can download the updated version here: https://gitlab.com/qmisslin/blender-seams-to-sewing-pattern/-/archive/master/blender-seams-to-sewing-pattern-master.zip  - project site is: https://gitlab.com/qmisslin/blender-seams-to-sewing-pattern

[2] make sure the UV islands have a margin for the numbers. They are added on the outside.


text:
Can't see any object added in render view using Fspy
I have added an object into the scene using the Fspy camera but when I switch to render view I can't see any object but only the image of the Fspy camera.
Also when I try to render an image just to check, everything is transparent.
Can someone please help me out?

Ask the author(s) of Fspy or on a forum that supports it? - Please don't ask questions in all-bold text in future!

It would be helpful to see your scene. Can you share the blend file? There can be many reasons why you do not see the objects. Camera clipping, objects are disabled for rendering, transparent shader, holdout option is enabled, messed up compositor settings, ...


text:
I can't attach the head to the body
I have been struggling for a long time, I can't attach the head to the body. I have tried many things, but it still looks crooked. Help, good people! I would be very grateful if you could help, here is a link to the file.

Please give us more details. What do you want to do with the model? Is it just a pose or an animation or a 3D print? Do you want to paint/texture it?

hi, i want to attach the head to the body so that there are no seams, since i will print it on a 3D printer later

First thing you gotta do is get the two parts matching a bit closer in terms of geo density. The top one is way too high-res right now.

A decimate modifier set to .1 worked for me.

Then get rid of this part. I just select these faces and then alternate between "Select > Linked Flat Faces" and Ctrl + NumpadPlus to quickly get this section selected and deleted.

Then use your knife tool to cut a line across to remove this bit, it's kind of in the way and awkward.

Then just press V to rip it out, then L to select that linked piece and delete it.

Then i select the boundary loops, to get that loop selected quickly. Looks like there's some other non-manifold geometry you'll need to figure out later, deselect that.

Then do a Ctrl+NumpadPlus a couple times to increase this selection, then merge by distance to clean up the random small verts lingering around. Use a high-ish distance value to really hammer em down. (I also used Ctrl+A to apply scale)

You'll prolly want to go back through and manually clean up random stuff like this that didn't get caught by the weld.

After Alt+C to collapse verts.

Also get rid of these weird stretched edges.

After that I run LoopTools > Relax on the boundary edge to smooth it out.

After that you Ctrl+J to join the objects, then select those edge loops and bridge them.

It's gonna be janky right off the bat, so we need to go into sculpt mode to clean it up. This is one of the times you want to use DynTopo, use these settings:

Set the strength to zero and brush around to add in geo where needed.

After that it's just good old 3D Artistry, smooth it out, use the crease/pinch brush to sculpt it together and make them look more natural.
Final Result:

Thank you very much. This is a great method, easier than it looks. Thanks again!

@Independer Glad I could help! Alot of times it do be like that. When in doubt, model it out.


text:
How do I place these brick meshes onto this wall, so that they're all lined up correctly instead of scrambled together?
I'm trying to create a chimney, so I went with using geometry nodes to add a brick object onto a large cube. I want to hold onto the existing cube so that I could still make a textured wall, but I just want to add bricks on top of it to add some layers to the whole thing, more detail. The bricks are currently all randomly placed, some overlapping each other, the whole thing's a mess. How do I make them stick to the surface and not overlap?

Doesn't a "brick texture" work? It can be used both in shading and in geometry nodes

There is only one brick to duplicate to cover the large cube ? Or do you expect some randomness ?


text:
Quads acting as black or white pixels

Hello, I'm trying to figure out a way for quad mesh to act as black or white pixels. In short, I won't to be able to put UV wrap a black and white image texture on an object with this kind of mesh and have a shader that would pixelate it by making quads in mesh black or white.
The example image I achieved by manualy applying black or white (in this case yellow) material onto faces, which is obviously too tedious and rules out a potential for animated textures that I would like to achieve later on with this effect.
Is this doable?
Thank You.

You want all faces to have a solid color, looked up from a single point on a texture?  The main thing is that the faces have to have 0-area UV.  The easiest way to achieve this is by using a geometry nodes modifier:

I capture the face UV (the average of its face-corners) and output it as a face-corner attribute.  I then look up the texture using "closest" mode rather than with linear filtering.
If I apply this modifier and then convert the attribute back into regular UV, I can see exactly what it did:

Just shrunk all the faces to 0-area.  Which you could do manually, but would be tedious, since "individual origins" pivot point sees the whole island as an individual origin.
If the issue is that the texture input isn't black and white, we can do some shader modifications:

RGB->BW will convert the color to grayscale.  Math/greater than will establish a single threshold, to convert any gray values to either black or white, depending on where we set that threshold.  If you want grayscale, use RGB->BW.  If you want black and white, you don't need that node, just the "greater than"; it will do the BW conversion implicitly.

Thanks so much, never worked with geometry nodes before so it was a bit tricky for me, but it works perfectly when set up!


text:
Accidental "Transparent" Render
Basically, what happened was I tried to make A Five Nights at Freddy's animation. I finished it, then I tried to render it. Some objects and textures were 'transparent' and others weren't for some reason.
This is how the animation came out:

Hopefully, someone can help me with this weird problem.
I made probably 3 to 5 animations and they all came out like this.
Blender Version: 3.6.5
PC Specs: Lenovo 300e 2nd Gen Chromebook

Sorry it is a common problem currently integrated Ai into blender, that sees Fredy as conflict operation at any Lenovo hardware. For more info share your file https://blend-exchange.com/ (simpplify your file, keep just one object that still generates the issue).

@FnAfBlendurMAUn Nothing.  It just lets people download the file you uploaded so they can look at it.  Your local copy on your computer will not be messed with.

I can't reproducce your issue on my side https://imgur.com/QRe6K6R ... have you tried to rendeer file you shared with us?

Officially, Blender requires either Windows, MacOS or Linux. And other things. Blender System Requirements. How are you even able to use Blender on that Chromebook? I would suspect this issue to be inappropriate hardware

Even if you can enable the linux developer environment, ARM isn't officially supported by Blender, and you have other areas lacking in your hardware, so I wouldn't exclude the possibility of a compatibility issue.

I tried your file on different versions, and I got this result. But even just from the viewport and outliner, your scene doesn't seem nearly the same as your screenshot. Do we have the same scene?

no but its ok. i just had to delete the Main Map. and keep the Model. do u mind deleting our previous comments since i kinda figured it out?


text:
Can modifiers such as "Subdivision" and "Array" be "animated"?
Suppose I wanted to animate an object growing out of the ground, or turning from a cube to a much smoother shape, could I animate this using modifiers and key frames?
I know I can use shape keys to achieve something similar, but modifiers would make it easier and smoother. Is this possible?

Jonathan's answer is correct. However, your original question states:

I know I can use shape keys to achieve something similar, but modifiers would make it easier and smoother.

(emphasis mine)
In fact, properties that can only have integer values (i.e., no decimals) can only be animated with constant interpolation:

This is, by any definition, the exact opposite of smooth.
If you really want it to be smooth, consider using a shape key!

Subdivide your mesh however many times you want in Edit Mode.
Add a shape key.
Press Smooth Vertex in the toolbox and adjust the iteration count (10 works well for two levels of subdivision).
Animate the shape key.

This will get you a nice Beziér (or linear, if you prefer) interpolation:

I've prepared a video to demonstrate the difference. The first part of the video uses the shape key method, while the second part uses a modifier with the "Levels" property animated.

Thanks for setting me straight there. I realize I was wrong about that one.

You sure can! You can animate any of the values in the modifiers by Right Clicking on the field and choosing Insert Keyframe. Then insert another frame further down the timeline where you wish.

You can also insert keyframes from a value by hovering your mouse on it and pressing I, or you can remove keyframes on the current frame by pressing Alt + I.

Drivers can also be used to interactively animate Modifiers.
You right click on the Subdivision parameter that needs to be driven, add a driver and then in the Graph Editors 'Drivers' view, set up the drivers.
As you can see below, the z translation of two different empty objects is used to drive the modifier subsurf levels of two mesh objects. Only the viewport display levels are being driven. The Z location is stored in a driver variable and ten its absolute value is passed to a ceiling function so that only positive integers are generated. The ceil and abs functions are part of the math module that is automatically imported into the driver namespace.

You can also access scene data like the current frame number like so for creating driver expressions
context.scene.frame_current
Reference: https://docs.blender.org/manual/en/latest/animation/drivers/index.html#drivers

By the way, in drivers, you can just use frame for the frame number.

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


text:
Are there any non-standard meta objects available?
I recently started playing with Meta objects again after all these years of using Blender and largely ignoring them. However, I find the available types to be extremely limited.
Are there any others available as addons, similar to how there are addons that add various mesh primitives?

No, and adding new meta-ball types to the existing system can't be done using python/addons.
(unless you count composing shapes from many metaballs).

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


text:
Should a text object start with 9 users?
I am using the 2.77rc2.
I just added a new text mesh and the font option each have 9 users.

Is this normal, or should this be reported as a bug?
It seems weird because adding any other object, the object starts with only one user. (itself)

I get 5.  My guess is the  UI uses Bfont, which is why it is disabled and also can't be removed.  Any other loaded  font and it works as expected.

Upvoted for the absurdity. :-)


text:
How to know what vertices need split according to normals?
I'm trying to implement addon that will show the real vertex count.
But i can't understand how to decide what vertices to count and which not to count.
I create new mesh, triangulate it and then do
calc_normals
calc_normals_split
calc_tessface

so i think after this i have all the required info somewhere in mesh data. in polygons.normals or tessface.normals i dunno..
Appeared that i lack knowledge about low level 3d graphics.
As a test i'm using this thingy:

It has 42 triangles, 240 total vertices (if all the faces would be flat-shaded) and 146 vertices when it has half of the faces smoothed.
I tried checking use_smooth variable on polygons and tessfaces, but it always returns True.
Could someone advice where to look? Or may be there is already such addon?
UPD:
found interesting thing:

here vertex-per-face normals of flat-shaded face represented by 5 lines, and for smooth-shaded face by single line.
i thought that i could get this info from split-normals of tessfaces, but failed. normals having 0.0 are 315, which divided by 3 is 105. if i substact 105 from 240 i will get only 35, but i need 146.
so where can i get these zero normals, that are shown by single line?

Actually i've managed to write the addon: https://github.com/curly-brace/Blender-Vertex-Counter

What do you need these numbers for? The values as calculated by blender feel very real to me.


text:
Merge multiple fbx animations into single rig
I have a bunch of fbx files, that contain only rig and one animation. I need to make a single file out of them, but i don't know how.
I have an idea about exporting animation data from blender from each of these files and then import it into timeline or dope sheet. But i've found no way doing this.
What can i do to have all those animations on single armature? The hierarchy is identical in each file tho.
EDIT: I've tried appending Actions from saved .blend file. It worked, but had a strange effect. Legs moved awkward. Seems like interpolation issue, but changing interpolation made completely no effect..
here is a post with gifs https://i.sstatic.net/zJGAk.jpg

Just for reference: in case someone stumble upon this question, I have solved it with custom python script


text:
Fix angle between two bones
Is there any way to keep the angle between two bones fixed?
Here is what I am trying to do. I got an armature consisting of three bones. I IK constrained the tail bone to a dummy and when I move the parent bone, the armature should move in a way that the angle between the middle bone and the tail is fixed. I have tried all kinds of tricky stuff, but couldn't get it work.
Here is what I mean (sorry for the annoying logo!).
Basically, I need the angle between the black bone and yellow bone preserved. It is possible whenever the parent bone (blue) and the IK bone (yellow) rotate "more" so to speak. I mean, it's possible mechanically.

can you use one single bone for the middle and the tail? From the looks of the object, it really is only one piece.

Maybe, I am using the terminology wrong, but from my perspective a bone is linear piece of an armature. There are three bones in my situation.

If you never want that portion of the object to bend, you can treat the whole part as one bone ... regardless of it's shape. So take out the bone you don't need and simplify the rig.

@hawkenfox Ok. I need this configuration of the bones. I bind an object to the IK bone and I need it move in the said manner.

@ValerySaharov You only need this configuration if those 2 bones (black and yellow) will ever move/rotate/scale against each other. Do they? Do you need the joint in there? If yes I'll write a solution for you but if no just use single bone there.

@Jerryno I need the angle between the black and yellow bone to be fixed as if the black and yellow bones were a rigid construction. The tail of the yellow bone is connected to a hinge. There should another hinge between the blue and black bones. When I move the blue bone horizontally, the part consisting of the black and yellow bones as a whole needs to rotate around the hinge marked by a square on the picture.

@ValerySaharov So if black and yellow bones are a rigid construction then use only 1 bone for them. Parent both your rigid pieces (that you currently represent with black and yellow) to this bone. You don't need 2 bones there.

@Jerryno Imagine if this construction is a planar mechanism with two hinges -- one at the empy cube, and another -- at the connection of the blue bone to the black one; and a horizontal slider. If you make the black and yellow bones to one, you don't get the right rotation.

If you don't want to substitute both bones with just one:
Select the Yellow bone and under Inverse Kinematics enable all the locks:

Now it's a rigid piece:

Exactly! For some reason, I've tried the same with the black bone and it didn't work. Seems to be not so intuitive as to why exactly the yellow bone's rotation needs to be locked.

Move the IK object one parent down the line.

Here is the blend file.

In IK rigging terms, it's the IK object that animator work with. The
  other bones "reacts" to the movement of the IK object. You will often
  find that when animator work on an IK rig, they hide all the bones
  that aren't IK object ... simple because they don't directly interact/transform them.

It would be what I need, if arm.lower's tail were fixed as in my picture.

I need it to do what it does on my picture when I move the blue bone horizontally, not the IK object.

The moved IK target has different rotation origin and the constraint solution does not affect IK rotations - only Pose rotations - so that does not work at all, the constraint is redundant there.

I agree with your remark. I just omitted another IK that should have been at the blue bone's head


text:
Smoothing animation loop
I have an animation and i'm trying to make it loop perfectly, but you can clearly see the "jump" from the last to the first frame. My last and first frame are exactly the same, and i tried to set to the last framse -1 but you still can see the jump. I'm doing it in 30fps and i don't know how to fix this.
I've read about the graphe editor but i don't understand anything in there... Here's a pic of my graph

What do i have to do here? It's not very readable as a graph. I've clicked normalize to get this view, cause with normalize unchecked it's even worse
EDIT: Forget it please, i actually changed my starting position.
For those animating a tail. If it's a waving tail, you need to start with tail set to the most left/right position and end in the same position. My mistake was that i start with my tail in the middle.

any .blend file you can attach with the question so we can take alook at the problem without assumptions? Use http://blend-exchange.giantcowfilms.com/ to upload a simplified version of your .blend file.

@hawkenfox I don't think giving everyone my blend file is a good idea

Then it's your call , problems get solved much faster that way. With text there is not much to go on. It would help to see the animation in action along with the curve.

You can delete the files content and just represent a simple .blend and thats how most of use do it anyways. No need to pass on the whole project file to someone if you don't have to.


text:
Retopology, am I doing it right?
I've read somewhere that quads are used a lot in games. An as i sculpted my model it was triangulated by default. Then i used a tool (meshlab) to get a low poly model. I ended up with a 6.7k verts model but everything were tirangles. Since then i found out it's better to use quads and learned about retopology.I found a lot of images on google but I don't know if i'm doing it right. Some google models have very few polygons and some a lot more so i'm asking here. Here's an image of my retopology process so far:

It's only a part of the head and there are already 677 verts. My meshlab model had 6.7. So i think that i will end up with having more verts with retopology than with meshlab. So here's my question. Does this looks right to you or i'm doing something wrong?
Thanks
UPDATE Progress:

The mesh is a bit dense in parts of the nose(?). If this is for a game you should have some approximate target vert count in mind so that you don't exceed that and find out performance is laggy and have to re-retopo. I would go way more low-poly than that, and then SubDiv+Shrinkwrap it to the original sculpt. What you have is a good starting point. Try to Dissolve some of those edge loops. You can use Shrinkwrap and Multires in a way that you can create multiple versions of the mesh at different densities.

Also, Select All and Recalculate Normals (Ctrl N) once in a while. Half your face normals are flipped - that's why you have dark areas, and they will probably cause problems with Shrinkwrap if you leave them like that.

@Mentalist I don't really know how to fix this, The edges around nostrils are spitting to cover more face a bit further so i don't know what to do to get less polygones at the nostrils area. I also have the same problem with ears. Since i need quads i don''t know what to do to keep quads and less faces in that kind of situations :(

The best thing to do is keep it simple. You have a lot of verts there. Might be okay for producing renders, but for a game it's too dense. And the best way to keep it simple, in my opinion, is to box model around it and then SubSurf+Shrinkwrap that box model. Pay attention to the edge flow, but do keep it simple.

I've made an example, from your screen shot, of approximately the level of detail I would start with. Let SubSurf+Shrinkwrap fill in the rest. Save As before you apply modifiers - you will want to retain a copy of the original low-poly retopo mesh if you plan to Reshape into a Multires Modifier.


text:
Rotating a water wheel
I have this problem:
I'm trying to make a water wheel rotation but i can't render it smoothly,
I've tried rotating it by 45/90/180° and it always have thise freeze from last frame to the first frame. Ending at the last-1 frame doesn't help much. And rotating by 360° doesn't help either cause it just doesn't turn, stays at the same position. I've tried different end frames like 30 or 60 frames for 30-60fps but it doesn't change much either.
Here's a gif of what it looks like when it turn 45° in 30frames

The end of the gif is just a buggy gid it doesn't do that in blender.
Thank you

When only you animate frame 1 to 60, it means that it will not start at frame 1 with full speed and it will not end at frame 60 with full speed, butthe motion will get faster in the beginning and slower in the end. Go to Graph Editor and look how the rotation-curve is getting steeper.
To counter that you can start the animation earlier and end later. Or you manipulate the development of the roation in den Graph Editor, making it a constant movement.

Oh woa thanks, I followed your graph and it worked.


text:
GPU and CPU volumetric render noise discrepancy
Below are a couple of images comparing quite a big discrepancy between GPU and CPU volumetric noise.
Same settings, much more noise on the GPU render!
Has anyone else experienced this?
The GPU must have a harder time clearing the noise for some reason at same Sample size..

The original images are on Google Drive.

I had the same problem. Without using any denoising, and while using volumetrics, CPU rendering resulted in less noise in lower samples. Without using volumetrics the difference disappeared. CPU-i5-9400f
GPU-r9 380

There are some differences between CPU and GPU rendered images. Some have been fixed in 2.78, some have not. Maybe later. You can do nothing about this.
Only one recommendation: use what works better in your case and don't combine CPU and GPU rendering for animation. :-)
Blender 2.78 bugs fixes


text:
How works Principled Volume?
I created a Geometry Nodes (GN) node tree that simulates the smoke trail from a missile.
The simulation of fire from the nozzle is done with emission, which is limited by a gradient. Its position is linked to the missile, which moves with the constraint Follow Path along the same curve on which the smoke is "pulled".
Then I wanted to get rid of constraint, so I joined the geometry of the missile with the smoke, stored the position of the missile to the attribute, and used it in shader nodes. But when I turn the smoke mesh into a volumetric, the attribute is "nulled", because you can't write an attribute on a volumetric.
Here the question arises - how do shader nodes calculate the missile position for volume and is it possible to repeat it somehow with GN?

("Missile pos" empty created for fast switch between attribute and "old" shader in shader nodes)

I don't know how to solve it actually, but I guess the problem here is the attribute data you want to store has to be stored somewhere in the geometry. In the Store Named Attribute you have several domains to choose from: Point, Edge, Face, Face Corner, Spline and Instance. But the Geometry you plug in there to store the data is a Volume Grid. Which means, there is no geometry on which you store the information and therefore you cannot read it with an Attribute node in the shader.

...so actually the title of your question is very misleading. It has nothing to do with how the Principled Volume shader works, more with how attributes are stored in Geometry Nodes.

I wrote that I understand that the shader breaks because the attribute cannot be written to the volume field. And my question is directly related to the topic title. How does Principled Volume work, how does it calculate gradient position if volume cannot have an attribute? Or blender developers just forgot to add volume type to store attribute node, and actually volume has attributes? Because otherwise how does texture coordinate calculate gradient for volume?

A volume grid in Geometry Nodes is as the name says, a grid. You define the resolution etc. similar as you have to define a resolution for a smoke simulation for example. You define voxels in which density information is stored. Shaders (not only the Principled Volume) work different. A simple linear gradient for example can go from 0 at the left to 1 at the right side. You can zoom in anywhere inbetween and it goes seamless from black to white (mathematically speaking, limited only by the capabilities of the colorspace and/or float precision). Voxels are discrete locations, not functions.


text:
Scripting For Production Setup
I am currently setting up a pipeline to simplify my 3D production. During linking layers for compositing I find it difficult each time to link the separate passes to the desired output. Is there an easy way to do this?
I currently use a blend file with already set up group nodes in it for the different layers. One for all beauty passes, one for all utility passes, crypto, etc. But how do I go about linking them faster?
And secondly, is it possible to set it up in a way so that what viewlayer we have set up in the current is what name would appear on the rendered image sequence? For example, in Substance Painter, there are tokens that correctly follow the object name and the type of map it exports when rendering. I'm looking for a method like that.
Any help would be appreciated!

Maybe your are looking for this addon.


text:
Script to import coordinates from CSV and create a bezier curve with control points
I am trying to import Bezier curves from CSV into Blender using a script. In this question I could find the solution, but without importing the coordinates of the control points but only the coordinates of the actual points.
So I'm trying to customise this script so that it also imports the control points from the CSV, but I'm doing something wrong so that it applies the coordinates of the last control points from the CSV to all points.
What am I doing wrong? Many thanks in advance!
import bpy, csv

csv_filepath= "C:\PathTests\PathPoints.csv" # replace with a real path

# read all control points from csv file
with open(csv_filepath) as csv_file: # work with the opened file

    # first read the complete file (we need to know the amount of points)
    csv_reader = csv.reader(csv_file, delimiter=',')

    control_points = []
    for idx, row in enumerate(csv_reader):
        if idx != 0: # ignore csv header
            PointX = float(row[0])
            PointY = float(row[1])
            PointZ = float(row[2])
            PointC1_X = float(row[3]) #Handle Left
            PointC1_Y = float(row[4])
            PointC1_Z = float(row[5])
            PointC2_X = float(row[6]) #Handle Right
            PointC2_Y = float(row[7])
            PointC2_Z = float(row[8])

            control_points.append((PointX, PointY, PointZ))

    # create bezier curve and add enough control points to it
    bpy.ops.curve.primitive_bezier_curve_add()
    curve = bpy.context.active_object
    bez_points = curve.data.splines[0].bezier_points

    # note: a created bezier curve has already 2 control points
    bez_points.add(len(control_points) - 2)

    # now copy the csv data
    for i in range(len(control_points)):
        bez_points[i].co = control_points[i]
        bez_points[i].handle_left_type  = 'FREE'
        bez_points[i].handle_right_type = 'FREE'

        # just for illustration (screenshot),
        # add your correct handle locations here
        bez_points[i].handle_left  = ((PointC1_X, PointC1_Y, PointC1_Z))
        bez_points[i].handle_right = ((PointC2_X, PointC2_Y, PointC2_Z))

You read the data but you save only (PointX, PointY, PointZ) in the list control_points, see line 25:             control_points.append((PointX, PointY, PointZ)).
The data in the variables PointC1_X, ..., PointC2_Z is completely ignored.
Later, you set the handles, see the last 2 lines. Here you use the variables PointC1_X, ..., PointC2_Z , but they only contain the last data line read.
To fix this, you need to save the data for each control point, including the data for the handles, and use it when creating the curve:
import bpy, csv

csv_filepath= "C:\PathTests\PathPoints.csv" # replace with a real path

# read all control points from csv file
with open(csv_filepath) as csv_file: # work with the opened file

    # first read the complete file (we need to know the amount of points)
    csv_reader = csv.reader(csv_file, delimiter=',')

    curve_data = { "control_points": [], "handle_left": [], "handle_right": [] }
    for idx, row in enumerate(csv_reader):
        if idx != 0: # ignore csv header
            PointX = float(row[0])
            PointY = float(row[1])
            PointZ = float(row[2])
            PointC1_X = float(row[3]) #Handle Left
            PointC1_Y = float(row[4])
            PointC1_Z = float(row[5])
            PointC2_X = float(row[6]) #Handle Right
            PointC2_Y = float(row[7])
            PointC2_Z = float(row[8])

            # save the curve data (control points and the handles)
            curve_data["control_points"].append((PointX, PointY, PointZ))
            curve_data["handle_left"].append((PointC1_X, PointC1_Y, PointC1_Z))
            curve_data["handle_right"].append((PointC2_X, PointC2_Y, PointC2_Z))

    # create bezier curve and add enough control points to it
    bpy.ops.curve.primitive_bezier_curve_add()
    curve = bpy.context.active_object
    bez_points = curve.data.splines[0].bezier_points

    num_control_points = len(curve_data["control_points"])

    # note: a created bezier curve has already 2 control points
    bez_points.add(num_control_points - 2)

    # now copy the csv data
    for i in range(num_control_points):
        bez_points[i].co = curve_data["control_points"][i]
        bez_points[i].handle_left_type  = 'FREE'
        bez_points[i].handle_right_type = 'FREE'

        # set the handle coordinates
        bez_points[i].handle_left  = curve_data["handle_left"][i]
        bez_points[i].handle_right = curve_data["handle_right"][i]

Test data in C:\PathTests\PathPoints.csv:
# control point , handle left ,  handle right
-1.0, 0.0, 0.0,    -1.5, -0.5, 0.0,   -0.5, 0.5, 0.0
 1.0, 0.0, 0.0,    0.7784550189971924, 0.9751465320587158, 0.0,   2.0, -4.40157413482666, 0.0

Thank you so much!!


text:
How to deal with one material is lighted up while baking indirect lighting in eevee and it does not have any shadows on object
I'm making an interior scene in eevee.
I need to bake indirect lighting to get better shadows, but i'm eneding up that scene in general looks too dark, while upholstery material looks too light.

If i'm increasing exporsure, sofa gets overlighted
Also, my sofa is animated, so I've applied Irradiance Volume only on static objects (room itself)
I'm using poliigon materials for that scene, but I have been using it for a while already, for similar scenes, and I hadn't had any issues
Does someone have any ideas how to solve this?
That would be a great pleasure to fing a solution

Hello and welcome. Look into portals to increase light from HDRI coming into the scene.

Hello! Thank you so much for you respond! I found out that world color was too dark and I changed it to just white and low strenght. That's kind of the same you're writing about. Thank you!


text:
Light not rendering at all
*Disclaimer: complete beginner to blender.
So i'm trying to render some text, but when I add a point light my render ignores it (on both cycles and eevee). I gave my text glossy material, and my point light is at 3000W and close enough to the text that it should show up pretty well. What am I doing wrong?
*Additional detail I thought may be important: light doesn't show any nodes in compositor, but other than that I believe my light's properties are correct.
Here's my blend file:

https://meta.stackexchange.com/questions/75491/how-to-upload-an-image-to-a-post

Hi Skloggy, welcome to SE. Being a complete beginner is totally ok - but...we need some basic informations what you did and we don't have those. Since you are a beginner i would recommend providing your blend file, so we don't have to ask you or guess around what might be the reason and there could be 10+ reasons for this. You can provide your blend file by opening this: https://blend-exchange.com/ and follow instructions.

Are you sure that your lights are enabled for render (check the Outliner)


text:
How to get PoseBone local axis direction vectors in world space?
To get a bone's local Y direction vector in world space all I have to do is: PoseBone.tail - PoseBone.head
Now what is the formula to also get X and Z direction vectors?

Turns out there’s already a variable for that in PoseBone called x_axis, y_axis, z_axis.


text:
Appearance of Black Line Under My Donut Like A Shadow (photo attached)
This is the image with the black lining under my icing:

I rendered this with Cycles. What have I done wrong? I used the Solidify modifier on my icing and a Subsurf modifier.

Is it ok. I was thinking every time that it was wrong.

sorry for disturbance but how can i fix it

please reply fast

As far as I can see, that's just your lighting. Maybe post the .blend on a site like Blend-Exchange? All I can see in the picture is a shadow made by a the top half being a little bigger than the bottom. :/


text:
My Camera Width is Blocked
I Was following one of the tutorials of Blender Guru and I think I have done some mistake that my camera has became like this.

Render tab settings

i think mistake is here

please help me i am a absolute beginner

how can i is it in render tab

You should change your render resolution.

It can be found in the properties panel (the right-side one) under the render tab (the first one with the camera icon).
If that doesn't work, try changing the Aspect Ratio.

i tried it but it is not working

Can you post an image of your render tab?

Try changing the Aspect Ratio. It's just below the resolution.

added a image of my render tab

please provide a solution

when i am opening a new file it is fine but when im working on this file its always thin

Change the X and Y Aspect Ratio (can be found below the resolution) to 1

i tried it but nothing happened

camera just went a little bit more big

i am posting one more image tell me what have i done wrong

Your current X and Y aspect ratios are 1:200 which is not proportional. It means that the Y axis of your camera is 200 times bigger than your X axis and this is certainly not you want.

i posted a image

and can you tell me aspect ratio what to set

As told earlier, set X and Y aspect Ratios to 1 and set the resolution as per the quality of the image you want. I would suggest to set the image resolution to 1920x1080 if you want an HD image.

I've updated my answer with another image. Check that out.


text:
object rotation and alignment to a face in another objects
I want to rotate the Plane which I called face1 in the image attached to align with face2 in the cube. I want to do this in python. I tried several times using the normal of face 2 but did not work. I created vectors using vertices of face 2 but did not work. I don't know what I am doing wrong.
I want to align the two faces with all tangential axes, not only a vector. It is better to share the same position. But the important part is to rotate face1 to have same tangential axes.
Regarding the way to align them, I would like to know both ways, if the results of aligning both faces in these ways are the same. In what I'm trying to do, it does not matter which point to rotate around, I guess.
Consider face1 a face part of a different object than the cube. I want to align two different faces, each from a different object together. So, the object1 that face1 belongs to should move as well. (Thank you quiliup)

I have several questions: 1. What does 'align' mean? The faces having only the same normal vector or all (tangential) axes too? Do they also want to share the same position (all vertices have same coordinates)? 2. How do you want to align them? Setting the vertices individually or only rotating Face1? If rotating, around which point? 3. What else is there that should be moved together with Face1? I guess you do not want to have just a duplicate (Shift-Ding ;) of Face2.    Please add all answers to your question.

Have you looked and programmatically creating Constraints?

This is how I got what I wanted:

I got 3 connected vertices of face2 (polygon5) from the cube (v1, v3, and v5).
the vertex (v1) connected to both other vertices (v3 and v5) is going to be the origin of my new local coordinates.
each vertex is represented by a vetcor (from origin to vertex) in Blender.
I chose vector v1-to-v3 to be x axis, vector v1-to-v5 to be y axis, then the cross product of both (normal between the two) to be z axis.
Construct the 4x4 rotation matrix.
give face 1 the same rotation.

This is inspired by: My attempt to construct transformation matrix using 3 vertices (didn't work, need help)

code:
import bpy
import mathutils

p = bpy.data.objects['Plane']
c = bpy.data.objects['Cube']

# You need to know which face of the cube is selected, in my case it is no. 5
# you need to know the vertices of face 5, in my case they are 1,2,3,5
# you need to pick a vertex to be origin, I chose 1
# you need to know which vertices connected directly to vertex 1 by an edge, in my case 3 and 5

x = c.matrix_world * c.data.vertices[3].co - c.matrix_world * c.data.vertices[1].co
i = x.normalized()
y = c.matrix_world * c.data.vertices[5].co - c.matrix_world * c.data.vertices[1].co
j = y.normalized()
z = x.cross(y)
k = z.normalized()

rot = mathutils.Matrix((i,j,k)).transposed().to_4x4()

p.matrix_world = rot


text:
Grease Pencil-Preceding frame visible in next frame(non onion skin)-turn off please
Simply, Draw something on frame 1 and then I go to frame 2 but the contents of frame 1 are still visible until I start drawing on frame 2(contents of frame1 then disappear from view until I return to frame 1)...
 I would prefer that I get a completely empty frame as I advance through the timeline.
Is that possible?
I guess I should be clear on if this is normal behavior or if its just a bug on my end? When draw on frame 1 and then advance forward to frame 2 is the contents of frame 1 still visible on your view port?

This is defacto standard in 2D-animation. This behavior makes easy to draw on twos, threes, ets. without adding additional keyframes. (When you draw every second frame it is called "drawing on twos", every third - "drawing on threes" and so on.) Timeline looks clear and ones, twos and threes easy to recognize and manipulate with them.
Know more why using twos is important in 9th Principle of Animation

I think this is the default behavior of grease pencil. You can enable to the next frame still the same drawing before, but normaly is the drawing appear just to give a position and disapear when you start draw.


text:
Is there a way to duplicate a material node with it's keyframes?
I also tried by making a group of nodes and duplicating the group, but if I undo the groups, only one of them keeps the keyframes.

Which nodes are you writing about?

About material nodes

What do you mean by "with the keyframes"? That some value of a node is keyframed?

Yes! I keyframed some vales of the nodes


text:
How do I freeze the wave modifier animation?
I have an animated mesh with the wave modifier.
I want the mesh to be frozen in a certain point in time after it animates for a bit with the modifier.
I thought if I keyframed the speed value to 0 it would make the animation stop but it doesn't work like that at all.
Other way I can think of is to apply the modifier, but then I wouldn't have the animated part.
EDIT:
I have 500 objects with a shrinkwrap constraint that has the wave mesh as the target. This makes it impossible to use the solution of duplicating the wave mesh and keyframing a switch of the animated to the static geometry (as suggested in the comments) because the target of the shrinkwrap can't be animated.

Thank you!

what do you mean by "I wouldn't have the animated part"?

@moonboots I meant that if I apply the modifier, the animation I made with the modifier will disappear.

Duplicate the mesh, apply the modifier on the desired frame, then keyframe a switch of the animated and static geometry?

That could be it if I didn't have 500 objects with a shrinkwrap constraint that has the wave mesh as the target. It would have worked it the target property on the shrinkwrap constraint could be animated. Should I add this info as well to the content of the question?

I guess so, add it please.

You can freeze the wave by animating the 'Offset' field inversely to the frame advance.
Supposing you have a wave with a positive speed, and at frame 0, it has an Offset of 2. You want to freeze the wave between frame 100 and frame 140.
Then at frame 100, you want an Offset of 2, at frame 101 an Offset of 3, up to frame 140, an Offset of 142. (The offset direction seems topsy-turvy to me, but that's the way it is)
(You could either do this with a driver...)
Or, if there are no interfering variables,  keyframe the Offset value to 2 at frame 100, and 142 at frame 140.
Then go to the Graph Editor, hit T on the start and end keyframes, and set the interpolation to 'Linear' to get rid of the easing, which would screw the linear relationship you're looking for.

That's exacly what I needed! Thank you so much!

Glad about that.. I don't animate much, If I do, I tend to animate mechanical relationships like this. So in User Preferences I set my default F-curve interpolation to linear in the first place. It saves a few visits to the Graph Editor.

Here's a way that requires a little math, but it's quite elegant:
Simply use the wave repeat formula:

1/Speed * Width * 2 = Frame When Wave Modifier Repeats

Since we want our Wave Modifier to appear stationary, we simply set the formula so it repeats after a single frame:

1/Speed * Width * 2 = 1 Frame

Rearrange the terms and solve for speed:

Speed = 2 * Width

This super easy formula should halt our wave modifier in its tracks! Just set your Speed to twice your desired Width value!
(Note: The Offset value might also need to be set to a sufficiently low negative number, like -65536.)

Hope this helps any passersby! Peace and God bless!


text:
Cycles render on combination of AMD & Nvidia GPUs in one system
System Spec:

Intel i5-3470
AMD R9 290
Nvidia GTX 460

Blender 2.76 (and tested on 2.77 RC2) does not support smoke & fire rendering on AMD GPU. Rendering the animation on my CPU takes too much time.
My proposed solution is to install an existing Nvidia GTX 460, then hack both GPUs with Hybrid Physx.
Does anyone tried this method or would it work?
What are your feedback and suggestions?
I am not be able to upgrade my PC in the near future.

Fairly sure you can't use both at the same time (for cycles rendering). Nvidia uses cuda while AMD uses opencl. You should be able to use the nvidia for rendering and keep the amd for the monitor display.

I will benchmark GTX 460 & R9 290.
My suspicion is R9 290 is going to cream GTX 460 on all renders except smoke and fire simulation.
Alternatively, I will try to render on different layers to speed up the overall time. Not sure how complex that would be.

Blend file: 2.7x Cycles benchmark (Updated BMW)

Forum post

Testing Methodology:

Load up the .blend file.
Set the "Compute Device" to "OpenCL".
Render twice on AMD R9 290. Record the lowest value.
Set the "Compute Device" to "CUDA".
Render twice on NVidia GTX 460. Record the lowest value.

Results:

AMD R9 290 (OpenCL): 1:43:57
NVidia GTX 460 (CUDA): 3:33:95

Blender cannot use both OpenCL and CUDA simultaneously.

I bet two instances of Blender working the same file could. -- Open thefile in Blender. Set to render on AMD, open another Blender, load the same file, point NVIDIA to it. There's a way (escapes my mind right now.) You can set Blender to render individual parts. So you're not overwriting what was just rendered on the faster of the two.


text:
Render layers with and without HDR background
I have a scene with a house in front of the camera and behind the house some trees. I want to render them in separate layers, but I want the HDR image in the background for the first render and without in the second render with only the trees.
I can only check the Transparent in the Film section in the Render tab, but that affect both render layers. I guess I can render them manually one by one and change the settings for Transparent, but perhaps there are some other alternative?
EDIT:
I'm not asking HOW to render a background with HDR image! I have two render layers. The first render layer I want to render with the HDR background and in the second render layer without the HDR background. But if I enable the Transparent option, both render layer are affected by this settings and the HDR background isn't visible in any render layer. How to fix this was my question.

I'm not asking HOW to render a background with HDR image! I have two render layers. The first render layer I want to render with the HDR background and in the second render layer without the HDR background. But if I enable the Transparent option, both render layer are affected by this settings and the HDR background isn't visible in any render layer. How to fix this was my question.

You enable the environment pass and combine them in the compositor.


text:
Import STEP file to Blender
I'm trying to import a STEP file to Blender, but it doesn't work!
This is how I do: I open the STEP file in Freecad and I select everthing, then I export it as a .stl file, but when I import the file into Blender, I only get parts of the object and some of the parts are in wrong position. Very frustrating and the client is waiting. I have also tried to export it as .obj and .dae file without any luck!
Can someone give me some advise how to solve this?

First see if the file is truly exported corrected. View it in some online .stl viewer or in another software. If it displays correctly, try to convert it there to anything else and import in Blender. If there is problem with the file, the export from freecad does not work. There might be some problem with the model in freecad in that case.

Can you post the file or is it confidential? Try a free trial of Vector Works or Libre CAD. I had to try several different softwares until I found Vectorworks free trial.

@JaroslavJerrynoNovotny I used a free trial version of moi3d and exported the object as a .stl file. It was very simple, fast and the result was perfect. But after 30-days it cost $295! I'm still looking for a free and simple alternative.

I have been using a online file converter. Just upload ur file and it will convert it for you. you just download the .obj file. https://miconv.com/convert-stp-to-obj/

I had good success with opencascade cad-assistant. I open the STEP and export as .glb or .gltf. This method has much better normals allowing for a coarser mesh that still looks good and also maintains assembly structure and apperance as stored in the STEP quite reasonably.
It is freely available for all major operating systems, including mobile. Unfortunately it does not seem to be open source.

Thank you for this hint. Great!

"Open Cascade" [...] "Unfortunately it does not seem to be open source."
hmm... okay :D

Well, I don't need it as open source as long as it's free... I think when exporting as OBJ the advantage of CAD Assistant over FreeCAD is (at least what I've been experiencing) that - although FC creates material files (*.mtl) together with the *.obj files - after import in Blender, the FC obj only has one default material, whereas the CA obj has multiple materials on it. So you could at least separate parts according to their materials to split up the model.

This is a great option, however I have not yet been able to find a mesh density setting. I wish I could export at higher resolutions / mesh densities. Any ideas?

In the second page of the settings there is a 'Brep triangulation' section that will allow you to increase the mesh resolution.

Another Free Option.

Import STEP file into FreeCAD
Export File from FreeCAD as OBJ / STL / gltf (.20 beta of FreeCad adds gltf support which maintains grouping / hierarchy of multi-part objects)
Import OBJ / STL / gltf into Blender

FreeCAD seems to create better Manifold geometry this might be a better free option if you plan on 3D printing the object.

You can use the STEP importer Addon that was released for Blender 2.8x on January 27, 2020. It's a paid Addon, but it's not expensive and worth every cent.
You may visit the support thread on Blenderartists. There you'll find the link to get the Addon, too:
https://blenderartists.org/t/step-import/1203804

By the way, Its paid.

It's also Windows only currently


text:
Light bulb glass material very dark
I made a light bulb and I use the Glass BSDF material. I also use solidify modifier to get some thickness of the glass, but the problem that I can't find a solution for is why the glass is soo dark. I want it almost pure transparent. I have read other questions here in the forum about this and I have set the white color to 100% and I also increased the value for the transmission bounces in the laight paths panel and turned off the shadow. The room is full of light.
What can I do to change and improve the render of the light bulbs?

Maybe related https://blender.stackexchange.com/questions/2558/how-to-illuminate-the-darkness-inside-glass-objects-in-cycles?rq=1 but it's hard to tell as you don't provide node setup

@MrZak The node setup is very simple, it's only the Glass BSDF node and the Material Output node for the light bulb. But I have solved the problem. I had previously reduced the number of max bounces to two for faster render. After I increased the value, the black glass was gone and now looks ok!


text:
Transparent image like a decal on mesh with principled BSDF shader
I have done this before, but that was before the principled BSDF shader existed. Now I'm trying to do a similar node setup with the principled BSDF shader instead of the diffuse BSDF shader, but the result is not 100% perfect! The background of the mesh with the transparent decal image, differ slightly compared to the surrounding mesh. I want the background around the decal to be fully transparent and look just like the nearby meshes.
The principled BSDF shader to the left in the image below has the green color for that background and that is the green color I also use on the rest of the object with the same settings.
Is there a better way to achieve this with a better node setup or just adjust my node setup in some way? I have tried to adjust the value of the mix shader, but without any improvement.

I'm not totally sure I understand your question, but the alpha channel of your image is important.  The "background" of your decal should not be showing at all because the alpha should be 100% transparent for every background pixel of your decal.

@risingfall Thanks for your comment! I want to display a png image with a symbol on a transparent background on a mesh that has a green background material like the surrounding mesh. I just want to see the symbol on the green background. I hope you understand my question better now. Any ideas how I can solve this problem?

My question is, your PNG image - are you sure the alpha channel is correct, i.e., are you sure it is completely transparent in the places it should be transparent?

Here's an example of what I think you're looking for...


text:
Object in the back, visible in the front
In the 3D view I have a tree behind a house, but despite that the tree is behind the house and way back in the scene, it's just in front of the camera! How come it's like this? I have used a skin modifier to create the tree. Other objects looks like they should depending on their position.
Here is a picture. The leafs on the tree are OK and not visible, just the
tree trunk and branches.

can you add a screenshot so we can see this more clearly ?

@Shams I added an image

Check that you did not put a check mark beside x-ray in display section for the tree trunk (you will find it in object section in properties panel)

@Shams The x-ray was the problem! Thanks for the help! Question solved.

@Shams Why don't you post an answer (maybe include a screen shot so that others who may come across the question can understand easily) and we can knock this out of the unanswered queue. ;-)

The Problem is that the x-ray was checked
when the x-ray is disabled the object in back can't be seen like in the photo and when it is enabled it goes front off everything.
For example the back cube (orange) isn't visible clearly because x-ray isn't checked

But in this photo it is checked look :

this checkbox is used in many things like making/creating/assinging bones without it we could not see the bones:

This Checkbox Can be found here : (Properties panel --> Object --> Display)


text:
Impossible to snap to objects
I'm trying to snap two objects with closest vertex, but when the vertex of the object I move is very close, it jumps back! I guess the distance is 15 mm. When it jumps back, a small ring is visible at the other objects vertex. I cant find any solution and need help!

I can't really picture your scene, but try hiding the second object that is getting in the way be selecting it and hitting H.

You could try the following:
1: In Edit mode select the vertice you want to use as the snap point.
2: Move the 3D cursor to this vertice, (Shft S to open the snap menu, then choose  Cursor to Selected).
3: In Object mode move origin to the 3D cursor, (Shft Ctrl Alt C and choose the Origin to 3D Cursor option).
4: Change the Snap Target from Closest to Active.
In the example gif below, I’m trying to snap the point of the pyramid object to one of the corner vertices of the cube object.

Thanks for your solution! I found a similar solution that works fine, in step 4: Selection to cursor.


text:
Ticks in my animatrion?
Im trying to find the amount of ticks in my animation. My animation is 100 frames long and I am running at 60 fps. How can I figure this out?

What does "tick" mean in this context?

Logic ticks, in the logic editor.

One sure way would be to connect an always sensor in pulse mode to a python module that adds 1 to a ticks int var then look at the value of ticks when the module exits.

isn't it one logictick per frame?

number_of_ticks = (animation_length/animation_fps)*game_fps
in your case (100/24)*60 = 250
you can set the animation frame rate in the render tab :

also you can set the game frame rate in the world tab :


text:
"In-air" function?
I recently asked a question about a function where I would have a property toggled to one if my player is moving. This is is quite similar. I would like to have a property ("In-air") be toggled to one when my player is off the ground. I thought of giving the floor a property called "floor," and when my player is not touching it he cannot jump. I don't know if this is the best way of doing this, but any help is appreciated. I prefer logic bricks if this is simple; otherwise, use python. Thanks!

From the way your question is currently written, I think this is what you want..
When your character is not colliding with the floor, And you press space bar, It will jump.
By inverting the output of the collision sensor, you essentially make it send negative pulses when it Is colliding, and send positive pulses when it Is Not
That way the sensor will only register true when it is not colliding with any object with the property floor. activate true level triggering to continuously update the sensor.

I would use a ray sensor on the -z axis. but... that's just me.

@X-27 I'm very sorry, I didn't see this answer! I probably opened my notifications when I had a good bit but forgot to check this. What about a, lets just say, ball? Lets say our character is on a ball. Would I have to go and make the top its own piece, and give it a property?


text:
Start new rays after trigger?
I am making somewhat of an FPS, I am making where no bullets come out of the barrel, but a ray comes out. I know how to make a ray with distance and detect a property, but that's not the problem. I am making a penetration system where the ray goes through objects with a certain property ("penetrable"). I can do this, but the way I want this to work is the following: as soon as the ray (first ray) hits a penetrable object, a new ray is created. Also, when the ray hits the property, it casually would send a message ("x") to tell the other player to lose health. If the ray is a ray that is new (penetrated through an object) one, I need it to send the other player a message "xy". This would make it possible to have the bullets deal less damage through walls, and make it possible to reward you differently. So what am I asking for? I would like to have a ray come out of the barrel (if it hits someone before it penetrated, it sends the regular "lose x hp message."), and if it hits a property "penetrable," a new ray would be created that sends players the message "lose x-y" if it hits. I know this sounds very hard, but I can already make it very far; I am just not sure if I am doing this right. Any help is appreciated, thanks!

Here is the logic setup for this system :
if ( hit_penetrable and Xray_hit_player ) : send(XY)
if ( hit_player ) : send(X)

a Demo file

What does the "body" in the text do? Also, can you make a demo?

@BlenderDev the body has no effect for the ligic-blocks, do you want a .blend ?


text:
Bind keys in GE?
Lets say I have W binded to walk forward. What if a user is, well, left-handed (example), and uses another key? There is a way to change this but it is way too long and absurd. What is the best way to let a bind be changed? Thanks.

i'm left handed and i use w

Yes,a friend of mine plays with wasd also.But what do you mean too long ? You can just swap w with "up arrow" in the logic brick.

Well, im not saying left handed people. For me, i'm right handed but I like to be unique and I have a really complex setup...

@Lev please explain.

Do you want your character to move with let's say "up arrow" instead of "w". Just go to the keyboard sensor and change the key from "w" to "up arrow". If you want to change this while in game, you use bge.events to change it. I will write you an example if this is what you want, but I am having difficulty to understand what you want.

Well in case what you asked for was changing the keys in game, here is a blend file and a picture :

Here the cube moves in the x-axis by pressing "w". But if you press "s" the script will run and the cube's movement key will change to "up arrow"(this is the number 146, it is an event). Here you can find all the numbers for all the keys.

OK, seems fine. But what if there is a text box, would everything change? And how can a user change a key to whatever he wants?

I am trying my best to come up with a way where you can have a menu that shows all the things you can do (e.g. walk, crouch...) and have a box next to it where you get to write any key you want.

That is an interface issue. What you are trying to do is to create a "controls-menu".Create a new thread, and ask precisely what you want. Put a couple examples there also.My answer covered the basic mechanics to what you asked.

Fine, take the points heh. Nah, im joking.


text:
How to animate moving eyes and speaking mouth onto puppets in a stop-motion video?
I’m very new to Blender, and I need to animate moving eyes and speaking mouth onto a stop-motion animation I’m making with puppets. I will shoot the video and then upload it into Blender to add these features afterwards. My understanding of Blender isn’t sophisticated enough to know the easiest way of doing this, does anyone have any suggestions? Thank you.

Hello, it's not clear what you  want to do, if it's a stop motion with puppets, how do you use Blender?

@moonboots I will be shooting the video and then uploading it into Blender to then animate on top of it. Hope this clarifies.

It sounds like you are looking for VFX (visual effects). This requires camera tracking, focal length estimation, masking, and some modeling. This can be done in Blender but there are also add-ons like Geotracker that can help you with this process.


text:
What is the simplest way to fill this hole up?
I just started modeling and I wanted to know what is a precise way to fill this hole without glitching the material. I tried to make a face connecting all the edges(?) but the material appears as plain color. When I try to subdivide the face it multiplies the edges and not the faces. It looks glitchy.
This is the original model I wanna fill:

This is what it looks like if I try to connect edges:

If you selcet the edges, you could try to use grid fill (ctrl+f>gridfill). Further more if you want to close this hole, you have to make sure to delete all the geometry below it. Just go into edit mode, press C and while holding LMB hover over all of those faces and then delete them. other wise you will get artifacts and modifiers may not work properly

thanks, will try this : )

Select one of the outside faces, add a custom orientation:

⬆ ShiftG, then N to select similar faces by normal,
✲ CtrlI invert selection,
H key to hide,
move mouse over the inner island,
L key to select it,
⎇ AltH to reveal (and by default, also select) the hidden faces,
S, Z, 0 ↩ Enter Scale those faces to 0 (flatten) along the normal of the face selected in first step.
A, M, B merge by distance to remove vertices now occupying same spots.
It's not clear if that will be enough, if not, you may go to sculpting mode and use flattening there...

I did not think of that, simple yet effective