text:
Opaque Objects with Lighting
I currently have a model of an LED Light Ring, only the plastic piece on top of the LEDS can be transparent. All of the other parts have light coming through them, which is an issue. How do I make individual objects opaque so no light can go through them?

Are you using actual lights for your lighting, or emission surfaces?

I am just using actual lights.

I am only using one light currently and about to begin animating, when I place the light next to my led ring, light goes through pieces, how do I fix it? If you are available, we can contact through email and we could hop on a phone call.

Here is the link, https://www.dropbox.com/l/scl/AAA8vPrclyln4pqgTEu_UxgcSTKft4hp7GY I need every piece except the Top Gloss to be opaque.

Hey, Dropbox wants me to sign in and have access to all my contacts in order to view that file, and to be honest, I'd rather not agree to that. Do you mind uploading here instead? - https://blend-exchange.giantcowfilms.com/. Just drag your file into the box, agree to the terms, and paste the URL of this question into the box provided. After you click upload, it will give you a link, Edit your question and paste the link there.

Sounds good, waiting for file to upload now. It is nearly 200mb, should it take a long time to process? Do you have an email I can send it to, its been stuck on "Files may take some time to process" for the past 10 mins now.

Oh, too bad. They don't allow uploads over 50 mb. Hang on, my wife has dropbox, she'll get it for me.

Oh no worries! It is all good.

Hey. Ok, so the file lacked packed resources, and because of that it wouldn't let me edit anything (material-wise) because it was part of a missing "linked data block". The only thing I was able to tell was that enabling contact shadows stopped most of the light bleed, but I couldn't see anything showing through - likely due to the missing textures. That's all I can really recommend at this point. I unfortunately don't have any more time at the moment to look at it further, but perhaps later on I can have a better look at it. Sorry I couldn't be more help.

No worries, I appreciate your time and help.

Don't make the question depend on others downloading stuff. Edit your original post and add images and explain clearly the issue.


text:
How do I transfer .blend files to a new PC and still keep all the materials?
I have been using my laptop for the longest time with blender. I recently got a new PC. When I copied the .blend file and dropped it in my new PC, no materials were on my mesh. How do I fix this??

Pack all your files into the .blend before you save and copy. See below:

Can you pack MATERIALS? It is for packing in textures right?

If you mean procedural materials, I don't think you don't need to pack them. Materials based on texture maps, will need to be packed.

Packing is just for images used as textures. But you can also just make a copy of the folders where you keep everything. Just replicate the same folder structure on the new computer and your blend files should open just as they did in the old one.

source: Stack Exchange

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

sort: votes


text:
How is the camera view moving with a mouse
I'm new to blender (literally been a few hours) and I'm following this tutorial but not having any luck with moving the camera view. In the video the person says he right clicks to move the view, but when I try it in blender (version 2.92.0) I just get a menu pop up. How do I move the view?

mmh actually you don't need to right click (or left click) on the camera to move it the way he does, you need to open the N panel (on the right of the 3D view) > View tab > View > View Lock > activate Camera to View. From now on you can move the camera the same way you navigate in the 3D view

Thanks. Attempting to follow your instructions but I don't see the options you mentioned. I think I've navigated to a similar option but now need to read up on this.

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


text:
Earth rotation warps the mesh instead of rotating
I'm new to blender and followed this tutorial: https://youtu.be/b0N_Bz8amlw and I'm able to produce a mesh plane with a bend:

But when I press "R + X" to rotate on X axis I get the following warp instead of a rotation:

I'm wondering why is this happening and what is the cause of the problem?
I guess an additional education point would also be why do some youtube videos use UV sphere whilst other's use mesh plane bends to create a sphere, I can't seem to find out a simple explanation of the pro's and con's of each. (Perhaps this rotation is a con for a mesh plane?)

Hi :). The rotation is confusing the Simple Deform modifier. Either parent the empty to your Plane mesh or apply the Deform modifiers.

It is because you have simple deform that blends your object around empty. Then you rotate the object empty stays in place, that makes changes in position of empty relative to object. As a result, object blends in the different way. You can parent empty to object (Ctrl+P) or apply modifiers to prevent this behavior.
You can also use Add -> Mesh -> UV sphere instead of this complex structure, which creates a sphere like yours.

...If you forget the Empty, and, in Edit Mode, align the mesh: short-side up the Z of its own Object Axes (displayed in this illustration), and long-side along the X, then a 180 X-bend followed by a 360 Z-bend will work.

Modifiers are in the modified object's space by default, so they stay aligned to the object when it is rotated,translated, or scaled.


text:
Render doesn't looks like what I'm seeing from the Camera View
as the title say I don't know why but what the rendering shows is not corresponding to the Camera View I choose. I have only one camera but it seems like when I hit the rendering option it uses another POV where the camera is located parallel to the ground at Z=0 and perpendicular ti the Z plane. How do i Fix this?
Here's some screenshots.

Well, it seems to be you have set some object as camera. You have selected local camera also, but this setting works in 3D-view only, hence it is not affected on render.
I suggest you select camera and press Ctrl+Num 0. Active camera has solid triangle above - double-check that you have it

Also, you have an object "Cube", which is hidden but active in Render. It is possible that it blocks the camera view

Basically the problem is that while I can use a linket object to move a camera, when I hav eto render the camera view the object needs to be delated? How can I still keep the linking in between the object and the camera while also having the camera view being the one that renders the image? Sorry for those questions I'm a beginner.

You should parent camera to object using Ctrl+P (object should be selected second) so that camera position will depend on object.

Ok, now I have only ONE camera and it has the black triangle active, and its showing exatly what I wanted to render, but still when rendering it shows a very weird portion of the project in a very wierd way, I don't even know where the other "view" is pointing.

You can use any object type as camera. But if camera is active... You have an object "Cube", which is hidden but active in Render. It is possible that it bloks the camera view.


text:
Why this happens when I try to sub-surface to a cylinder?
It looks like some parts gets wrinkled.

Hello what does it give if you inset the top face?

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

Subsurface division uses an algorithm that depends on topology that has only 4 sided faces. When you have a big polygon like the cap, it doesn't work well.
As suggested, you can inset (i) the caps and you can also "grid fill" (ctrl+f -> grid fill) the circle/polygon inside the inset.
An inset alone will work if the remaining circle and the inset iself are coplanar.

Could you elaborate on what the shortcut "i" does? I pressed it but I couldn't understand if I had to be in edit mode and just select the affected faces/vertices. Thank you so much

Select the top face in Edit mode and press i to inset the face (it will create an inner face, the shading will happen between the former face ring and the new one but not between the new one and the inset face

perfect it worked, thank you. I don't know why but I didn't realize it was something I usually did without realizing it was called like that.

@Andrea In the answer is mentioned the shortcut I and the tool name Inset. How do you usually do that without knowing the shortcut or the name?


text:
Is there a way to customize/relocate nav sphere?
I am currently running Blender 2.9 (but this would apply to 2.8 as well). In the upper right corner is a nav sphere, but it may be called something else. I have searched for weeks looking for an answer. I would like to move it from top-right to middle-left of the interface. My purpose is to allow me to model on my Lenovo 2 in 1 in tablet mode. This "sphere" will keep my right hand free for editing and sculpting using bamboo pen.

The thing is called the 3D Viewport Axis and you can use preferences to change its form from the one you've shown called Interactive Navigation.  You can change it to a simpler form called Simple Axis or you can turn it off completely.  You can change its size and how bright it is compared to the rest of the 3D viewport.

The one thing that you can't do, unfortunately, is change where it is located.


text:
What does "Vector" mean in nodes as input and output? Please explain
What does Vector mean in nodes input and output in Blender?

it is made to send and receive 3D informations (what happens on X, Y and Z)

if you don't know what a vector is....maybe you should learn first some basic math....and a node is just a function, which you give a/some values and it returns a/some values. That's all. So basically...i do not understand your question!?

https://blender.stackexchange.com/questions/152485/what-does-vector-mean-in-nodes-as-input-and-output              this exact question has already been asked

Related question What is the meaning of the color of the node sockets in the node editor?

It's just x, y, and z-coordinates (which may actually represent x, y, and z-coordinates or angles in radians). In some nodes, it represents a single point of an object (like origin), in others it may represent all points of an object (I think this moment is cumbersome).

Well as the name implies, it's a vector, a 3 dimensional vector with 3 components x, y and z. It's different from, for example, the scalar (grey) socket which is a scalar value or the yellow socket which is a color value (consisting actually of 4 components R, G, B, and A or 3 if we have no Alpha).
You can see the vector socket as 3 grey sockets combined and the color socket as 4 grey sockets combined (3 without Alpha).
You can use the Converter>Combine XYZ, Converter>Combine RGB, Converter>Combine RGBA to convert from scalar value to vector, RGB or RGBA respectively.

You can also get each individual components of a vector, RGB or RGBA color by using their Converter>Separate counterparts :

The rule of thumb is that you should (almost) never plug two sockets of different colors to each other unless you know exactly what you are doing.

That's a good point that the yellow node can have 3 (RGB) or 4 (RGBA) components.


text:
Simulating electromagnetic wave polarization in Blender
I am trying to visualize some experiments done in my lab with wave polarization. One thing I'd like to have is a curve representing an EM wave with arbitrary polarization that I can animate. Mathematically this is expressed as
$$
E(z,t) = E_0(e^{i\phi_x}\hat{x} + e^{i\phi_y}\hat{y})e^{(kz-\omega t)}
$$
Right now I am just expressing linear polarization by creating a spiral curve, tabbing into edit mode and scaling the x component of all vertices to zero, and then rotating the wave around an axis to get horizontal, vertical, and diagonal polarizations. The probelem is that after I scale the vertices I have no way to recover the spiral behavior. Similarly, you have to define the spiral as right or left handed when you create it, and there isn't any way to change it from one to the other. I'd like to have parameters I can keyframe (namely, $\phi_x$ and $\phi_y$ from above) to modify the polarization of the wave/appearance of the curve. The plan is to eventually map an object onto this curve to represent traveling EM waves. Is there some way I can do this with nodes or even scripting? It doesn't seem possible with just the basic curve controls blender gives you. The twist modifier seems to be almost what I want, but it doesn't allow me to get a nice uniform circle.

Can you add some images of what you’ve tried and what you’d like to get?

Is this something you could do using the parametric surface functions from the Add Mesh Extra Objects add-on?

Maybe something along these lines, in Geometry Nodes?

The Transform node labelled 'Spiral Transform' rotates the spiral before projection to a plane, giving a phase-shift .. is this what you meant by "spiral behaviour"?
The Transform node labelled 'Projection Transform' rotates the wave after projection, to rotate the projection plane
The spiral can be switched between clockwise and anticlockwise
winding

(All angles in radians)

Blender 3.0a, but easy enough to reproduce in 2.93..
All parameters, and others, not (yet) exposed in the modifier, are animatable..
If this is heading in the right direction, but you want more user-relevant parameters, or, say, the orthogonal wave included in the same object, call back with a comment.

One way to visualize the effect is to use Animation Nodes to create a shape that is parametric and animated.

Details (Tested with Blender 2.93.4 and Animation Nodes 2.2):

Convert the equation from complex math to real math that solves for x,y,z as a function of time and the parameters E0, k, w, phi-x, and phi-y. For this example, only the real part of the equation will be added. Following the same principles, both the real and the imaginary parts of the equation can be added.
Add a curve. This curve will be replaced by the animated wave using animation nodes.
Create a new animation nodes network.
Add the following Loop that will calculate the x,y,z positions for the points on the curve as a function of time using the constants as shown.

Add the following loop that will determine the edge relationships for between the vertices.

Add the following nodes that will call the loops to get the vertices, get the edges, and create a curve from the data.

Now, when animated, the curve will follow the desired equation and the parameters can be changed to illustrate RHP, LHP, circular polarization, elliptical polarization, and planar polarization at different frequencies and signal amplitude.
Example Blender File -


text:
How attributes fit into the new fields-based geometry nodes workflow
How exactly do you work with attributes in geometry nodes after the implementation of the fields-based system?  I saw that this question (or the equivalent of it at the time) was asked and answered in January '21 (Geometry Nodes Attributes), but that was before the introduction of the fields-based system, which basically makes any prior documentation about working with attributes obsolete.
There are currently 3 nodes that work with attributes, and I have no idea what they do or how to use them.
How exactly do attributes currently fit into the big picture of the geometry nodes workflow?

Does this answer your question? Blender 3.0.0 - How to use a vertex group in geometry nodes?

@BlenderUser123 somewhat, but it also brings in new questions, like how to I access attributes like crease?  There is no input node for this.  Also, I still don't understand what the 3 attribute-related nodes do.


text:
FBX export: some NLA actions are broken
I'm having a weird issue with exporting an FBX from Blender to Unity with different skeletal animations as action stashes.  Some of the animations show fine in Unity, but others  seem to only have animation on the root bone, so the character's moving around as a whole while being frozen in a pose.  I can't figure out what the difference is between the different animations that's making some work and others not.  Any help would be greatly appreciated.
(I would attach the blender file, but I can't figure out how)

Someone helped me figure it out.  "Resample Curves" in the model import settings in Unity was turned on, and for some reason turning that off resolved the issue.

Usually this kind of issue is caused because a difference in the animation data or its interpretation can happen at any stage between export and final use. Hence, the common practice is to bake everything every single frame, using only spline interpolation, no constraints, key everything that should be, and so on. Normally if you do that, you rarely need to fiddle with import settings or anything in the game engine, aside from some rare specific needs.


text:
Assets from the asset browser copy the geometry nodes modifier, is there a way to make them a single user copy?
I have mesh assets in asset browser.
Each time I drag them into the scene, the geometry nodes modifier to the mesh also gets copied. I have to click the number (3) to make them a single user copy.

I want the modifier to be a single use copy when I add an asset to the scene, is this possible?
I know there is a setting in preferences that changes the import method from append(reuse data) to append, but this doesn't work for modifiers.

I know that when adding a nodegroup asset (same type as modifier) into geometry node as an asset and then I add another one it will use the one I already have in the file and not duplicate, this could actually get annoying when I change the inside of the node and don't make have a new name or user the new node will be the same as the one I changed (only in that file though). It could be different if the modifier is on an object (and not as a modifier) like as in your case.


text:
How can I derive an action name based on the mesh selected?
I have a simple cube that has a keyframed location from Frame 1 to Frame 48

Here is a code that shifts the keyframes by 2
import bpy

# Configuration
action_name = 'CubeAction'
data_path = 'location'
index = 2                   # Z axis

# Find the appropriate action
action = bpy.data.actions.get(action_name)
if action:
    # From this action, retrieve the appropriate F-Curve
    fcurve = action.fcurves.find(data_path = data_path, index = index)
    if fcurve:
        # Iterate over all keyframes
        for kfp in fcurve.keyframe_points:
            # Print current keyframe info
            print('Frame = {:04}; Value = {}'.format(kfp.co[0], kfp.co[1]))
            # Change keyframe data
            # Push back in time by 2 frames
            kfp.co[0] += 2

However, instead of "action_name = 'CubeAction'", I want to select a mesh and automatically get the action name associated with the mesh, is this possible?
So, for example, if I selected Cube.002 then it should automatically get 'CubeAction.002' as action name. Is this possible?

should be roughly action = bpy.context.active_object.animation_data.action.name

Works Perfectly. Thank you.


text:
I want to find the VSE text strip code in Blender's Source code
I want to see and edit the source code of Blender's Video Sequence editor text strip.
based on what I have searched online, it's not in

/source/blender/sequencer
/source/blender/editors/space_sequencer

Any help?
https://github.com/blender/blender

This Q&A site is to help with questions about using Blender and its built-in addons. There are no Blender developers here, nor does anyone here work for or have any association with the Blender Foundation so questions about Blender's internal source code are off-topic here.

is that what you are looking for? blender/source/blender/editors/space_sequencer
/sequencer_edit.cc

Its a start, thanks.


text:
Make modifier data single user copy with blender python
I am linking Geometry Nodes modifiers of 2 meshes using blender python, but after that, I want the modifier of each mesh to be of a single user copy. Is this possible?

class ADDONNAME_OT_my_op_MPI(bpy.types.Operator):
    bl_label = "Add Motion Preset"
    bl_idname = "addonname.myop_operatormpi"

    def execute(self, context):
        scene = context.scene
        mytool = scene.my_toolmp

        if mytool.my_enumMoPr == 'OOPI1':
            # Replace these with the actual names of your source and target objects
            source_obj_name = "Cube"
            target_obj_name = bpy.context.view_layer.objects.active.name

            # Get the source and target objects
            source_obj = bpy.data.objects.get(source_obj_name)
            target_obj = bpy.data.objects.get(target_obj_name)

            # Check if both objects exist
            if source_obj and target_obj:

                # Iterate through the modifiers of the source object and copy them to the target object
                for modifier in source_obj.modifiers:
                    new_modifier = target_obj.modifiers.new(name=modifier.name, type=modifier.type)

                    # Copy some common settings (adjust as needed)
                    new_modifier.show_viewport = modifier.show_viewport
                    new_modifier.show_render = modifier.show_render
                    new_modifier.show_in_editmode = modifier.show_in_editmode

                    # Handle Geometry Nodes special case
                    if modifier.type == 'NODES':
                        new_modifier.node_group = modifier.node_group

                print("Modifiers copied successfully.")
            else:
                print("Source or target object not found.")


text:
I want to execute a function after clicking on an image enum in blender python
I am trying out a code that executes a function that change the fps to 30 after clicking an image enum (specifically a single image called Poster1.png)
I just can't get it to work, any help?

import os
import bpy

# Declare preview_collections as a global variable
preview_collections = {}

def enum_previews_from_directory_items(self, context):
    """EnumProperty callback"""
    enum_items = []

    if context is None:
        return enum_items

    wm = context.window_manager
    directory = wm.my_previews_dir

    # Get the preview collection (defined in register func).
    pcoll = preview_collections["main"]

    if directory == pcoll.my_previews_dir:
        return pcoll.my_previews

    print("Scanning directory: %s" % directory)

    if directory and os.path.exists(directory):
        # Scan the directory for `*.png` files
        image_paths = []
        for fn in os.listdir(directory):
            if fn.lower().endswith(".png"):
                image_paths.append(fn)

        for i, name in enumerate(image_paths):
            # generates a thumbnail preview for a file.
            filepath = os.path.join(directory, name)
            icon = pcoll.get(name)
            if not icon:
                thumb = pcoll.load(name, filepath, 'IMAGE')
            else:
                thumb = pcoll[name]
            enum_items.append((name, name, "", thumb.icon_id, i))

    pcoll.my_previews = enum_items
    pcoll.my_previews_dir = directory
    return pcoll.my_previews

class PreviewsExamplePanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Previews Example Panel"
    bl_idname = "OBJECT_PT_previews"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        wm = context.window_manager

        row = layout.row()
        row.prop(wm, "my_previews_dir")

        row = layout.row()
        row.template_icon_view(wm, "my_previews")

        row = layout.row()
        row.prop(wm, "my_previews")

class IMAGE_OT_preview_clicked(bpy.types.Operator):
    bl_idname = "image.preview_clicked"
    bl_label = "Preview Clicked"

    def execute(self, context):
        wm = context.window_manager
        clicked_image_name = wm.my_previews  # Name of the clicked image
        print("Image clicked! Name:", clicked_image_name)

        # You can call your custom function here

        # Example: Change FPS to 30 when "Poster1.png" is clicked
        if clicked_image_name == "Poster1.png":
            bpy.context.scene.render.fps = 30
            bpy.context.object.data.update()

        print("end")

        return {'FINISHED'}

def register():
    from bpy.types import WindowManager
    from bpy.props import StringProperty, EnumProperty

    WindowManager.my_previews_dir = StringProperty(
        name="Folder Path",
        subtype='DIR_PATH',
        default=""
    )

    WindowManager.my_previews = EnumProperty(
        items=enum_previews_from_directory_items,
    )

    # Note that preview collections returned by bpy.utils.previews
    # are regular Python objects - you can use them to store custom data.
    #
    # This is especially useful here, since:
    # - It avoids us regenerating the whole enum over and over.
    # - It can store enum_items' strings
    #   (remember you have to keep those strings somewhere in py,
    #   else they get freed and Blender references invalid memory!).
    global preview_collections
    import bpy.utils.previews
    pcoll = bpy.utils.previews.new()
    pcoll.my_previews_dir = ""
    pcoll.my_previews = ()

    preview_collections["main"] = pcoll

    bpy.utils.register_class(PreviewsExamplePanel)
    bpy.utils.register_class(IMAGE_OT_preview_clicked)

def unregister():
    from bpy.types import WindowManager

    bpy.utils.unregister_class(IMAGE_OT_preview_clicked)

    del WindowManager.my_previews

    for pcoll in preview_collections.values():
        bpy.utils.previews.remove(pcoll)
    preview_collections.clear()

    bpy.utils.unregister_class(PreviewsExamplePanel)

if __name__ == "__main__":
    register()


text:
Blender keeps replacing textures
So I've been working on this model and whenever I close it, one the textures keeps getting replaced by one of the other textures and its really infuriating. As you can see in the image, the texture preview shows that its not the same as the one being shown. Can someone help?

So you want to use texture on which "LET'S" is written ? Can you post picture how your Shader Editor workspace looks like ? Which texture is set to be used there.

Hi, 'annoyed'. Welcome. We need information, to answer questions. Please share a stripped down version of the file with the minimum content that manifests the problem on https://blend-exchange.com/. Is your file reverting to a default file-path for textures, every time it opens, for example?


text:
Alternative to Grid Fill in Edit Mode?
I am sorry for such a basic question, but I have searched and I cannot find an answer.
I just want to fill this area and I believe grid fill is what I would want to keep the curvature of the model when filling in the hole. However, the selection does not satisfy the requirements of grid fill.
Is there any other operator I could use to fill the hole while keeping the curvature of the model? Or can I somehow make grid fill work?
Curved surface with hole that needs to be filled with respect to the geometry:

Thank you

Hello and welcome. The topology is horrible. It will not work. If ever it did work, the result will look even worse. Consider modeling it again and make sure to use quad topology.

Grid fill requires en even number of vertices. If you selected an odd number, (I can't tell from what you've shown), try to eliminate one vertex and it should work

Thank you for the suggestion. I tried increasing and decreasing a vertex but it still would not work.

Did you verify that you have an even number of vertices at the selection info on the bottom of your screen? Perform a merge by distance may clean up and simplify your selection. Or also try extrude and scale in until your have a tiny area, then f for fill it. Remesh the geometry in sculpt mode

Thank you for the help.


text:
How to copy UV coordinates between similarly-shaped surfaces?
At first I'd like to say that I'm quite new to 3D modelling so I'm sorry if the question might be silly..
I have two simillarly shaped (but not identical) mesh objects: mesh A and mesh B. They have different amount of triangles and vertices.
My goal is to make the mesh B using textures for mesh A. So I need to make mesh B having compatibile UV map.
I tried using Transfer Mesh Data tool with UV option but the results aren't that great.
So to achieve my goal I would like to select some faces from mesh B, then select matching faces of mesh A and make blender automaticly adjust the UV coordinates of selected faces on mesh B to match faces on mesh A.
And here is my question - how could I make the blender do it? Or if it doesn't have this functionality maybe there is (even paid) some blender addon that could do that?
Thank you in advance for help! <3

You can use a data transfer modifier to copy UV from one mesh to another.  There are a variety of mapping options; "nearest face interpolated" is probably the best for your purposes:

Don't forget to hit "generate data layers" to create the UV maps on the modified mesh if they do not already exist.
However, this isn't a good way to achieve what you want.  A data transfer of UV is something that cannot be perfect: what if the seam between two UV islands runs through a face on the modified mesh?  Your face will span the islands; if you try to fix that, you'll find that now your face includes undetailed parts of your texture.
A better technique to achieve what you want is to use selected-to-active texture baking, to bake the texture from one mesh onto the existing UV of another mesh.  I'm not willing to provide a full accounting of texture baking in this answer, but there are a great number of resources and tutorials regarding the technique, including many questions and answers on this site, and I don't think you'll have any trouble finding more information now that you know what to look for.  Sometimes, "selected-to-active" baking is referred to as "high-to-low" baking, because it is often used to bake normals from a high poly mesh to a low poly mesh, but there is no reason that the objects involved have to be high or low poly, or even have any particular relationship to each other whatsoever.

Thank you for your time and answer. Sadly the mesh object I generate will be for the game where there are already ready textures. Those textures won't be possible to be modified - simply new object has to accept already existing textures for mesh A. So I understand that the only way to copy UVs is using data transfer tool? it's impossible to make this process partly manual (for example selecting faces with seams and so on to achieve more exact result) ? I don't mind if this process isn't fully automatic and is slow. I just need it to be done as perfectly as it is possible.

@AmaeSaeki You can make it as manual as you want-- you could data transfer, apply, then edit UV-- but it's just inherently not a perfect technique.  Being careful with modelling a mesh, making sure source seams are aligned with destination edges as much as possible, will help a lot though.

Ok thank you. I will see what I can do with it! I need 4 more rep to give upvotes otherwise i would already give your answer one <3


text:
Scaling independent poly selections by the center of each selection

I would like to scale each of these cylinder shaped selections down by say 5% (i.e. making hole smaller). Is there anyway to do that with a single selection, or do I need to do each one sperately?
Related, is there a way to enter a numerical scale value like 5%?

., then I, or use the menu on top of the viewport to switch "Transform Pivot Point" to "Individual Origins":

As for your additional question, yes, you can press S, 0, ., 9, 5 ↩ Enter, or you can scale by any amount and then expand the operator popup by clicking on it or pressing F9 - there you will be able to adjust the operator values.

Fantastic, easy. Thanks!


text:
Batch simplify shader node
i am currently trying to batch-simplify all of my nodes from this:

to this:

so i can better export it as fbx and changing it to the second style dont change any visuals at all.
my code isnt really working somehow:
    import bpy

# Loop through all objects in the current scene
for obj in bpy.context.scene.objects:
    # Loop through all materials in the object
    for mat_slot in obj.material_slots:
        if mat_slot.material is not None:
            # Get the material node tree
            mat_tree = mat_slot.material.node_tree
            # Loop through all nodes in the tree
            for node in mat_tree.nodes:
                # Check if the node is a shader node
                if node.type == 'SHADER':
                    # Check if the node is not a standard shader
                    if node.bl_idname != 'ShaderNodeBsdfPrincipled':
                        # Create a new standard shader node
                        bsdf_node = mat_tree.nodes.new('ShaderNodeBsdfPrincipled')
                        # Copy the node's inputs to the new shader node
                        for input in node.inputs:
                            if input.is_linked:
                                for link in input.links:
                                    mat_tree.links.new(link.from_node.outputs[0], bsdf_node.inputs[input.name])
                            else:
                                bsdf_node.inputs[input.name].default_value = input.default_value
                        # Replace the old node with the new shader node
                        mat_tree.links.new(bsdf_node.outputs[0], node.inputs[0])
                        mat_tree.nodes.remove(node)

i dont get any errors, its just not working at all. any idea why?

That looks like a code you generated with chatGPT, right?

You don't need the first few for loops if you want to operate on all materials. You can just do : for mat in bpy.data.materials: if mat.use_nodes: ...

My answer is more about your way to work than giving you a functional script.

When I don't know the API I am working with, one of the things I like to do is to print everything I am using. It's absolutelly not necessary function-wise but it's a way to see what's happening and understand why it does or doesn't work.
For example:
import bpy

# Loop through all objects in the current scene
for obj in bpy.context.scene.objects:
    print(f"Looking object '{obj.name}'")
    # Loop through all materials in the object
    for mat_slot in obj.material_slots:
        print(f"  Looking mat_slot '{mat_slot.name}'")
        if mat_slot.material is not None:
            # Get the material node tree
            mat_tree = mat_slot.material.node_tree
            print(f"  Looking mat_tree '{mat_tree.name}'")
            # Loop through all nodes in the tree
            for node in mat_tree.nodes:
                print(f"    Looking node '{node.name}' of type '{node.type}'")
                # Check if the node is a shader node
                if node.type == 'SHADER':
                    print(f"      '{node.name}' is a shader node {node.bl_idname}")
                    # Check if the node is not a standard shader
                    if node.bl_idname != 'ShaderNodeBsdfPrincipled':
                        print(f"        '{node.name}' is not a Principled BSDF!")
                        # Create a new standard shader node
                        bsdf_node = mat_tree.nodes.new('ShaderNodeBsdfPrincipled')
                        print(f"        '{node.name}' replaing by a Principled BSDF...")
                        # Copy the node's inputs to the new shader node
                        for input in node.inputs:
                            if input.is_linked:
                                for link in input.links:
                                    mat_tree.links.new(link.from_node.outputs[0], bsdf_node.inputs[input.name])
                            else:
                                bsdf_node.inputs[input.name].default_value = input.default_value
                        # Replace the old node with the new shader node
                        mat_tree.links.new(bsdf_node.outputs[0], node.inputs[0])
                        mat_tree.nodes.remove(node)

Output:
Looking object 'Cube'
  Looking mat_slot 'Material'
  Looking mat_tree 'Shader Nodetree'
    Looking node 'Material Output' of type 'OUTPUT_MATERIAL'
    Looking node 'Diffuse BSDF' of type 'BSDF_DIFFUSE'
Looking object 'Light'
Looking object 'Camera'

Big issue here: your code expects that node.type will return 'Shader' on shader nodes, but it doesn't. So all what's written beyond if node.type == 'SHADER': just never happens because the condition isn't met.

But to be honest, I think your method is wrong to begin with.
Before asking ChatGPT to generate a script, establish precisely what you want to do. " Convert this from this" works for you because you have pictures and assumptions. Scripting have only texts.
Look at your first material: you have a mix shader, that combines a Transparent and a Diffuse. The Diffuse's color is fed by a mix color that combine what looks like two different textures with a bunch of color transformations in between.

Are you sure all the materials you want to process follow the same pattern? If not, you need to really think beforehand of how to handle the different case scenarios.
Are you sure all you have to do is discard all nodes except one texture and plug it in the base color of a Principled BSDF ? If you want to preseve your material result, it's probably more complicated than that.
In fact, it's probably only plugging the last mix color into a Principled BSDF. But that's only for this material.
In which case, what you might need to do is :

Identify "a mix color node that is plugged into a diffuse shader"
Create a Principled BSDF
Plug that Mix color into the Principled's base color
Plug that Principled into the material output
Delete floating nodes

If you don't care about preserving your material and just have one texture and one Principled:

Determine which of the two texture nodes to preserve (maybe a pattern in the data name?)
Delete everything but that texture and the material output
Add a Principled
Connect.

For example, with this material:

A way to process it could be:
for each object:
    for each material slot:
        for each material:
            for each node:
                if node.type = 'TEX_IMAGE':
                    if not "DIFFUSE_" in node.image.name:
                        delete node
                elif node.type != 'OUTPUT_MATERIAL':
                    delete node
            connect the remains

Concerning the usage of ChatGPT, do understand that it takes effort and some degree of understanding of both Python and Blender's BPY. My experience so far with Blender is that I almost never got a functional script out of it, not without checking myself what he does, telling him the errors, the things he does wrong, and sometimes telling him to start over with a completelly new procedure.
Think of ChatGPT like a 10-year-old kid that does a bunch of google search for you in a split second and gives you back what "might be the answer you are looking for", all envelopped in a bunch of text that makes it look like it's an engeneer talking to you.

try with this, works in blender 4.0

# Script by Fredrik Lindgren - 2023
# studiosapiens.net

import bpy

for mat in bpy.data.materials:
    if not mat.use_nodes:
        continue
    nodes = mat.node_tree.nodes
    mix = next((n for n in nodes if isinstance(n, bpy.types.ShaderNodeMixShader)), None)
    while mix is not None:
        nodes.remove(mix)
        mix = next((n for n in nodes if isinstance(n, bpy.types.ShaderNodeMixShader)), None)
    emission = next((n for n in nodes if isinstance(n, bpy.types.ShaderNodeEmission)), None)
    while emission is not None:
        nodes.remove(emission)
        emission = next((n for n in nodes if isinstance(n, bpy.types.ShaderNodeEmission)), None)
    transparent = next((n for n in nodes if isinstance(n, bpy.types.ShaderNodeBsdfTransparent)), None)
    while transparent is not None:
        nodes.remove(transparent)
        transparent = next((n for n in nodes if isinstance(n, bpy.types.ShaderNodeBsdfTransparent)), None)
    light_path = next((n for n in nodes if isinstance(n, bpy.types.ShaderNodeLightPath)), None)
    while light_path is not None:
        nodes.remove(light_path)
        light_path = next((n for n in nodes if isinstance(n, bpy.types.ShaderNodeLightPath)), None)
    output = next((n for n in nodes if isinstance(n, bpy.types.ShaderNodeOutputMaterial)), None)
    if output is None:
        continue
    principled = nodes.new("ShaderNodeBsdfPrincipled")
    principled.location = (output.location[0] - 400, output.location[1]+100)
    mat.node_tree.links.new(principled.outputs[0], output.inputs[0])
    texture = next((n for n in nodes if isinstance(n, bpy.types.ShaderNodeTexImage)), None)
    if texture is None:
        continue
    mat.node_tree.links.new(texture.outputs['Color'], principled.inputs['Base Color'])
# Adds a value node and connects it to Specular with a value of 0.5. Doesn't transfer to Unreal. Thinking about how to set up and transfer other parameters than images. One way is offcourse to import all materials as instaces in unrel so I can have one Main Material in Unreal to set parameters for all instances of the Unreal Material.
    valueA = nodes.new("ShaderNodeValue")
    valueA.location = (principled.location[0] - 200, principled.location[1]-200)
    valueA.outputs[0].default_value = 0.5
    mat.node_tree.links.new(valueA.outputs[0], principled.inputs['Metallic'])
# Adds a value node and connects it to Roughness with a value of 0.5. Same problem as with Specular above.
    valueB = nodes.new("ShaderNodeValue")
    valueB.location = (principled.location[0] - 200, principled.location[1]-300)
    valueB.outputs[0].default_value = 0.5
    mat.node_tree.links.new(valueB.outputs[0], principled.inputs['Roughness'])
# Rename the material
    mat.name = 'A_' + mat.name
# Rename the the image
    image_node = next((n for n in nodes if isinstance(n, bpy.types.ShaderNodeTexImage)), None)
    if image_node is not None:
        image_node.image.name = 'A_' + image_node.image.name

```

"if you mutate something you're iterating over, you're living in a state of sin and deserve whatever happens to you" - Raymond Hettinger. Consider doing it like this instead: for mix in [n for n in nodes if isinstance(n, bpy.types.ShaderNodeMixShader)]: nodes.remove(mix), this will also make the code much shorter without duplicated parts.


text:
Lighting Keyframes Not Saving
Recently I've had an issue with my light in a scene. Basically, I have a point light that is parented to my character so that it follows the character around. I have set the emission strength to 0 at the first keyframe, and I then change it to a strength of 4 in the next keyframe. This is done because I only need the light active for a certain time in the animation. However, once I've set this keyframe, performing any other action will bring it back down to 0. For example, I set the keyframe to a strength of 4, move forward one frame, then the strength resets back to 0.
I can provide pictures if need be, but I think I've explained it well enough. Is there another way I could do this? Or is there some fix that I'm missing?
Thanks.

Have you set the keyframe again, after you've changed the value, or just changed the value?

Welcome to Blender Stack Exchange. It would be great if you include the blend file or upload a video of what's actually happening with the scene. I believe there might be some settings that have been changed thus causing you this problem

@lemon Hey, thanks for the answer. I relaunched Blender, deleted the keyframes, and set them again as you've described. Somehow that managed to work. Before I was adding the keyframe, THEN changing the value.
Of course it's something as simple as this!

@RileySpencer, you can also turn "auto keying" on if easier. This is the round button in the timeline.

I looked everywhere and couldn't find an answer that helped. My workaround was to encapsulate the light within a sphere and animate the sphere, for example let's say the sphere you have made around the light to block it out is scale 1,1,1 keep it this way until you need the light to come on then change the scale of the sphere to 0,0,0, bam lights on. It's the only thing that ended up working for me! : ) good luck!


text:
Can you animate to location of a generic physics constraint?
I have two rigid bodies (one active and one passive) connected through a Generic physics constraint, and would like to animate the location of the passive rigid body so that the other follows. Imagine a BigCube (passive rigid body) carrying a LittleCube (active rigid body) by means of a rope. Like a drone carrying an object with a rope or net.
I cannot seem to manage to get the location of the BigCube or the location of the constraint to keyframe to move in animation, so that the LittleCube follows.
Thank you very much!

i don't get it. You described what you have done, and that's how it works. If this doesn't work, pls provide blend file so we can check it out on our own, since you didn't show us any technical settings you made, you just described roughly what you did. thx.

Have you checked Animated on the passive rigid body? Because without, although you can animate the movement of the cube with keyframes, it will only be taken into account by the rigid body simulation with Animated enabled. Otherwise the passive body will be treated as if it stood still.

@GordonBrinkmann That's it, that solved my problem! Thank you very much. How can I accept your reply as the answer?

@Steffen Comments can only be upvoted, but not accepted as answer. I have written a proper answer below so this question can be marked as solved.

Make sure to enable the Setting > Animated for the passive rigid body object. To animate the object itself with keyframes this is not necessary, the keyframes will work like on any other object.
However the rigid body simulation will only take the animation into account when this option is enabled (just like on active rigid bodies). Without it, the passive rigid body moves, but the movement will have no effect on the simulation and will be treated as if it was static in the starting location.


text:
Creating a model for Garrys mod. How can I copy/paste my model in the edit mode to create a phys model?
I'm following this youtube tutorial but the teacher copy/pasted and continued on like nothing. I've looked around and I guess theres shift-d to duplicate but I'm really just trying to make a copy of this model to rename it with _phys at the end.
Here's the tutorial and its time stamped at the part I'm stuck at.
https://youtu.be/LWvAkJryAhI?t=180

one way is (the tutorial one):

select the object (be sure you are in "object mode" and not in "edit mode")
control c to copy
control v to paste
g (move), x (move only on X axis - so you can position better your object), move the mouse, left click when you want to drop the copied object

the other is:

select the object you need to copy (be sure you are in "object mode" and not in "edit mode")
shift d (duplicate)
x (move only on X axis - so you can position better your object)
left click to position the object

otherwise you can do your copy stuff directly inside "scene collection"
right click, copy, bla bla - see gif -->


text:
What is the meaning of the strength of the sun lamp?
all other lamp types in blender uses a physical unit to define strength but the sun lamp has a unit less strength value.So what is the unit of the sun lamp strength if it has or if it is relative what does 1 strength mean?

This is in the documentation:

Strength of the lights in Watts per square meter.

Though, I'm wondering if that should be kilowatts instead of watts.

That's a good observation. Sun intensity on a clear day is roughly 1000 W/m^2.


text:
'Add Modifiers' Button not appearing
I've been working on a model today, and all of a sudden the 'add modifiers' button has disappeared, as well as any other options on any of the other tabs. I don't remember hitting any random buttons, but this has kind of halted my progress. Any help is appreciated.

Seems to be a bug (that doesnt match the site guidelines), but it would be hard to report it as bug and let devs to check the issue from such a low amounth of info (also I'm not sure if there is happening any bug fixing for 2.79 version.

Might be worth restarting Blender?


text:
Jacket mesh not following rig
fairly new to blender. I have a jacket mesh I am trying add a rig to, in order import the mesh as an UMA recipe in Unity. The mesh have had weight transferred and I have added the rig as a modifier and it is activated. However when I try to animate the arm the mesh won't follow the bones. I am not trying to add the animation to the blender file, just testing to see if it follows the rig (which it doesn't) I am also attaching the blender file. What am I missing?

You need to add an armature modifier to the jacket (mesh_1) and fix the weight painting.

I added the armature and did not apply it, I then went back into weight painting mode and painted the entire mesh (I guess I missed this step). However when I transfer weight only left arm is added to the vertex groups, however at least when I move that arm the jacket follow, however it doesn't stick to the rest of the body. How do I add all vertexes (I selected By Name) in the little box down below to the left.

Select the jacket, delete all its vertex groups (Delete All Groups), give it the Data Trasfer modifier, choose the Source (which is UMA_Human_Male_Torso), enable Vertex Data, under Vertex Data click on Vertex Groups, click on Generate Data Layers, apply the modifier. Give your jacket an Armature modifier, choose the armature called UMA_Male_Rig as Object, it should work (it probably needs a bit of weight painting):

thank you so much for you answer, this fixed the issue with the jacket not sticking to the bones, I guess it was the data transfer step I missed.


text:
How to parent a 3d character to a kick scooter bike?
The kick scooter is not rigged but I thought of setting it's child of constraints to the character's root bone and I'm  not sure of it because I don't know which to move (whether the scooter or the character's root bone) during animation

yes you could parent the root of the character to the bike, then move the bike, you can also give Child Of constraints to the hand so that they stick to the handlebars

Thanks also for even talking about parenting the hands before asking


text:
Is it possible to Render a movie file as PNG and it's audio separately in blender?
I am planning to render an
Animation with sounds and character's voices lip sync but I don't want to render it at once as a movie file format (FFmpeg)  because I want to be able to pause it anytime.
So is there a way to render only the video file as PNG and then render only the audio with all the character's lip sync voices and sounds separately as an audio format and then edit and join the audio and PNG file to synchronize everything?

so you want to render each frame of your movie as a separate PNG image?

Images sequence does not render with audio, you could render your image sequences and then the audio (thoug is a better option to edit audio using a different program). After that you can use the Video sequencer to combine all and render as a video file

Of course. You can "Render Animation" (set the output as PNG) and "Render Audio". Both option located in the Render menu.

OK thanks so much. I'll try it


text:
How to apply nodes to object
I'm new to Blender. I've created a planet and as I created each node I saw the change in the planet happen immediately. After restarting Blender I can't see the results of the nodes anymore, the planet is just grey. How can I get back to the visual mode (sorry not sure what the mode is called). Here's what I see:

You are in Solid mode (Blender will automatically switch back to Solid when you'll start), switch to Material or Rendered mode by clicking on the icons on the top right or press Z for the pie menu.

super star! :). Thanks very much.


text:
Why is the light source not showing but light is being cast on the object
I'm new to Blender and I've downloaded a 3d file with this earth object showing. In the picture I can see the light being cast onto Earth and if I move the yellow dot around the light moves, but movement is restricted to <180 degrees between north and south of the light facing side of earth, no idea why it's restricted and how to unrestrict it.
What is strange is that no light source is visible on the screen, where is this light source and how do I select and show this on the screen?

Lights don't necessarily have any visible source.  If you want, you can create a mesh and parent it to the light to source it (just be careful about shadowing the light source, you probably want it invisible to shadow rays/shadow mode none in Cycles/Eevee respectively.)

You can't see the light object because you've disabled the Show Overlay option (see image below). Also, if you render, you won't see any light, only the light effect and its reflection on objects, if you want to see a kind of light source in your render you need to create an object that will look like a light source, for example a sphere with emission to make a sun.


text:
How can I create a ceiling being broken?
Using Blender 2.91 -
I have already learned how to use the cell fracture add-on and how to break things up, but my lack of understanding is in how to keep a pre-broken section of ceiling from falling or breaking up until it is struck by an object from above. I haven't figured out the animation/physics to keep the broken section "stuck" to the ceiling and being smashed from above. The collision object falls as it should, but so does the ceiling section . . . I am trying to figure out how to keep it in place before being hit and shattered. Any tips are appreciated.

Keyframe animated trait on frame 0.  Keyframe it off on the frame that the smasher touches it.


text:
Mix Shader Confusion
I am using the mix shader node for detailing a tower (cylinder) and have encountered an issue. The idea is that the main texture is white brick, with a black silhouette overlaid. I am using an Image Texture for the silhouette, putting the brick and image through the mix shader node. However, I can't get the black silhouette to work properly. I created one that is the opposite (black brick with white silhouette) and it worked fine. But when I try to balance the image of the black silhouette with the white brick, the silhouette doesn't show up until the entire thing is too dark. Both silhouette images have transparent backgrounds, so that shouldn't be an issue, but I can't seem to get the black one to mix with the white brick cleanly like the white one did. I'm still learning the details of this kind of detailing, so I may be overlooking an option.

Please [edit] your question and add images of your current nodes and the textures you have.

It would be helpful to see your nodes, but a hackish fix could be to set it up the way it works, and then invert it.


text:
How can I get a "kilt" shaped cloth simulation to work with a fast-moving animated character?
I am modeling a Knight character, and his armor included a Tasset (or "kilt"). The rest of his clothing has been modeled to the character mesh and moves in an acceptable fashion, but I haven't been able to get a cloth simulation to work without it seriously deforming, clipping, and basically being unable to keep up with the animation. I have tried numerous variations (I currently have chosen the Leather preset on the cloth simulator, with increased stiffness). I have modeled the Tasset with fewer polygons for a "stiffer" result. the collision object (the legs) have a subdivision surface modifier for extra polys, and I have used several different collision settings. (As you can see, it clips badly). I currently have it 'pinned' in the usual way for attaching clothing, which seems to be the only part that does work. Maybe the cloth sim just can't keep up with the poses and speed of the movement. I have watched many cloth sim tutorials and have gained some insights, but the solution still eludes me. So I am seeking some possible solutions or alternatives here. I've even considered trying to make the heavy sections "plates" instead of cloth, but haven't worked that out yet either. I have considered that I might have to resort to adding a rig and manually animating it, but I'm trying to avoid that if possible.
The images illustrate the behaviors, (Frames 1, 5, and 15) and I have also included images of the cloth and collision settings.
Thanks!

if you really want a helping answer here, you should provide a blend with which we can play around and make it work. Just providing some settings isn't enough, because we have no idea how fast your animation is, how your rig works and how e.g. your scaling is.

i think the easiest solution is to slow the animation down, make the cloth simulation, and speed it up afterwards....

Cloth simulations are notorious for being highly fragile, and susceptible to glitching when used as clothing. Trying to make one work well on a fast moving character sounds comically difficult. I think your best option is to just use multiple bones and fake the movement physics with armature animation after the base still cloth shape is calculated.

Thanks, I kinda thought I might have to go that route . . .


text:
How can I adjust the position of a Mixamo character so that when he stands up his feet stay on the floor?
I imported a "kneel" animation cycle from Mixamo, and the problem is that the hip bone remains in a static position, therefore when he kneels, from an objective viewpoint, his legs come up rather than his body going down with his feet staying on the floor. I've been fiddling with the graph editor and empty parenting but haven't quite figured out how to get it positioned so that the feet stay put and the body lowers during the animation. There don't seem to be any answers readily available for this specific kind of issue. I tried adapting the "correcting the slide issue" regarding a character's placement using the graph editor, but couldn't work out the right settings. Any help is appreciated.

Okay, I was wondering if it could be done using the graph editor, but as I said I haven't worked it out that way. I can do keyframes to get the position of the hip bone to line up. Was just curious if there was a shortcut. Thanks.

This is a regular thing. You have to animate the root of the armature, usually near the pelvis, to get his body to move down as a whole. There’s no way to reverse it so that his feet stay still on their own.
Tip: Use the 3-D cursor as a reference point to mark where the front or back of a foot is when you do this.


text:
Is it possible to add a new mesh to an existing armature that has already been animated?
I have an armature with an existing animation cycle, and am wondering if I can add a new mesh to it. The first pose of the animation is not well-suited to the mesh pose, and even though the "rest pose" is a standard "arms wide" pose, I can't alter it to fit the mesh in that mode. I'm still working out fine details like this in Blender, and learning what works . . . I haven't found many answers from other sources and am hoping someone might know here. I may be overlooking something. Thanks.

Hello why don't you change the mesh so that it has a T pose as well and align with the armature shape? You could move the arms with the Pose brush in Sculpt mode


text:
How can I keep the "Nock Point" on my bowstring from flattening?
I have created an archery bow model, and rigged it accordingly following a few tutorials. Unfortunately, I still have an issue: when I use the "string" bone to pull it, the string mesh has a flat area instead of being a clean angle at the point of the bone. I have been trying to correct it by altering the weight painting, but I can't seem to get it so the string doesn't deform in some way after adjusting it, and I still haven't achieved the clean angle at the nock point. I have used the IK and Distance Limit modifiers as instructed in the tutorials, which seem to give the bow model the desired movement and deformation, but this bowstring issue is persistent. I even tried making a new string mesh and the result was the same. Any suggestions are greatly appreciated. Thanks.

How did you make the bowstring? I think we'll need to see your Blend file to see what's going on. You can share it via https://blend-exchange.com/ following the instructions there to copy the link on that page. Then edit your question here and paste the link into it.

I tried to recreate the bow string in Blender. It seems to be the weight paint, although I do not know how it affects it.


text:
Can I have a transparent background AND a reflection of the object below in eevee?
I am trying to create a 3D animated element for a video, which would work best if I can have the object on a transparent background, yet still somehow render a reflection of it below. Specifically, a rotating 3D book that is supposed to have a reflection beneath it when composited with a 2D background.
Is this possible? I have been experimenting with lighting and reflection settings in eevee, but I haven't been able to resolve it, and the reflective qualities of the plane beneath the object are not showing in the 'render' shading. I may be looking at something that isn't workable, but if anyone has any ideas I am open to them.

What is the surface that you want the reflection on? Can you please add images? Even some kind of basic sketch will do.


text:
Fragments / light splotches in gpu render but not cpu render
So I’m trying to render this glass full of liquid, it renders fine on CPU render but on GPU render I get wired fragments/splotches in the shadows. I already tried reloading the kernels and all that but, nothing has worked
Cpu Amd ryzen 7 2700x
Gpu rx 5700
blender: 2.82a / 2.81 (tried both)
GPU render did work on a different computer which was some old 700 GPU

Two things;
1: It actually looks like the GPU is rendering more realistically. I think the reduction in quality would be /not/ having those artifacts (though this is debatable)
2: If you're rendering with Cycles, check to see if you have "Supported" or "Experimental" selected for the feature set. This setting will certainly cause rendering differences;

ok that does make sense, I did have a model error that made the problem much worse., but how does the explain when I used a Nivida GPU on a different computer, I got the same result as the CPU? or does it matter if that GPU was many times weaker than my main one? (rx5700). Regardless I think I may just want to try to remodel this and see if that fixes my issue. Also experimental did not change anything. Thanks


text:
Adding condensation effect on a texture
How to add condensation effect on a texture?
The way I add condensation effect is to add a texture image (condensation) to object material. However, I don't think we can use this method to add the effect on a texture? As it would be like adding texture on to another texture.
For example the label(coke) in picture below are a texture, how do we add condensation on it?

Thanks in advanced.

Hello and welcome :). The easiest way is to use a normal map and connect it into the normal input. That way you don't have to mix/combine anything.

@JachymMichal Thanks. just tried it, the condensation did appear on the label! However, it has problem on the scaling. The water droplets appeared horizontal stretched, and when I tried to correct it by scaling on the UV map, the Coke label was affected as well (became too thin or too wide). Maybe there is a way to scale individual image rather than to scale the UV unwrap area?

Hello :). Don't scale the UV map directly, but use the Mapping node for each image. This thread should help. Also, it's sometimes useful to use a second UV map for the condensation, for better control.

@JachymMichal hey, that actually worked :)

And now I am looking for where the Accept Answer button is..... maybe I am new that I dont' have that option?

There's no way to accept a comment :). I'll post a full answer later, so you can mark this question as solved.

You can use a Normal map for the condensation.
That way you don't need to mix anything, just plug it into normal input.

Example of a normal map.
You can download this one for free from Poliigon.

Connect the normal map like this.
Use different Mapping nodes and perhaps UV maps for better control.

I am using that texture from Poliigon as well, after watching Andrew Price's tutorial :)


text:
What is the best workflow for dealing with modifiers and complex objects?
I'm coming from Cinema 4D and a new user. I'm trying to figure out the Blender version of this kind of workflow:

Download car (for example) model from Turbosquid (made of hundreds of objects in a complex hierarchy)
Apply subdivision (or bevel) to the entire hierarchy non-destructively (in C4D this would be putting the entire Car hierarchy under a Subdivision Surface.
Apply effects to the entire hierarchy: For example, 'bending' the entire car using a single bend deformer.

I initially tried to use modifiers in Blender like this, but I'm confused by how they seem to only affect single objects and don't flow through the object hierarchy. Again I'm new to Blender so I'm probably missing something basic.

Yeah, in Blender you often need to select multiple objects (shift+G) or the different (shift+L) and apply effects to all of them via Ctrl+L or right-clicking a value and selecting 'Copy to Selected'

Your question is really broad but for your particular case, you need to tweak the modifiers in one of your objects, then select all of them and lastly the object with the modifiers, and link them with CTRL + L > Modifiers. In order to bend all objects at once you need to use the lattice modifier and a lattice object, then copy your modifier to all the others. Notice that some fields in the modifiers can be edited on multiple objects by pressing ALT + click on the field and changing the value

Thanks this is helpful. I'll explore these methods.

For bending an object (yeah, it's simpler if you combine all into one), you can use Mesh Deform modifier.

Make the cage around the car, simple box with subdivisions. Make it wire viewport visibility
Add the Mesh Deform modifier to the car and select the box and bind
Put Simple Deform modifier to the Cage object, or some other modifier


text:
How to set skin_root_mark on selected vertices of a skinned mesh generated in Python?
I'm writing a procedural tree generator that creates a mesh consisting of a network of nodes joined by edges, then adds a Skin Modifier. Here is a simple example with just one trunk and one branch:

The Skin Modifier does this:

I get the desired effect if afterwards, via the UI, I select all nodes that represent "joints" between branches and click "Mark Root" on the Skin Modifier.

It also works if I just select the whole mesh and hit "Mark Root", but obviously this is not really correct. But at this point I'll take that.
The Info panel suggests bpy.ops.object.skin_root_mark() and trial and error suggests this works on the selected vertices in Edit Mode. My effort at scripting this produces this error:
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.skin_root_mark.poll() failed, context is incorrect
Error: Python script failed, check the message in the system console

This error is raised by the attempt to switch to Edit mode or, if that is commented out, by the call to skin_root_mark (the latter is the version pasted above). I can't tell from this error message what the underlying issue is, especially as the same error occurs on either of the lines, which seem
The following is a MWE that exemplifies the crash without all the tree-building logic:
import bpy

# Clean up
bpy.ops.object.select_all(action="SELECT")
bpy.ops.object.delete()

verts = [(0, 0, 0), (1, 0, 0)]
edges = [(0, 1)]

# Create the mesh
mesh = bpy.data.meshes.new("TreeMesh")
mesh.from_pydata(verts, edges, [])
mesh.update()
mesh.validate()

# Create Object to hold the mesh and add it to the scene
obj = bpy.data.objects.new('Tree', mesh)
scene = bpy.context.scene
scene.collection.objects.link(obj)

# Add the skin modifier
obj.modifiers.new(name="SK", type="SKIN")

# Make sure to deselect everything in the mesh
# (I guess this is overkill but just in case it makes a difference...)
for g in mesh.vertices[:] + mesh.edges[:] + mesh.polygons[:]:
    g.select = False

# Select all vertices
for v in mesh.vertices:
    v.select=True

# Either of these lines raises the "context is incorrect" exception:
bpy.ops.object.mode_set(mode="EDIT", toggle=False)
bpy.ops.object.skin_root_mark()

As an aside, it's not at all clear to me how skin_root_mark works. What's the intended behaviour if you have nodes selected that belong to multiple objects and / or are affected by multiple Skin Modifiers? It seems like an odd choice to make it a global function rather than, say, a list of vertices attached to each modifier. If anyone can point me to info on the rationale behind this, that would also be very helpful.

The object is not active so the context (for the last two lines) cannot find on what to operate. Add bpy.context.view_layer.objects.active = obj

and by the way: only one root which corresponds the red circle in the UI.

@lemon That fixed it, thank you! If you make your comment an answer I'll accept. Looks like until now I'd failed to appreciate the distinction between "selected" and "active".

As said in comment, the object is not active and that's why the ops failed.
You may use:
bpy.context.view_layer.objects.active = obj

before the ops.
Though you can also without ops:
# Add the skin modifier
obj.modifiers.new(name="SK", type="SKIN")

#Get the skin vertices layers
skin_vertices = obj.data.skin_vertices
#Get the layer
skin_layer = skin_vertices[0]

#Assigns radius to some vertices
skin_layer.data[0].radius = (0.20,0.20) #Indices 0 and 1 are the vertex indices
skin_layer.data[1].radius = (0.10,0.10)

#Assigns root
skin_layer.data[1].use_root = True
#Assigns loose
skin_layer.data[1].use_loose = True

Also note that, this way you can assign multiple roots which is not allowed from the UI. I don't know if this can lead to issues or not.

Thank you, with the code example you also solved my next problem (how to set vertex radii individually). Much appreciated!


text:
Blender 2.8 Transform stretch problem
Whenever I try to transform any edges, all of the surrounding edges will raise up even if they are not connected.

Does anyone know why this happens and/or know how to turn it off?

Does this answer your question? Why does the entire mesh move in this model?

You will get a much more detailed answer there

Looks like you've got Proportional Editing turned on - you might have accidentally activated it with the hotkey O, or by clicking the small blue circle button just above the timeline, a little to the right of center. You can turn it off by pressing O or clicking the button again. That should restore the behavior you're used to.

That being said, proportional editing can be a really useful tool, so if you're not familiar with it, I'd definitely recommend reading up on it!


text:
Trying to get solid physics working coherently
I'm trying to make an animation of photos falling onto a surface for an intro. To do this I created a large plane (the ground) which I set to passive mode, then created 28 smaller planes, arranged them via randomizing (and a little hand moving).
Here is the file with my test so far
Finally I try to apply active rigid body physics to one of the planes and copy it to all of them. My problem is that I can't get any coherent output from this.
At first, the single first plane (plane.001 on the file linked) fell through the floor plane. I did a lot of tests including solidifying the floor plane, etc. Until finally I changed the shape of the falling plane to mesh, and it started working.
So I notice this test plane bounces around for a very long time, and I wanted a short bounce, so I tried setting bounciness but it did nothing. Eventually I settled on setting Damping translation and Rotation in Dynamics to a pretty high set of values (0.816 and 0.809). This seemed to achieve a shorter more "realistic" bounce around. So I copied the rigid body settings to all other planes ("copy rigid body settings") and... a couple planes (I think plane.005 and plane.012) fell through the "floor"...
Doing a lot of tests I eventually found that if I changed the Dampening Translation for those two planes a tad (one mouse pull) they stopped falling through.
Now the problem is that the end result was pretty "unrealistic", a few planes ended up resting in "air", a few planes ended up in various hard rotations (I expect them all to end flat on the floor plane), and one danced around with no end, bouncing back and forth.
More tests later I find that if I change the Shape to Convex Hull, all the planes but TWO (Plane.025 and Plane.026) fall through the floor. But those two planes, behave exactly as I want them to.. I tried changing the Dampening Translation a little for some other of the planes as a test, but they still fall through the floor... How can I stop all the planes from falling through? And have them all act "rationally" like Plane.025 and Plane.026?
How many things am I doing wrong? And which ones? :)

Sometimes rigid bodies are really tricky, changing the size of the hole scene is sometimes the solution. You could also try the same scene with soft and collision bodies, if they are photos, it would be more accurate since they have to bend a little bit.


text:
Cycles renders object deep purple
I've been following this tutorial (using blender 2.8). At around 14:15 a sphere is created and a texture with some modifiers wrapped onto it; this is what I get when following the tutorial exactly:
With Eevee:

With Cycles:

Why does Cycles forget about the nodes?
I created the shader with "All" as the output.
Tried redoing the material directly in Cycles; now the sphere is purple by default and remains so even after the texture has been added.

Looks like something went wrong when switching the render engines, since the second screenshot still shows Eevee's properties in the Material Properties and the render pause button is missing the 3D View. Are there any error messages on the Console (Windows > Toggle System Console)?

I'm redoing the objects; I couldn't seem to be able to refresh the engine (I recreated the second object's material from scratch with the output set to Cycles but once created it remained purple). Pretty damn frustrating.

I was able to recreate the problem: it seems to be caused by setting material output to Cycles (in the material editor) while rendering with Eevee (in the render settings). The only solution I know is to render with the same render engine as you specify in the material.

I tried this but it seems to be stuck to purple while in Cycles; the first object renders fine in Eevee. Tried recreating everything using Cycles; it fails from the start.


text:
Blender 2.8 does not render view port image
At the end ~26:00 of this tutorial:
https://www.youtube.com/watch?v=wUoE-1vYXPI
the selected view port is rendered. In my case, however, the render result differs from the view port:

Why isn't blender rendering the current selection instead of stuff from another layer? How can I render
only what's in the view port?

Hello :). Objects need to be manually disabled from render. You can use the outliner toggles for that. It's the camera icon. https://blender.stackexchange.com/q/141144/


text:
Sometimes, I cannot add primitives in blender 2.8
I've already found a fix (restart blender) but is there any other way of getting blender to "refresh" when hotkeys sometimes stop working?

If any hotkey stopped working it is supposed to be a bug so please file a bug report. Main Menu > Help > Report a Bug...


text:
Blender 2.8 breaks mesh after save
Blender 2.8 has just had a spike in entropy; now random transforms are being applied onto meshes when loaded from a saved file. I launched blender a moment ago and this is what's shown:

Yesterday, the cameras where inside the support as they should be. Today, blender moved them out. Is there a way of telling blender NOT to mess up saved meshes or at least display them as messed up before and after saving (so that I can prepare emotionally prior to modelling)?

if you scrub the animation bar, does it pop out of place?

I'll have an update ~tomorrow; unable to think straight atm


text:
Creating faces between vertexes faster
Sometimes, I have to remake a set of faces for an object. E.g.

Is there a faster way to create faces between the outer and inner ring only (no center) than by selecting every four adjacent vertexes and creating a face between them?

Select all verts, then Alt+F for "Fill", then Alt+J for "Tris to Quads" I think.

F2 addon can help too.

Go into edge mode, Shift Alt Select both loops, shift deselect one opposing edge in each ring then right-click and Bridge Edge Loops.

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


text:
Blender text not being properly applied onto cylindrical object
After creating "circular" text and applying it to a cylindrical object the imprint has a slope:

The object is a regular extruded cylinder:

you probably need to rework your topology, maybe take a look at this question: https://blender.stackexchange.com/questions/129013/engrave-boolean-modifier

I tried the solution there and managed to project the text onto the cylinder but it's barely visible

what I meant is that you probably need to rework your topology

Can you add more vertexes locally without redoing the entire model? E.g. https://blender.stackexchange.com/questions/193569/projected-text-barely-visible

the boolean has created ngons and stretched triangles, thus the artifacts, you need to recreate a clean topology, see the link, you need to rework a bit with join, knife, etc... I'm not sure you can avoid it... another solution would be to "fake" the 3d letters with bump node or normal node, but it really depends on the final purpose

It should look like: https://www.crucialfitness.co.uk/media/catalog/product/cache/1f29d024c5869e21508462f482692cc1/g/r/grip-2_7.jpg . I'll try to change the topology of the middle cylinder only (create a different object; reapply shader). I tried both the diff modifier and knife project. Would it be faster to do everything with bumps?

Let us continue this discussion in chat.

Yes if you don't need it to be in real 3D, do it with bump, you can bake the extruded letters then unwrap this part of your cylinder and give it a bump node, it will be much faster than rework the topology


text:
How to change orthographic scale with the pixel resolution and vice versa?
I have been using blender and while rendering I came into a problem, I change the camera size but not the resolution, this can be particularly tricky when the image needs to have the contents at the same size but the resolution be different. For example, 2D video game sprites are all the same size in appearance but differ in frame resolution. Such as games like Friday Night Funkin' where the sprites a in different sizes.
As you can see the scale changes but not the resolution, are there any settings or plugins that could solve my issue? Thanks.

Sorry, but what exactly do you expect? The Focal Length on a perspective camera can be used to zoom in and out, the Ortographic Scale is the equivalent on an orthographic camera. Like real cameras, zooming in/out doesn't change the resolution of pictures you take - it changes how far or close the pictured object is. It's the same in Blender - why should the resolution change when you zoom in? If you want a different resolution but the object should stay framed as it is, do exactly that: change the resolution (under Output Properties > Format > Resolution X & Y) or the Percentage.

@GordonBrinkmann I was looking to see if it could change with it, I get what you're trying to say but i have a different problem where im trying to import these into a game

Yes, I understand you want different sprite sizes - well, you have to render different resolutions or create them from one resolution in an image editing software. Do you think game creators get different sprite resolutions by zooming the camera in and out?

of course not, I just want to make sure every animation is the same size with the camera scale being different

If you want every animation to be the same size, why do you change the camera scale at all? Or do you mean for different sized objects and then... what? They should be fit in scale to each other but still fill the complete image frame? If so, that's nowhere mentioned in the question. As it stands I don't see why you are not simply rendering in different solutions or scaling the rendered image in Photoshop, Gimp etc.

https://cdn.discordapp.com/attachments/1075429196974792725/1090074025335717988/image.png

These too objects are in too different image resolutions but when put next to each other but when put next to each other they work perfectly in a game with a foreground.

I dont know if i need to be more clear with my examples but thats what i came up with

It seems I need to be more clear with what I'm saying. 1. You cannot animate resolution. An animation needs to have the same resolution from start to end. 2. Why do you need different resolutions? The objects can have the same size as in your image, no matter how much blank space is around them i.e. what resolution the image has. 3. I still don't see what determines this perfectly working together. In your linked example, the images have different resolutions, the objects, cube and cylinder have different height and width. Is it their original size? Then just leave the camera as it is.

I figured out a solution to my problem, ill render it larger for everything and just crop it after.

Yeah, that's what I already meant in my second comment, to create them from one resolution in an image editing software. Render everything in the same resolution and then edit the image to the size you want/need.

might take a while tho


text:
Switching between IK and FK and baking animation
I have this rig that can switch between FK and IK with a few bones, is there a way to make it so that after animating in IK, the FK bones move like the IK bones? I'm asking because I will only export the FK bones.


text:
Normal Baking Is going wrong
I have tried countless amount of times and I have yet to properly bake normal maps, it's either not capturing the details from the high poly, or- it does but the normal capture looks bad, It is a very simple procedure but I am somehow having all sorts of trouble
I tried tweaking the max ray distance/Extrusion and still no good results, Even a cage wouldn't work.
I thought I was doing something wrong but I followed a simple tutorial for example, even with the same object and still having issues.

Are you sure your surface is really flat and not bumpy ? It would explain why your normal map looks messed up.

yes, as you can see in the demonstration, my object is nothing but a simple door, and its frame.
I even made sure that I only have 1 bevel segment in the modifier for the low-poly so I don't have any baking issues

Please share your file: https://blend-exchange.com/


text:
Pixelated sculptures
I'm new to blender and I have Been trying to learn sculpting, however, I bought some excellent sculpting sets, but it's always blurry, even if I Increase the subdivision modifier
It's still blurry

Hello. Did you apply the modifier? Maybe If you  add an image that illustrates your issue, it will be easier to help you.

You can only sculpt geometry that is existing for real. If you increase the details with a Subdivision Surface modifier, this is procedural geometry, i.e. "virtual" and not yet existing geometry. It cannot be sculpted since procedural geometry can be changed anytime by changing the resolution for example. This would mean all sculpting would be lost if it could be sculpted.
To sculpt the higher detailed mesh creted by the Subdivision Surface modifier, you can do one of the following steps:

Go to the modifier, hover your mouse over it and press Ctrl+A to apply it.
At the top of the modifier, click on the dropdown menu $\lor$ and choose Apply.
In the 3D Viewport with the object selected in Object Mode, press Ctrl+A and choose Visual Geometry to Mesh.

Now you have applied the modifier and generated a "real" detailed geoemetry which can be sculpted. Note that you can no longer change the subdivisions as the modifier is gone now.


text:
How to move the edge along surface of an angled face?
I want to move this edge along the surface of an angled face. Is it possible?

Select a face of your mesh and in the Transform Orientations panel, create a new orientation, it will be selected by default:

Select the edge you want to move and move it on the desired axis (Y for me):

That works. Thanks.


text:
Is it possible to save Geometry Nodes modifier?
I would like to use created Geometry Nodes modifier in other projects and I can't find any way to save them.

Do you want it to be present in each new file you create or do you have it saved in one file and want to append it in a different one?

I think what I am looking for is the option to import previously created GeoNode modifier.
Or to transfer group of Nodes between files.

You have two Options:
1.) Right-click the Geometry Nodes Modifier in the Outliner and Mark as Asset, so you can access it from any other blend file via the Asset Browser

2.) When you have a specific blend file already open, you can select File > Append in the main menu to insert your Node Tree into the open blend file: Double click on the blend file that contains your GeoNodes Setup and look into the folder named "NodeTree". (It may be a good idea to check "Fake User")

For some reason I don't have such folder as NodeTree. Unfortunately I can't reproduce those instructions.

The "append" function opens a file browser in which you can navigate into the internal directories of your blend file. It should be there.

Allright. Now I get it. I was looking for the file named as Geometry Nodes modifier. Where it have to be the file that Nodes where created in.
Thanks.


text:
Voronoi texture on cube
I would like to reproduce the Voronoi cube effect as on the photo. This is inspired with the following post:
https://blender.stackexchange.com/a/143634/163648
Would it be possible to achieve this with geometry nodes?

https://blender.stackexchange.com/questions/5943/how-to-make-a-mosaic-plane/ https://blender.stackexchange.com/questions/92697/subdivide-face-with-nice-random-effect/

Quite easily. fist make sure you have enough topology, then use a set position then take the normal node use it as the offset, but first scale the normal (with the scale setting in the vector math node) by a voronoi texture (use smooth f1 with a low smoothness value)

@shmuel
I tried to follow instructions, but not sure if correctly as this is what I get.
https://imgur.com/a/IsTooBD

@healthyfat use the color not the distance. and maybe add more subdivisions/resolution

@shmuel You are right. Switching to color and adding subdivision works. I think the result looks pretty close. Thanks.
https://imgur.com/a/Wfp2v5a


text:
This part of the rig doesn't stay the same scale
The Part shown here is Not the Same Scale In Blender Then In Unity Here it is
Is Not the Same Scale as This

Is it Blender Or Unity If So any Fixes?

Did you apply scale on it before you exported it?

Yes and It even Didn't Work at All

If you export to FBX file try playing with "Apply Scaling" property in export dialog.


text:
Setting up reference images with empties - scales wrong
I'm setting up reference images for a car model.
I've found a suitable blueprint and cropped each view with Photoshop.
I've saved each cropped image seperately for use in blender, spending some time so that the pixel size of the images match. They are not quite perfect - but close enough to get a good idea of where the misalignments might be.
So:
The FRONT view image is 700 pixels wide x 500 pixels high.
The REAR view image is 700w x 500h
The TOP view is 768w x 1823h
The LEFT side view is 1823w x 500h
but something crazy happens when I add an empty and select these images :

Although the front view is actually 700 x 500 pixels it's way too big !
Strangely, if i rotate the front view 90 degrees - it appears to be the same size as the length of the side view and the top view !

any ideas ?
thanks - this is really confusing !

can you just scale the front view down with s until it is the right size?

It is the right size - it's 700 x 500.

Worked this out I think.
The best way to do this is to lay out the various views on one large SQUARE image.
It's important that its square, but doesn't really matter what size the images are as long as they are relatively scaled to each other.
Then move the images around to position the required view.

I have the same exact problem, how did you end up solving this ?


text:
360 video as environment background
I've tried loading the video in an environment texture node but it only displays the first frame of the video.
So, I tried another way: based on this question I extracted a sequence of images from the video, but I can only import one of them in the environment texture node.
What am I doing wrong?

Welcome to the forum! Could you please add a screenshot of your node setup or provide your blend file using https://blend-exchange.giantcowfilms.com/ ?

Press ShiftA and go to "Texture", and choose "Image Sequence". Then open the folder where the images are stored, press A to select all of them and then add the sequence.


text:
How can i loop foam on the ocean modifier in blender 2.8
for a while I have been trying to make a seamlessly looping ocean modifier animation and as far as the geometry goes I have a perfect loop, however, I have not been able to seamlessly loop the generated foam and I was wondering if there was an easy workaround for this  I'd appreciate any help I can get as I am stumped on where to proceed, thanks in advance to all those who can surrender some time.


text:
How can I recall the pie menu to toggle between sculpt mode and others
How can I recall the piemenu in the picture? thanks

If by recall you mean open/call, then press Ctrl Tab.

that's it. thanks a lot!


text:
Using ipad pro and apple pencil as a graphics tablet
I have an iPad Pro + Pencil and was wondering if there is any chance to use it as a graphics tablet with blender? I mean drawing on my Ipad and see on my pc monitor. Thanks.

This shouldn’t be closed ... the linked question isn’t the same question being asked here. Linked question wants to run Blender on the iPad. This question wants to use the iPad as an input device.

I have not found a solution after doing some research. But, there are possible ways to work around it.
If you have a Mac, then it might be possible to use Sidecar, allowing you to use your iPad with your machine. Unfortunately, I have yet to try it, my machine is too old so it does not support it.
There are also apps that can let your iPad control another computer. While touch is definitely supported, I do not think they will have the pressure detection features of the apple pencil.

Sidecar works, as does touch via it.

@troy_s, of course it should, but then problem is that pressure sensitivity might not which is a big reason for using a graphics tablet.

I think it does?


text:
IndexError: bpy_prop_collection[index]: index 48 out of range, size 2
I have this cube animation that moves at Z axis from Frame 1 to Frame 48.

I am trying to select a particular fcurve (Z location in this case) and trying to move a single keyframe from Frame 48 to Frame 62
import bpy

# Configuration
action_name = 'CubeAction'
data_path = 'location'
index = 2                # Z axis

# Find the appropriate action
action = bpy.data.actions.get(action_name)
if action:
    # From this action, retrieve the appropriate F-Curve
    fcurve = action.fcurves.find(data_path = data_path, index = index)
    if fcurve:
        for index in range(48, 63):
            fcurve.keyframe_points[index] += 2

But I am receiving an error below, what am I doing wrong?
Array iterator out of range: FCurve_keyframe_points_lookup_int (index 48)
Traceback (most recent call last):
  File "/Keyframe_mover.py", line 16, in <module>
IndexError: bpy_prop_collection[index]: index 48 out of range, size 2
Error: Python script failed, check the message in the system console

you try to access here: fcurve.keyframe_points[index] a keyframe point which obviously doesn't exist for index = 48

i think you misunderstood how the fcurves work:
check in the console:
 action.fcurves.find(data_path = 'location', index = 2).keyframe_points[1].co
result:    Vector((67.0, 4.13863468170166))

So Blender saves the keyframes in an array, where x is the frame number and y is the corresponding value (in this case the z location)
so if you have only two keyframes, the code should be like this:
import bpy

# Configuration
action_name = 'CubeAction.001'
data_path = 'location'
index = 2                # Z axis

# Find the appropriate action
action = bpy.data.actions.get(action_name)
if action:
    # From this action, retrieve the appropriate F-Curve
    fcurve = action.fcurves.find(data_path = data_path, index = index)
    if fcurve:

        fcurve.keyframe_points[1].co.x += 2

        print("changed")
    else:
        print("no fcurve")
else:
    print("no action")

print("end")

and by the way:
you should never use the same name (index) for different meanings - this is very bad coding and will make trouble.
You used index for the loop variable and for "z-axis" in line 6.

Thank you, this works.

You are welcome


text:
Get "number of lines in a string" as a value in Geometry Nodes

I have this node setup that takes a string and divides them into lines by using the special characters node to replace space " " with a line break.
I wanted a numerical value of the number of lines this outputs. For example, if there are 4 lines, I want 4 as an output.
Is this possible? The line option in string to curves node is a field and I don't know how can I convert it into an integer that can be used anywhere.

you could get it with this node tree:


text:
Mesh boolean in Geometry Nodes is slow, any alternatives or workarounds available?
I wanted some basic boolean operations for a few title animations. Here's one where I use a pie animation to reveal the text underneath

But using Mesh boolean makes the scene lag so much.
Is there a workaround or an alternative I can use?
I tried using holdout shader, but it makes the bg completely transparent and for me using compositor is not an option.

You should be able to control the transparency in shader nodes by using polar coordinates. https://www.youtube.com/watch?v=V7gFzuPG7Kc

I watched the tutorial you linked. How am I supposed to use this? The pie mesh is more like a disc rather than a sphere.

You can control the pie in shader nodes by using the angle component of polar coordinates, like so :

The blend file contains the entire polar coordinate node group but I stripped it down to the angle component for the screen capture.


text:
3D manipulators unselectable while "Lock to Cursor" is turned on.
After updating to 2.79 my 3D manipulators started to behave weirdly. I'm not able to select them, because pivot appears in the clicked position. Only when I turn "Lock to Cursor" off, manipulators seem to work again.

When I start a new project (without even rotating the view), 3D manipulators with "Lock to Cursor" enabled are selectable, but they bevahe oddly, like rotating in wrong direction etc.
Before 2.79 I was able to operate manipulators with "Lock to Curosr" turned on without any trouble. Now I can't work fast because I must switch "Lock to Cursor" again and again just to move around my project.
Can somebody help me, please?

I contacted Blender team and was notified that a fix was found :
https://developer.blender.org/T53850
Hope this help =)

I also got similar problems after a while using 2.79 but noticed that in other 3D views in different screen layouts the manipulators worked fine. Solved it by closing the 3D view with the problem completely and opening a new one. Hope this helps.

unfortunately it doesn't work for me :( Thanks for reply.

I had the problem until I reset to the factory settings, file > load factory settings. Though, it persists in my save files and I don't know what might be wrong in them yet. I have been able to get a new 3d view to work. Try duplicating the window as well. When this error comes up, I have gotten the manipulator to work if I keep clicking on it but it's not very often.

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


text:
Clipping camera to view moves mesh
I've created a mesh and applied a texture over it; after hitting Ctrl + NUMPAD_0 instead of moving the camera to current view the mesh is flipped in front of the camera:

Also, the camera also appears to have been hidden from the scene collection's viewer.
Who on Earth thought this was a good idea?

Hello :). Ctrl + Numpad 0 is to set active object as camera. To align active camera to view, use Ctrl + Alt + Numpad 0.

Thanks it worked! Couldn't find the original camera so I added a new one :P