text:
Why when i import an OBJ does it only appear as dots and not the actual solid?
I've been having an issue where when i import an OBJ file into blender it doesn't appear as the white "mesh" its just some kind of points. I was wondering how i could disable this, it used to be fine before but i think i must've accidently changed a setting. I will attach a screenshot below.

I must quickly add, this only happens with .OBJ files and not .FBX or anything else

Did you try to open the obj file with another software (meshlab for example)?
How does it look there?


text:
Normals flipped when exporting to FBX?
I'm running the latest version of blender. Almost every time I export a model into FBX, the normals of the imported model become flipped. I've been looking up how to solve this, but nothing seems to work; Negative scales turned positive don't change it, and all the normals on the model I'm exporting are facing the right direction. I have absolutely no clue why this is doing it, and all the solutions I've seen online don't seem to help me at all. Can anyone help with this?

are you sure  the normal are flipped? Sometimes it's just a material problem. And make sure the scale is applied before you export

@Alex you were right! It was so annoying - the settings for the material were wonky when importing. Oh well, now I know to look there in future. Thank you!

In the material settings, check if "show backface" is on.

source: Stack Exchange

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

sort: votes


text:
Weight Painting and Selecting Bones
I can't get a handle on weight painting. My understanding is that you should be able to set the influence each bone has on different parts of the mesh, but I can't seem to select individual bones for weight painting. I've read that you need to first enter Pose Mode, then select a bone, then switch to Weight Paint mode, but "Weight Painting" no longer appears in my menu options when I'm in Pose Mode.

In Object mode, select the armature then Shift-Click the Object. Then go into Weight Paint mode, Ctrl-Click the bone you want to weight paint and paint away.

Weight Paint mode is a mode for objects, not armatures. You need to first select the armature in Object mode, then Shift select the object, switch to Weight Paint mode, and Ctrlleft click to select the bones you want, Shiftleft click to add a bone.

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


text:
Program Stuck in Duplicate Linked Mode - Lost School Work
I'm teaching an animation class using Blender, and I have had several students encounter the following problem. Somehow they lock the program into a mode where every time they left click it duplicates the selected object. In the bottom left of the screen the duplicate linked menu is frozen in place.
The only way I have found to fix it, is to reset the program to factory settings, but this loses the work they've done.
I wonder if this is a program bug, or have they just enabled a random tool/feature?
We're running Blender on Windows, and are using 3.3.1
( The photo below isn't a screenshot of the actual issue, but a close approximation )

Couple of questions - Are any addon's being used? Also, have the key-mappings been changed to "industry standard" by any chance?

providing a blend file with that phenomenon would be a great help...

I guess the default shortcut for Duplicate Linked (Alt+D) was changed to LMB. How to reset? RMB in 3DView > In Object Context Menu: RMB at Duplicate Object > In Duplicate Object Menu: LMB on Change Shortcut. Now you will see Press a key (Change Shortcut Menu). Do not click left now. This is what probably happened. Press Alt + D for the default settings.


text:
How to hide all subdivision to optimize viewport
I'm working on a scene that is entirely based on subdivision loops, As time passes by the scene got detailed and the view-port got laggy.
I turned off subdivision views to optimize it, but that meant I'll have to go through hundreds of assets. Its there a shorter and safer way to turn off all subdivision?

Try simplify.

You can set the view subdivision level of a selection of objects simultaneously by hitting Ctrl + keyboard 0 - 5

This was answered already in the comment, the global solution is in Render Properties panel, enable simplify sub-menu, and set the max-subdivision level to your preference.
Notice that there are separate inputs for viewport and render.


text:
Animating object from speed data in python
This is the deal now...I have a speed data in a .DAT file; For example lets say the file looks like this
0.111
1.11
2.22
3.33
4.555
1.111
2.22
10.11

What this data represents is the instantaneous speed in m/s of a certain object, these data intervals are in 10 mil-second difference that means that we get the speed of the object in every 10 mil-second interval. So I was wondering on how I will convert this to a motion on an empty in blender using python. Any help or ideas in the comment is also more than welcome.

Integrate the velocity curve.
Please note: Am currently working on an addon that uses 3rd party addons scipy (to integrate here) and matplotlib to plot.
Displacement is the integration of the velocity curve.
Instead of 10ms between points (would need frame rate of 100fps for a frame each) have spread the velocity across the scene frame range. dt is how many frames between points.
Scipy.integrate.cumtrapz is used to integrate the velocity list, setting initial displacement to zero.  This is basically the sum of the area of each trapezium. Remember have bloated out the time scale, for strictly having  10ms between readings
t = np.linspace(0, len(v) * 10 / 1000, len(v))
s = integrate.cumtrapz(v, t, initial=0)

and the frame for 10ms (where fps = 24) can use the utility method.
>>> bpy.utils.time_to_frame(10 / 1000)
0.24

Result of Matplotlib.pyplot

Displacement in blue, velocity (scaled by frames per point (dt)) in red
The resulting fcurve.

Test script maps the displacement to the frame range, considering velocity as blend units per frame, rather than meters per second.
import bpy
import numpy as np
from scipy import integrate

plot = False

context = bpy.context
scene = context.scene
ob = context.object
ob.animation_data_create()
ad = ob.animation_data
action = ad.action or bpy.data.actions.new("Displacement")
ad.action = action

v = np.array(
    (
        0.111,
        1.11,
        2.22,
        3.33,
        4.555,
        1.111,
        2.22,
        10.11,
    )
)

t = np.linspace(
    scene.frame_start,
    scene.frame_end,
    len(v))
dt = t[1] - t[0]
s = integrate.cumtrapz(v, t, initial=0)
if plot:
    from matplotlib import pyplot as plt
    plt.plot(t, s)
    plt.plot(t, dt * v)
    plt.savefig("disp.png")
    plt.show()
# ravelled list of frame, value keyframes
kfs = np.empty((v.size + t.size,), dtype=t.dtype)
kfs[0::2] = t
kfs[1::2] = s
# move in x location
fc = action.fcurves.find("location")
# remove if exists
if fc:
    action.fcurves.remove(fc)
fc = action.fcurves.new("location", index=0)
fc.keyframe_points.add(len(v))
fc.keyframe_points.foreach_set("co", kfs)
# add linear velocity points before and after
kfs = np.insert(kfs, 0, (-dt, -v[0]))
kfs = np.append(kfs, (scene.frame_end + dt, s[-1] + v[-1]))
# set handles based on before / after
fc.keyframe_points.foreach_set("handle_left", kfs[:-2])
fc.keyframe_points.foreach_set("handle_right", kfs[2:])

Exemplary. Thank heavens I didn't have a shot at this one!


text:
Object not Rotating Correctly?
bit of a noob here. I'm trying to learn 3D, and just did Blender Guru's donut tutorial. I wanted to do a little video with my donut where it rolls forward and crushes the camera. But, whenever I rotate the donut, it gets all wobbly. It moves forward straight, but the rotation is off. It ends at the rotation that I set it to, but the rotation path is all over the place. I tried to put some pictures to show what I mean. I've tried changing the axis it rotates on from global to local, locking the other directions and just letting the correct axis values change, I followed some rolling tire tutorials that use constraints and an empty box (like this: https://www.youtube.com/watch?v=DuzdO5ENAvY&t=197s) but I just can't get it to work. Any advice?

[

hello, have you applied the rotation? or please share your file: https://blend-exchange.com/


text:
Lookup table for 'industry compatible' and the default 'industry incompatible' shortcuts?
I am having a horrid time trying to do the donut tutorial because there's no lookup table for 'industry compatible' shortcuts vs the standard ones.
Unfortunately 'Just use the Blender default shortcuts' is not an option when I also have to use several other applications that orbit-like-Maya (years of muscle memory) and have stuff like 'press f to focus' as defaults that I normally don't have to think about.
The donut guy says something like 'press shift A to get this menu' but doesn't say what it's called, so I can't look up what it is in the shortcuts list and switching between 'industry compatible' and the default shortcuts to look up what the tool is called is driving me loopy.
Where can I find a table that says 'Tool name, Blender shortcut, Industry Compatible shortcut'?
Does it exist?
If not, how would I go about making it?

Hello ! I don't think there is an built-in way to have that information. Usually most if not all edit or object mode operations can be accessed in the menu bar on the top of the 3D viewport, it may be beneficial to know where to find things there before learning the shortcuts. You can also find operations by name using F3 and typing it out. In both cases the shortcut is usually noted besides the operator field

That'd be ideal but the Donut Guy only says what shortcuts to press, not what the names are so I can't reverse-lookup what the thing is called!
Catch 22


text:
Alpha Over makes my image brighter
So i've been sitting here with a problem in blender 2.9 that i just can't seem to solve, when i add an alpha over with id mask and more to make a certain material glow, the image gets brighter (more noticeable with a darker background), the brighter result just removes the rather grimmier atmosphere in my opinion, but the brighter result seems to get caused by alpha over node. The top image is the composited result and the bottom image is the render result. What i've tried so far is looking at other topics, like adding an alpha convert node, but this just seems to disable every composite node i added. I tried replacing the Alpha Over with an add node but this just seems to have the same effect.

Try hooking different earlier nodes directly to the viewer, one at a time, to make sure you are getting the expected result from each one. [subject-relevant non-offensive pun here]

@ZargulTheWizard I will try!


text:
How do I convert a rotation matrix into the correct quaternion for particle rotation?
I'm trying to render fractals using a particle system.
I generated the one on the left using graphics programming. The one on the right is rendered using a particle system. The rotation matrix conversion results in the expected quaternions but the particle system interprets them in a different way. I don't know how to offset this difference. I tried a lot of things like swamping and inverting axis. for some examples it works but I haven't found a solution to convert the rotation matrix to quaternions for the particle system consistently.
This is the code I currently use to calculate the quaternion.
def rot2Quat(M1):
    r = np.math.sqrt(float(1)+M1[0,0]+M1[1,1]+M1[2,2])*0.5
    i = (M1[2,1]-M1[1,2])/(4*r)
    j = (M1[0,2]-M1[2,0])/(4*r)
    k = (M1[1,0]-M1[0,1])/(4*r)
    return(i,j,k,r)

After some testing I found that setting the particle rotation to (0.71,0.0,0.0,0.71) results in the original orientation of the object. I don't know why this isn't (0.0,0.0,0.0,1.0). This is the best clue I found so far.

I changed the code to
def rot2Quat(M1):
   r = np.math.sqrt(float(1)+M1[0,0]+M1[1,1]+M1[2,2])*0.5
   i = (M1[2,1]-M1[1,2])/(4*r)
   j = (M1[0,2]-M1[2,0])/(4*r)
   k = (M1[1,0]-M1[0,1])/(4*r)
   return(k,-j,i,r)

The quaternion is formatted in Z,Y,X,W format I'm not sure why I had to invert the Y (this could be a bug in another part of my code).
And I multiplied the final quaternion with (0.7071,0.0,0.0,-0.7071).
quaternion_multiply( rot2Quat(rotMatrix),(0.7071,0.0,0.0,-0.7071))

This solved my problem.


text:
All materials appear black in the preview render (EEVEE 4.3)
While I was modeling in Blender 4.3, I switched to material preview mode to texture it, but the models appear to be black. I wanted to make sure that this wasn’t universal, so I went to version 4.0 (the latest version of Blender I have before 4.3) and noticed that the mistake didn’t persist, and that the models retain their original textures.
(The image at the top is 4.0 while the image at the bottom is 4.3)
This just happened today, as any other day the model would appear either it's default white or with a visible material or texture applied. The only way I could circumvent this in eevee was to enable raytracing settings and either disable Fast GIU Approximation or slide the treshold all the way to 1.00, but I'm not one to continuosly use raytracing if I simply want to view materials. Does anyone else have this problem and is there a way to fix this?


text:
Is it possible to create a cartoon mouth using Bezier curve?
I am trying to create a cartoon character with a simple mouth, but there are no tutorials that answer my question. Can I use a curve to animate a mouth? And if so, how can I?

could you please elaborate? What do you mean by use a curve to animate a mouth? You have the Spline IK that allows to use a curve to control an armature for example: https://blender.stackexchange.com/questions/116124/how-to-rig-a-cartoon-style-hose-limb-cartoon-arm/116128

Or do you want to use a bevelled curve to make the mouth itself?

I'm not sure if this is a straight answer, but I want the mouth be a hole in a mesh, and the shape of the hole can be changed using a Bezier curve.

so Spline IK may be a way to do it, click on the link I've given


text:
Animation frame-rate issue
so I copied an old blend file and started working on a new animation, but the frame rate changed from the original 75 to 30. I changed it back and made the animation but the framerate still runs in 30-40 even though the first animation still runs in 75. The dope sheet even says it's running in 30. The full video below shows the issue.
https://drive.google.com/file/d/1xTYVp6GbZv1kzQ_io2dKH_tobEmSQ02q/view?usp=sharing

The framerate shown in the 3D view Window is the maximum framerate your hardware can achieve trying to animate your mesh at the programmed framerate. If you render the scene it will be rendered at the expected framerate (the setting in the properties panel), but during realtime play, if the complexity of the scene reaches the limits of your hardware, the animation gets slowed down, and the info on the 3D window tells you how much.
If you want to see your animation in real time at the desired framerate, you have to temporarely simplify your scene (turn off unuseful pieces and/or create simplified proxys of your meshes), or boost the qualities of your hardware.
After the animation is finished you can switch back to the original meshes for rendering or exporting.
These are areas in which others specialized 3d softwares (Unreal engine, Unity, ...) shine better than Blender.

Okay yeah, it seems that it runs poorly on material preview mode. I believed it ran the same as solid mode but I was mistaken. thanks.


text:
Convert to Curves
I try to convert my vertices to curves , but when i go to Object data properties > Bevel > Object and then select my bezier circle i get ugly rectangular broken shape.

Left : Curve create by converting a line of vertices to a curve Right : A normal curve

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

The default Spline Type for a converted mesh is 'Poly' (straight segments between control points, without handles).
After converting your mesh to a spline, set the Spline Type to Bezier, and handle type to Automatic:

You need to add a subdivision modifier to your line before you convert it

You can also convert it to a bezier curve or Nurbs

If you change it to a bezier curve, you might need to change the handle type to automatic or aligned with the shortcut V

If you change it to a Nurbs, you can enable endpoint so the curve starts and ends at its endpoints

It's better , but it gives me little controls left if i need to adjust the curve ( because of all the new points created )

@Sakisaki I edited my answer, also you can just start with a Path curve instead of converting a mesh to a curve


text:
Sticky tape around stuff

I tried few tutorials , followed some tips on the subject , tried shinrkwrap / simulation / modeling / geometry nodes / editing / curves but i can never achieve the effects i want because of my lack of knowledge on the subject and the lack of information on the web..
Can someone actually show me the way to make sticky tape around object pressing closely against it following perfectly it's topology?
Blend file : https://ufile.io/x3iztaml

Please don't use external sites with adverts to share your Blend file. Since it's under 30Meg in size you can share it via https://blend-exchange.com/ following the instructions there.

Helo ! Hard to say with the tiny snippet but I think what you want to do is use a shrinkwrap modifier THEN a solidify modifier. Remember to subdivide your tape object enough so that it can bend without being ugly

Not exactly the same, but maybe some clues here

I don't know if you can fix it with the current topology, but it will work better if you simplify the topology of your bag (with the remesh tool):

Same thing for the tape topology (simplified with the Checker Deselect tool):


text:
Modeling stylised fur

How can i make something similar to the left object? Mid Poly stylised fur all around the right object.
I managed to do it with particle system , also curves and in sculpt but none of them gave the results i hoped for.

You could paint a black and white dot texture (or any shape of texture) in Sculpt Mode with the Stencil in order to create peaks on your torus:

If they are not sharp enough, choose the Mesh Filter > Enhance Details:

If the peaks need to be a bit tilted, select an inner ring, enable the Proportional Editing option and rotate on Z:

A more low poly option is, to use checker deselct.

Select an edge loop and then use checker deselect. You get a selection of every other vertex of the loop. You can then use rotate & scale to create spikes. This results in a very regular mesh.

Randomize verticies solves that pretty well.
I got this result in only a few minutes. WIth a bit of tweaking and proportional editing, you could easily get a very nice result.


text:
Head tracking Target

Every time i tried to make the head bone follow a target , it never work  , i tried with both Track To and  Damped track and it always end up with the head being snapped , looking away or not reacting at all.
How do i make it work?
Blend file here : https://ufile.io/j0in41yp

Set the ball origin to geometry

and set the contraint to the Y axis


text:
Find missing files per script
I have hundreds of blend files containing assets. I moved the directory containing the textures. "Find missing files" works fine, but it would be quite some work to repeat this step for all files. Is there a way to perform this operation within a python script?
Iterating over all materials and replacing the path would theoretically work, but I would prefer this inbuilt feature, when possible.
Related to Find Missing Assets automatically? but as script and no autostart.

Will bpy.data.images[i].filepath help you? .source also tells you if the image is a file or not.

@TheLabCat thanks, this will definitely come in handy

Based on @TheLabCat hints I wrote a python script searching and relinking missing files for all blend files. In case anyone else has a similar issue, feel free to copy and adapt.
Called as usual: blender --background --python ./theScript.py
import bpy
import glob
import logging
import os

logger = logging.getLogger(__name__)
logging.root.setLevel(logging.NOTSET)

# Dump to file
fh = logging.FileHandler("log.log")
fh.setLevel(logging.NOTSET)
logger.addHandler(fh)

# Blend files
blends = [
    "/YourRoot/**/*.blend",
]

# Directories (glob patterns) to look for textures
directories = [
    "/TexturesRoot/**/*.*",
]

files_lookup = {}
for dir in directories:
    for p in glob.glob(dir, recursive=True):
        files_lookup[os.path.basename(p)] = p

# And an additional set of exceptions (old file: new file)
replaces = {
    "old.png": "new.png",
}

def process(filepath):
    bpy.ops.wm.open_mainfile(filepath=filepath)
    os.chdir(os.path.dirname(filepath))

    dirty = False
    for image in bpy.data.images.values():
        if image.source == "FILE":
            # Make absolute
            if image.filepath[:2] == "//":
                path = os.path.abspath(image.filepath[2:])
            else:
                path = image.filepath

            # Check if file does not exist
            if not os.path.exists(path):
                name = os.path.basename(path)
                if image.filepath in replaces:
                    logger.info(
                        f"File {image.filepath} replaced with {replaces[image.filepath]}."
                    )
                    image.filepath = "//" + os.path.relpath(replaces[image.filepath])
                    dirty = True
                elif name in files_lookup:
                    image.filepath = "//" + os.path.relpath(files_lookup[name])
                    logger.info(f"File {image.filepath} found.")
                    dirty = True
                else:
                    logger.error(f"File {image.filepath} not found!")

    if dirty:
        bpy.ops.wm.save_as_mainfile(filepath=bpy.data.filepath)

if __name__ == "__main__":
    for dir in blends:
        for file in glob.glob(dir, recursive=True):
            process(file)

Not the prettiest solution but it did the job :)


text:
How to get the x length of a slice of an object, using python?
If I had a complex object, and it's axises aligned. How can I get the x length or coordinates given a z coordinate?
For example, how can I get the x length of object's slice , given z=-1, y= -2?
For now, I use a thin plane to bool intersect the object, and get the bound box of the intersection result. But I think there should be a more efficient way to do this.

use ray_cast, It has a template on the text editor.   https://docs.blender.org/api/current/bpy.types.Object.html#bpy.types.Object.ray_cast

As @X Y suggested, this can be done with ray_cast. Coordinate x = 0 along with your y and z coordinates can be used to set the origin of the ray casts. You can then shoot one ray in the -x direction and another in the +x direction to get the intersection points p1 and p2, which are stored in index 1 of the two cast results. I also added a two tiny spheres to verify the intersections.
import bpy
from mathutils import Vector

someObj = bpy.data.objects['SomeObject']

y = -2
z = -1

origin = Vector((0, y, z))
direction = Vector((1, 0, 0))

# ray_cast parameters: (origin, direction, distance, depsgraph) --- excluding depsgraph
cast_result1 = someObj.ray_cast(origin, -direction, distance = 10)
# -x intersection point:
p1 = cast_result1[1]

cast_result2 = someObj.ray_cast(origin, direction, distance = 10)
# +x intersection point:
p2 = cast_result2[1]

# distance between intersection points:
distance = p2.x - p1.x

bpy.ops.mesh.primitive_uv_sphere_add(radius = 0.1, location = p1)
bpy.ops.mesh.primitive_uv_sphere_add(radius = 0.1, location = p2)


text:
how to get path to asset library with specific name
I've encountered a problem and I can't find a solution for 3 days

I need to get the path to the asset library with the name (let's say LID)
Also i need to equate this path to an attribute named PTF

Part 2 works and looks like this
PTF = library.name

file_path = PTF + "\Base_def.blend"

Blender version 3.6 Lts
I tried to solve this problem using gpt chat but it doesn't work
It can't find the path and says (library not found) i double checked the library name it is spelled correctly
import bpy

# Specify the name of the asset library you're looking for
target_library_name = "User Library"

# Search through linked/append sources
for library in bpy.data.libraries:
 if library.name == target_library_name:
     library_path = library.filepath
     print(f"Path to '{target_library_name}' library: {library_path}")
     break
else:
 print(f"'{target_library_name}' library not found.")

Hello and welcome. Your questions lacks details and until you provide more details, this question will be closed .

Hello, I don't understand the second part, what to you want to equate with what ?

I'm not a coder so I could be wrong in terms
but I wrote this working code (if you replace library.name with the correct path)
PTF=library.name
file_path = PTF + "\Base_def.blend"

bpy.data.libraries will return you a list of library types which are linked blend files, not "asset libraries". It is unclear what you are trying to do here, what is the end goal?

If you link somthing from a .blend file and run this in the python console: for library in bpy.data.libraries: print(f"Library '{library.name}' is located in : '{library.filepath}'") it will show you the name and path of the blend file you linked from.


text:
High to Low poly Texture Baking
I am trying to bake diffuse textures from high-poly to low-poly model and it gives me black result.
I did successfully bake textures using this method before, but this time none of my models work. I am at the end of my wits, please let me know what am I not seeing here?
Low poly model is uv-unwrapped.
Blend File

Put the Metallic value of the Principled BSDF at 0, you can't bake the diffuse of a material with metallic.


text:
How do I get into pose mode?
How do I get into pose mode?
I've made sure the settings are right from a tutorial I watched, and had the armature selected but whenever I go to the body or anything else, I can't go into pose mode. I don't even see a pose mode.

This is normal. Pose mode only for armatures, you can't select anything else. What do you want to do with other objects in pose mode?

The Pose Mode Exists only for Armatures (Bones). The body is a mesh and not an armature. So to enter the pose mode you will have to select the Armature and not the body. Once you select the armature simply go to the pose from the menu above.
Tip: Click Ctrl+Tab  to Enter the pose mode directly. (This is only for armatures)

The only way I've found is this: Press Shift+F9 to go to Outliner panel. Then press ↓ or ↑ keyboard arrows to select the Armature. Press Shift+F5 keys to go back 3D Editor.
As the Kalaakaar said: press Ctrl+tab to switch between Object Mode and Pose Mode.
If you have just one Armature, press F3 and write "select armature", then press enter to select that one.


text:
I accidentally deleted fly/nav. How can I get it back?
I accidentally deleted fly/nav and I need it to move the camera. How can I get it back?
I don't know how to "undo" this or how to restart blender to original preferences, so you could give me new ideas, or tell me what to do so I can do it.

Hello and welcome to BSE. You mean View > Navigation > Fly Navigation? You cannot delete that so I'm not sure what you mean. Please add screenshots.

You can go to Edit > Preferences > Navigation and first of all look what is set there under Fly & Walk and maybe switch something there:

Or more likely you have either (since it is a bit unclear what you mean by  "deleted") changed the shortcut for Fly navigation or disabled the shortcut.
To find out, go to Keymap in the Preferences and enter "fly" in the search field (make sure it's set to Name not Key-Binding). This should only show View Navigation (Walk/Fly) as result. If the shortcut was changed, there is a Restore button over the keymap which you can press. If not, maybe the checkbox in front of the shortcut is disabled.


text:
Script works in python console and "run script' but cannot be enabled as an addon
I am a beginner in scripting so I am aware that this might be trivial thing, but I will appreciate any help.
I was trying to make some automation to my geometry node workflow.
The main utility of it, is that it should append highlighted nodes from another file to the new file during the installation of the addon and then I should be able to apply the following nodes with the New panel and Button.
The problem is that the installation goes successfully, but then I cannot enable the addon although once I put the same code into a text editor and run it, the panel appears and the button correctly recognizes the addon's folder and applies the desired effect. I got this error*when I try to enable it.
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 3.6\3.6\scripts\modules\addon_utils.py", line 333, in enable
    mod = __import__(module_name)
  File "C:\Users\PC COMPUTER\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\hardsurface_addon2\__init__.py", line 25, in <module>
    bpy.ops.wm.append(
  File "C:\Program Files\Blender Foundation\Blender 3.6\3.6\scripts\modules\bpy\ops.py", line 107, in __call__
    _BPyOpsSubModOp._view_layer_update(context)
  File "C:\Program Files\Blender Foundation\Blender 3.6\3.6\scripts\modules\bpy\ops.py", line 70, in _view_layer_update
    view_layer = context.view_layer
AttributeError: '_RestrictContext' object has no attribute 'view_layer'

This is the addon's folder:
The full script looks like this now:
bl_info = {
    "name": "Hard-Surface Paneler",
    "description": "Applies various procedural effects onto the selected objects.",
    "author": "Krzysztof Galant",
    "version": (0, 1),
    "blender": (3, 6, 0),
    "location": "View_3D > UI",
    "category": "Object",
}

import bpy
from bpy.utils import resource_path
from pathlib import Path

USER = Path(resource_path('USER'))
src = USER / "scripts/addons"

file_path = src / "nodes.blend"
inner_path = "NodeTree"
object_paneling = "Paneling"
object_massing = "Massing"
object_shelldevision = "Shell Devision"
object_volume = "Volume to Mesh"

bpy.ops.wm.append(
    filepath=str(file_path / inner_path / object_paneling),
    directory=str(file_path / inner_path),
    filename=object_paneling,
)

bpy.ops.wm.append(
    filepath=str(file_path / inner_path / object_massing),
    directory=str(file_path / inner_path),
    filename=object_massing,
)
bpy.ops.wm.append(
    filepath=str(file_path / inner_path / object_shelldevision),
    directory=str(file_path / inner_path),
    filename=object_shelldevision,
)
bpy.ops.wm.append(
    filepath=str(file_path / inner_path / object_volume),
    directory=str(file_path / inner_path),
    filename=object_volume,
)

class OBJECT_OT_ExecuteMyAddon(bpy.types.Operator):
    bl_idname = "object.execute_my_addon"
    bl_label = "Execute"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):
        # Loop through the selected objects and apply effect for each object
        for active in bpy.context.selected_objects:
            bpy.context.window.view_layer.objects.active = active  # Set the active object

            # Add Geometry Nodes modifier for Massing
            gn_modifier = active.modifiers.new("Geometry Nodes", type='NODES')
            gn_modifier.name = "Massing"
            massing_node_tree = bpy.data.node_groups.get("Massing")
            if massing_node_tree:
                gn_modifier.node_group = massing_node_tree

            # Add Geometry Nodes modifier for Volume to Mesh
            gn_modifier = active.modifiers.new("Geometry Nodes", type='NODES')
            gn_modifier.name = "Volume to Mesh"
            volume_node_tree = bpy.data.node_groups.get("Volume to Mesh")
            if volume_node_tree:
                gn_modifier.node_group = volume_node_tree

            # Add Decimate modifier for Collapse
            decimate_mod_col = active.modifiers.new(name="Decimate", type="DECIMATE")
            decimate_mod_col.ratio = 0.5
            decimate_mod_col.name = "Decimate Collapse"

            # Add Geometry Nodes modifier for Shell Devision
            gn_modifier = active.modifiers.new("Geometry Nodes", type='NODES')
            gn_modifier.name = "Shell Devision"
            massing_node_tree = bpy.data.node_groups.get("Shell Devision")
            if massing_node_tree:
                bpy.context.object.modifiers["Shell Devision"]["Input_2"] = None
                gn_modifier.node_group = massing_node_tree

            # Add Decimate modifier for Planar
            decimate_mod_plan = active.modifiers.new("Decimate", type='DECIMATE')
            decimate_mod_plan.name = "Decimate Planar"
            decimate_mod_plan.decimate_type = 'DISSOLVE'
            decimate_mod_plan.angle_limit = 0.261799  # radians, which is approximately 15 degrees

            # Add Geometry Nodes modifier for Paneling
            gn_modifier = active.modifiers.new("Geometry Nodes", type='NODES')
            gn_modifier.name = "Paneling"
            massing_node_tree = bpy.data.node_groups.get("Paneling")
            if massing_node_tree:
                gn_modifier.node_group = massing_node_tree

            # Add Mirror modifier
            mirror_modifier = active.modifiers.new("Mirror", type='MIRROR')
            mirror_modifier.use_axis[0] = True
            bpy.context.object.modifiers["Mirror"].use_bisect_axis[0] = True

            bpy.ops.wm.toggle_all_show_expanded()

        print("Operation applied!")
        return {'FINISHED'}

# PANEL CREATION
class MyAddonPanel(bpy.types.Panel):
    bl_label = "Hard-Surface Paneler"
    bl_idname = "OBJECT_PT_my_panel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = 'Hard-Surface Paneler'

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

        # Display the execute button
        row = layout.row()
        row.operator("object.execute_my_addon", text="Apply")

def register():
    bpy.utils.register_class(OBJECT_OT_ExecuteMyAddon)
    bpy.utils.register_class(MyAddonPanel)

def unregister():
    bpy.utils.unregister_class(OBJECT_OT_ExecuteMyAddon)
    bpy.utils.unregister_class(MyAddonPanel)

if __name__ == "__main__":
    register()

Hi. What happens if you remove the .blend file from the addon's folder?

Hello. I'm not sure I understand your script. You want to append some objects every time your addon is enabled ?

@curious_1 Nothing happened. I still get the same error. :/

@Gorgious. If it can be appended just one time not always, that would cool. But I couldn't find a way to do it properly. ( I had the script splitted once, but it also misbehaved so I put everything under the one).

Use bpy.app.handlers.load_post.append like this https://blender.stackexchange.com/questions/49879/how-to-run-a-piece-of-code-when-addon-is-just-activated


text:
Glass/Plexiglass shader
it's quite frustrating when you're not able to achieve the wanted result.
It seem simple, but for this object I can't afford a good looking glass/plexiglass shader.
hope someone can help.

download blender scene from here

After playing with Nishita Sky + Musgrave bump on glass + some settings, this is the result.
I'm quite happy with that!
Thank you all for suggestions

For perfect glass, have no roughness and crank up the transmission.However, perfect glass looks fake, so unless this is the look you are going for, you need to add imperfections.
One easy way is to plug a scratches texture like this into the roughness, (controlled with a color ramp, of course) but make sure to keep it subtle.
You could also add a little roughness to the transmission, to make it look a bit more milky, like plexiglass.
Another way, as excellently demonstrated by Ian Hubert, is to use a musgrave texture with a bump node for the normal.  This adds warbles to the surface, keeping it from looking perfectly smooth.
I hope this helps!

Thank you!!! I'll try imperfections.

Apart from surface imperfections as mentioned by @aidan-j-rhoden it is always helpful to give glass objects things to reflect to make them appear more realistic.
You have a single point light and a boring uniformly grey background. If you have no real environment in your scene, using HDRI images in the world shader can help, here are just a few examples:

The only thing I changed in your scene was deleting the point light, trying different HDRIs in an Environment Texture in the world shader, and setting the Base Color in the glass object's Principled BSDF to pure white i.e. value = 1 instead of the default 0.8 light grey, because this takes away a lot of light passing through the glass and therefore darkening the clock face. Oh, and I've set the Roughness to 0.02 instead of perfectly smooth.
And in this case it was not necessary (although it would have made a tiny difference), but if parts of glass sometimes look too dark, you should increase the maximum bounces for Glossy and Transmission in the Render Properties under Light Paths > Max Bounces. Be aware that you have to increase the Total value as well because it limits the separate channels (except for Transparent).

Thank you!!! very helpful

Well... tweaking some settings ad playing with Nishita Sky+Musgrave bump on glass, I think I'm pretty close to what I have in mind.

If you're talking about the noise and fireflies, try the old standby:
*IOR should be 1.5 for glass, most likely


text:
Texture Painting in Blender with Python script
I can Sculpt using Python but am having trouble getting Texture Painting to work.
Here is a working example of Sculpting:
def context_override():
    for window in bpy.context.window_manager.windows:
        screen = window.screen
        for area in screen.areas:
            if area.type == 'VIEW_3D':
                for region in area.regions:
                    if region.type == 'WINDOW':
                        return {'window': window, 'screen': screen, 'area': area, 'region': region, 'scene': bpy.context.scene}

def sculpt(coordinates, brush = 'DRAW', strength=1):
    bpy.ops.paint.brush_select(sculpt_tool=brush, toggle=False)

    brush = bpy.data.brushes["SculptDraw"]
    brush.strength = strength

    bpy.context.tool_settings.sculpt.brush = brush
    bpy.context.tool_settings.unified_paint_settings.unprojected_radius = 0.2

    strokes = []
    for i, coordinate in enumerate(coordinates):
        stroke = {
            "name": "stroke",
            "mouse": (0,0),
            "mouse_event": (0,0),
            "x_tilt": 0,
            "y_tilt": 0,
            "pen_flip" : False,
            "is_start": True if i==0 else False,
            "location": coordinate,
            "size": 10,
            "pressure": 1,
            "time": float(i)
        }
        strokes.append(stroke)

    bpy.ops.sculpt.brush_stroke(context_override(), stroke=strokes)

points = [(0,0,0)]
bpy.ops.object.mode_set(mode='SCULPT')
bpy.data.objects['An Object'].select_set(True)
sculpt(points)

This however does not work for Texture Painting:
def context_override():
    for window in bpy.context.window_manager.windows:
        screen = window.screen
        for area in screen.areas:
            if area.type == 'VIEW_3D':
                for region in area.regions:
                    if region.type == 'WINDOW':
                        return {'window': window, 'screen': screen, 'area': area, 'region': region, 'scene': bpy.context.scene}

def paint(coordinates, brush = 'DRAW', strength=1):
    bpy.ops.paint.brush_select(image_tool=brush, toggle=False)

    brush = bpy.data.brushes["Brush"]
    brush.strength = strength

    bpy.context.tool_settings.image_paint.brush = brush
    bpy.context.tool_settings.unified_paint_settings.size = 100

    strokes = []
    for i, coordinate in enumerate(coordinates):
        stroke = {
            "name": "stroke",
            "mouse": (0,0),
            "mouse_event": (0,0),
            "x_tilt": 0,
            "y_tilt": 0,
            "pen_flip" : False,
            "is_start": True if i==0 else False,
            "location": coordinate,
            "size": 10,
            "pressure": 1,
            "time": float(i)
        }
        strokes.append(stroke)

    bpy.ops.paint.image_paint(context_override(), stroke=strokes)

points = [(0,0,0)]
bpy.ops.object.mode_set(mode='TEXTURE_PAINT')
bpy.data.objects['An Object'].select_set(True)
paint(points)

What am I missing?


text:
Baked normals in substance painter doesn't look correctly in blender
Some edges look sharp, but I haven't made them sharp.
Auto Smooth - 57.3° (the same issue with any value)
After applying the baked normal maps from Substance painter in blender, the model looks like this:

In Substance painter:

Material nodes:

Wireframe and sharpen edges in blue:

are you sure it's not your topology that creates the problem? What does it give without any material? does the artefact remains?

I guess your normal map is still DirectX right? Either invert the green channel of your normal map using a RGB curve or just export as OpenGL from substance painter.

How to invert the green channel using the invert node: https://i.sstatic.net/TuXZI.jpg

I'm not certain it's responsible for your exact issues, but it looks like it may be, and it's something you should be doing anyways: Triangulate your model before painting in SP.
Blender and SP do not triangulate models the same way, and the triangulation affects the interpolation of UV across faces for any faces with any UV distortion whatsoever.
If your goal is to use a quad mesh in Blender, you can use SP on a copy of the model that has been triangulated using "fixed" mode triangulation, which is the default triangulation Blender uses at time of render for models that have not been explicitly triangulated up to that point.  You'll need to use custom normals on one of those meshes, copied from the other, so that SP and Blender are working on the same normals.

The problem was with Green channel in normal map and with non-triangulate geometry while importing to SP. Now it looks the same as in SP. Thank you!


text:
How to get the outline/contour/silhouette of a selected object?
I want to use Python to get the outline/contour/silhouette of a selected object in the Orthogonal View.
Just like the orange shape/outline that blender shows when I select the object in the view3D.
As shown below, Blender draws the exact boundaries(or contours, outlines) I want in orange color. How can I get the data of the boundaries (vertices/edge on the boundaries or faces inside of boundaries)?

As another example, I want to get the contour(orange color), instead of convex hull. (including the vertices 6 and 11 in the result)

similar question were asked, but none of the works for me:
How to extract side-view outline (e.g. top view) of a 3D object to 2D surface?
Add outline to object
2Turning a complex 3d object into a 2d contour

Might not be what you're looking for but the contour edges are edges that are linked to exactly one face. Then you can project the mesh onto the view plane to get the outline in the current view

thank you @Gorgious for replying. I've made it through cv2. I guess there isn't a better way than finding the contours.  If anyone could find a better way doing this, please answer the question or comment!

Thank you, hello. I encountered the same problem. How does CV2 operate?


text:
Is there a way to show different objects in two 3D view scene?
I want to show all the objects in the left 3d view window(1 ball, 1 cone, 2 cubes), and only show part of all objects in the right 3d view window (2 cubes).
Is there a way to implement this or is there a way to implement a customized UI window (python, Qt, etc.) to only show things I want to show?
Thank you!

You can select the cubes like you already did and in the viewport where you want to see only them hit Numpad / to switch to Local view. This limits the view to the selected objects. To go back from Local view just press Numpad / again.

@GordonBrinkmann Thank you! this is what I'm looking for. I have another question: Is it possible to make these 2 3D view scene asynchronous? For example, I want the red one on the left scene to be "hide_select" (wouldn't show any selected status), but the right one just as usual. Is it possible?


text:
I cannot flip one face
I've imported image as plane with the addon. Then I've extruded that plane into the cube form. The problem is that I can flip only all faces instead of one selected. When I'm selecting that one face I want to flip, and then I'm trying to flip it outside, it doesn't do anything. One face is always directed inside, while the rest outside. I also tried to apply scale etc. and it doesn't change anything. It's simple cube maded from the plane. There's no faces inside, simple 8 vertice cube. I've tried to recalculate all faces inside, outside, and it doesn't do anything. The cube is a painting, all faces are with default white material, and one face should have the painting image. How can I fix that one face?

There's no blue faces, because I've changed them in theme to be transparent, so I can always see wrong faces by default.

Hello, do you mean that you're trying to flip the normals? If you don't display the face orientations, you won't see if the face are flipped or not, could you please tell a bit more or share your file?

Im trying to flip that one red face with the painting on it. This is simple painting canvas model (cuboid), where everyting should be white, except one face with painting. But I think it's an addon bug

what do you mean by flipping? Generally the word is used for faces orientation


text:
How to check if all my faces on mesh are all quads using a script
I was keen on finding a python script that checks if all my meshes faces are quads.
pseudocode:
nonquad = 0
for i in selected_facelist:
    if count(selected_facelist.verts) > 4:
       nonquad +=1
print "Found :",nonquad,"Non Quads"

I dont know the API for THE CURRENT Blender 2.8. Any help is much appreciated
or if there is a pre-built button in blender.

I suppose your goal here is not for the script, as you say "or if there is a pre-build button".
So in edit mode, set the selection mode to 'face', select any quad and use the menu "Select/Select similar/Polygon Sides".
Once done you have all the quads, simply invert the selection with CtrlI to obtain non quad polygons.

The selection operators are dependent on the selection mode (vertex, edge, face), have a look at the menu for each case.
You may also want to select 'all by traits' to know if there is non manifold parts or loose geometry in your model.
If needed a commented script:
import bpy

# Go to object mode so that we can select
bpy.ops.object.mode_set(mode = 'OBJECT')

# Get active object
obj = bpy.context.active_object

# Select non quad faces (polygons)
for p in obj.data.polygons:
    p.select = len(p.vertices) != 4

# Go in edit mode to show the result
bpy.ops.object.mode_set(mode = 'EDIT')

You can use Bmesh module in Edit Mode based on your selection:
import bpy
import bmesh

obj = bpy.context.object
bm = bmesh.from_edit_mesh(obj.data)

for f in bm.faces:
    if f.select == True:
        if len(f.verts) == 4:
            print("Is quad", f)
        elif len(f.verts) == 3:
            print ("Is triangle", f)
        else:
            print ("Is N-gon", f)

# Just in case...
bmesh.update_edit_mesh(obj.data)

Related: How to read vertices of quad faces using Python API?


text:
How to approach Texturing Landscape Terrains
I know this is vague but to make it specific ,
I want to know how to approach Photorealistic Landscapes in blender. Specifically the ones like on the new Open Movie Spring, if you know how they pulled it off, please give me pointers or directions. Thank you.
My goal: "From Spring Open Movie"

Behind the scene of the terrain, the modeling is fairly simple and I can easily make that in Blender or Houdini "From Spring Open Movie"

"I know this is vague" it's not vague, but it is way too broad. Why not check it out firsthand since its, you know, an OPEN movie and all. That is the whole purpose after all.

Not everyone can afford to download all the logs and scenery, that's why I'm asking. If you have seen the Behind the scene for the landscape on the OPEN movie. Then be a good timer and help me out!

Nevermind, you need to pay to subscribe to access the "OPEN" movies files.


text:
Limiting output of a point or spot light to only a range of phi and theta in its own local spherical coordinates
I have very little Blender experience, but I would like to know if this is possible.
The ultimate goal is to simulate all areas of a scene that N different "cameras" can see. In this case, these are not Blender cameras, just simulated cameras that have a given angular width and height field-of-view. In this case, I believe using either spot or point lights as "cameras" is the right way to go.
I want to have each "camera" paint all objects in the scene with its own color. Each "camera" will be oriented in a given direction. Objects placed in front of a "camera" will occlude the "camera's" view. I will then be able to determine what parts of the scene are in view of any given camera, and which are not in view. I will be able to see what "cameras" overlap with others, and by how much.
This setup will be used for analysis, not art generation, so it needs to accurately model coverage and "camera" occlusion, but not surface properties, secondary reflections from scene objects, and so on. The scene itself will likely just be flat grey, with some objects placed here and there, plus several "cameras".
I would like to know if this is possible via nodes. I don't want to use any go-between (gobo) geometry to clip the lights into an appropriate angular extent. I am hoping somewhere in my node setup there is an input for field-of-view width and field-of-view height for each "camera", and this determines the extent of the light projected from the "camera".
Alternatively, instead of point or spot lights, it might be more appropriate to use actual Blender cameras, for which one can define the field of view via focal length and aspect ratios, and make a material for all objects that colors them according to "is camera ray", which from my understanding would allow me to paint things a certain color according to whether the camera can see them or not. The problem would then be figuring out how to ensure the objects are colored when in view by any of the N "cameras", as seen from the viewport, or some master camera that sees the whole scene.
Thoughts and suggestions very welcome!

I would change the title so something simpler, something like "coverage of multiple cameras". Related questions: Camera coverage calculation inside a room and Spot light with square shape (Cycles) -- The following questions link to the first one but comments might be helpful Can I check (in Python) if a pixel is visible to a particular camera? and Color all surfaces visible to camera

If you have multiple cameras with different coverage colors, you probably can use the compositor in Blender to create one image from different view layers.


text:
Object Invisible in render - Blender 3.3.1
I have been making a cupcake as you can see below:

But when I went to render it:

You can see that a part is missing in the middle.
So far I have done these to try and fix the problem:
F3 -> Clear render region and look if the camera was disabled in render in scene collection.
If you would like me to send you more info about the object, you can ask and I'll get it to you.
Thanks

Well, I can't get to find how to delete this post but it might be helpful for some people that could be experiencing the same issue. It rather is a straightforward fix, if the previous ones didn't work then you might want to look into your timeline. I found out that a key was removing the object from the render, so when I deleted it, it fixed the issue!


text:
Why is the color in grease pencil different from what i set?

I was opening a grease pencil animation and it is much brighter than what it is supposed to be in the final rendered result. The color on top in the box next to eye, this blue is the actual color I saved two and a halve years ago. And today it is set to the color you see in the fill box. It is animated to become a cyan color. Why is this the case? I guess that colors couldn't be safed properly from a 2.8 build i guess. But now i have to redo all of my animations. I opened it in 2.93 and 3.3.1 and both are the same.

Without being able to reproduce this right now, I can only say one thing: that's unfortunately not unlikely for software, with changing features and further development it is highly possible that old files don't work exactly like they did before and you might have to redo things. And this is definitely not limited to Blender.

could you delete the keyframe that changes the colour to cyan? the fact that the correct blue shows up as the material icon makes me think that at some point in the animation it is that colour.

@pevinkinel It was that color when i rendered it years ago. But it has a different color value, even Hex code. And it's every color. And it's not limited to this project. All of the projects from the 2.83 build have the wrong colors now. As if the location of the save data got changed.

right, I see. Then Gordon's comment is right, sorry. Apart from using the same build you used back then, the only thing I can think of is colour picking each material icon and reassigning that to each base colour, but that might not be doable if you have hundred of them


text:
Converting Lat, Long, Altitude, Pitch, Roll and Heading into Keyframed animation
I have a CSV file exported from a simulation program with Lattitude, Longitude, Altitude, Pitch, Roll, and Heading every 33ms, each line represents 33ms of the simulated result. What is the fastest way to convert it to Blender's XYZ, and Euler rotation to animate an empty with python?

There's a recent (long) YT tutorial by Erindale on using python and Geometry nodes with CSV data here which might be of use to you.

As mentioned in the comments to that video, there's also a free spreadsheet importer addon by Simon Broggi here which you might find useful.


text:
Is it possible to get fcurves associated to a bone by script ?
I'm working on a Blender add-on for transfering animation. I'd like to know if there's a way to select the fcurves describing a bone's movement through the bone.
What I mean is that the only way to access fcurves that I know so far is:
bpy.data.objects['Armature'].animation_data.action.fcurves and I wish to know whether there is something like bpy.data.objects['Armature'].pose.bones['MyBone'].fcurves.
Alternatively, I could settle for a way to know the curve's bone name.
Thanks a lot !

Looks like this may have been answered: https://blender.stackexchange.com/a/58921/32655


text:
Lamp changing color in bge
How do I make a lamp constantly changing colours in bge? I need to make it cycle through the rainbow. Like in RGB gaming pcs.

keyframe  the colors by hovering over it and pressing I.

Sorry I don't really understand

oh sorry nvm, i didn't realize it was game engine

This is possible in BGE using an action actuator.
https://cdn.discordapp.com/attachments/387475783838466051/597625497622544384/animatelightscolouration.blend
However I think there's a bug before 2.78 that doesn't allow you to do this.


text:
how do i change camera shortcut
I updated to blender 2.79 the other day but it got rid of some of my presets. How do I make the camera shortcut to 0, not the num pad 0? I did it before but I forget.
I know how to change it but when I do it I hit save startup file, but when I open a new file its back to the default.
do I have to do it in user preferences?

In your preferences under input enable "emulate numpad". Save your preferences, not your startup file.


text:
BGE shaking camera when i walk or run
I couldn't seem to find any videos on how to do this.
I'm making a game and I want it so when I walk or run the camera shakes.
how do I do this

You can make an animation with the camera. Click this little red button in the timeline. (That inserts keyframes automatically when something is moved.) Select the camera, press alt + a to start the timeline, press g to grab it, and shake it around. press escape when you are finished. You can do this a much more sophisticated way, of course. :) Save your action. In the logic editor, use whatever sensor that causes you to run and link it to the action actuator also (where your camera is animated.) Remember to set the beginning and end keyframes to be where you had started and stopped the shaking. If you want a much more controllable way to do it, try using something from this video: https://youtu.be/PU_uhfO1Bsk
Hope that helps. ;) Tell me if you need more information. It would be a good idea to add more information to your question as well.

Yeah, it's not exactly what you are looking for , but it might be helpful. :D

I did what you said but I have a problem.  after the animation ends, it goes to the beginning. But in that split second the animation stops and looks really bad.

sorry it is really hard to explain

actully i might have fixed it. thank you for you help

I'm glad you figured it out. No problem. ;)


text:
Why isnt my armature working?
I rigged this model (that was ripped from a game and not intended for this use) and I can't get the bones to work. I have tried everything my tiny brain can think of, no amount of armature deform is doing anything.
I'm trying to get the straps of the masks to actually act like bendable straps and it just seems impossible. I only picked up Blender a few weeks ago so I'm not very good at explaining either.

Blend file https://mega.nz/file/e8s1EIiQ#WVvYi5fY3jzC4dgAmD78X-9AKtvVOCa9jRhgREjLdZQ

Texture files if the blender file didn't come with them https://mega.nz/file/alkiQaoa#xjrbpMCqgpKUsUj3QJPPEOWgY1qYuphOE4nmr-06v_g

provide your blend file....a movie won't help here

External links are generally frowned on for at least two reasons: the external site may not maintain the media in a properly accessible format in some cases, and looking for specifically what is wrong may not be easy. Use the built-in image embedder to add screenshots or GIFs, and possibly blend-exchange.com to add the file in question. If it’s too sensitive, try downsizing it. If too large even after downsizing, try pasteall.org/blend instead.

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

just edited the question. tell me if there is anything else to change

Hello, I've checked your file, same problem as here: https://blender.stackexchange.com/questions/233138/newbie-question-armature-not-parenting-to-object-please-help/233140#233140


text:
Blender 4.2 cannot install addons anymore
There is no more “install plugin” button

I tried creating a repository pointing to a folder full of addons, they don’t show up

I tried creating a local folder repository, the repository does not point to the dir I selected, if I go to advanced and try to reselect the proper directory, blender crashes

I found I had to create the local repo, quit blender, as I launch blender, my local repo is there, but none of the plugin I have in that directory are showing up.

See if this post in the Blender Developer Forum helps.

In Edit->Preferences->Add-ons, in the upper right corner there is an "open dropdown" button:

If you click on that, it gives you the same options that were visible in that corner in earlier versions of Blender.
Install from Disk works just like the old Install did.
I don't know anything about repositories. I just have a folder with my third-party addons in it and install them the same way as in earlier versions of Blender.

but from the doc it says it is built in, wth...

Hi. Are you looking for what you asked for in your new question? https://blender.stackexchange.com/questions/323197/4-2-where-is-the-3d-print-addon If that is what you want, the link in the comment by @Gordon Brinkmann will show you the new way to install and activate Blender's built in addons.


text:
I have done some modelling but nothing appear wen rendering either on evee or cycles

this is the modelling viewport everything is okay however when rendering only the columns disappear
i have tried other parts of my project but everything works fine expect this part.
i have searched on youtube and internet and found those
In object mode press W --- clear all restricted render. That will make all objects visible in the render. ( when pressing w  it switch to select circle from the select box button)
Also, you can select an object and hit  Ctrl+Alt+H to un-restrict render on the selected object. (nothing happened)
iam using blender 2.93

when i opened my laptop right now the file looked like this somehow dont know how they transformed like this. i dont know how to send the file here i cant see a attachment option

Hi is there a way to share your file or those pillars? It would help to find it easier if you alone are not sure what you may have pressed or use

i dont know how to send the file here m however, it seems like a bug for me so i think i will re do it again i think


text:
I'm having an issue regarding shaders
I start off with the default project and when I open in the shaders tab, it looks like its transparent.

Yes, Thanks, that seems to be working

No problem -  Very common problem recently.


text:
Can someone help out with a better approach for this model
I've tried to recreate this light in Blender. Maybe someone has a better and smarter approach to model this light.
My approach:

Create a sphere
Create a icosphere (small graves)
Icosphere displace modifier and texture
Create a Particle System for main sphere with Icosphere as Render Object.

It looks like you are almost there ! For me the main problem is the lighting (Add an HDRI or an Area lamp on top of your object and tweak the light power) and the shading of your objects. You can use a darker blue on the shader of the particles and tweak it so that there is even more randomness on the scale of the icospheres. Also it will help if you build like 4 or 5 different pebbles by dragging the vertices of your icosphere and duplicating it, put it in a collection and instantiate that in the particle system

Is the object itself supposed to be a light emitter?

You could create a material that would be a mix between Voronoi (Distance to Edge mode) and Noise, with a bit of Emission in order to fake translucency:

Then add a particle system with a collection of gravels. To vary the amount of each gravel, use the Use Count option:

or you could put all the gravel in one collection so you'd only have to make 1 particle system

how would you control the Number value if you want only 100 of the dark blue ones and 5000 of the light blue ones?

@moonboots To vary the ratios, check the 'Use Count' box in the Collection sub-panel.

oh ok, excellent, thanks for the info


text:
How are animations done in blender?
When I try to make an animation, evrything goes in one motion. For example lets say I have two objects. If I want to make one object to move, then make it stationary, and then the other to move, then make that one stationary, then on the first object the same process. I can't do that. If I try and do that, both of the objects will move together. How to do it?

Did you use seperate Objects?

Did you accidentally parent the objects together? If you did, there will be a black dashed line between them.

You would just need to add another keyframe for the second object that should stay on its current position until the first moving object has finished its movement. Otherwise the position of your second object would also be interpolated between the keyframes.
In this example the location of both objects is keyframed at frame 1 the sphere reaches its final location at frame 20. The cube stops at frame 42. To have the cube stand still another keyframe for the cubes starting position is added at frame 20.

I think I had another similar issue (I forgot about it), but this works for now, thanks.

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


text:
How to unwrap a model with every polygon facing the view?
How to unwrap a model with every polygon facing the view in the "UV Image editor" window? An alternative to this is to align every polygon one by one to the view in orthographic view and one by one to unwrap it with "U|Project from view bounds". But instead of doing it one by one, is there a faster way?

And if possible, every polygon not to intersect.

You might get a similar effect by making all edges of the mesh 'Seams' and doing a normal unwrap.

Enter Edit mode on selected mesh
Select all edges
Ctrl+E Mark Seam
U > Unwrap

Selected faces show that face shapes are preserved in UVs.

And by doing this, every polygon is as it is in the 3d view right? I, mean, do they have the same shape as in the 3d view?

@Vladimir Added a new image with more complex face shapes to show they are indeed preserved.

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


text:
OSL toon shader with a glass effect?
Is it possible to make an OSL toon shader in witch something like IOR/glass effect can be added. For example, if there is an animation where something is put inside a glass, the glass to be noticeable as a glass?

This question might be of interest.

All of the cycles material nodes available in blender have OSL script versions that are used when OSL is enabled. These scripts can be a good place to begin when you want to start your own OSL script. You can view them online at developer.blender.org or download a copy of blender's source code to view locally.
For your example let's start with the toon shader. The main part is the call to diffuse_toon(). For IOR the glass shader by default calls microfacet_beckmann_refraction() with some other calculations. Merging these two together you could start with an OSL script as -
#include "stdosl.h"
#include "node_fresnel.h"

shader toon_with_IOR(
    color ToonColor = color(0.0,0.0,0.8),
    float Size = 0.5,
    float Smooth = 0.0,
    color GlassColor = 0.8,
    float IOR = 1.52,
    float IOR_Roughness = 0.0,
    normal Normal = N,
    output closure color BSDF = 0)
{
    float f = max(IOR, 1e-5);
    float eta = backfacing() ? 1.0 / f : f;
    float cosi = dot(I, Normal);
    float Fr = fresnel_dielectric_cos(cosi, eta);

    closure color ToonPart = ToonColor * diffuse_toon(Normal, Size, Smooth);
    closure color GlassPart = GlassColor * (Fr * microfacet_beckmann(Normal, IOR_Roughness) +
            (1.0 - Fr) * microfacet_beckmann_refraction(Normal, IOR_Roughness, eta));

    BSDF = ToonPart + GlassPart;
}

Instead of adding the two results you could mix them together, you would then add another float input called Fac and change the last line to BSDF = (1.0 - Fac) * ToonPart + Fac * GlassPart; - that's from the mix closure node.
At this stage you can easily test the result by comparing it to the nodes we got the code from. Then you can go further and customise the result to get the result you want.


text:
How to construct a pyramid in blender but the edges of the triangles to be equal?
How to make a pyramid in blender and all the edges to be equal size? Is there a way to do that in blender? Or if there is no easy way for that, maybe anybody not that lazy can provide me with a math line? Or maybe a link or whatever?

Basically, to model a pyramid on witch all the four triangles are equilateral triangles.

The pyramid to be four sided.

bytheway - How to view the number of an angle between the square (the base of the pyramid) and one of the triangles?

know the rules, create it according to the rules. It's just mathematics. Blender has all the rotation, translation, and scaling functionality you need, now go ahead and use that.

@Vladimir you can also edit your question. This is usualy better than adding lots of comments underneath. Some people might not read the comments, but they will read the question if they want to answer it.

About the part on mathematics I asked - This page is only about blender. Sorry about that part.

The formula for the pyramid you are describing can be found on Wikipedia. Look for the formula for the height of the 'Johnson Solid J(1)':
$$
H = \frac{1}{\sqrt{2}}a
$$
Where $a$ is the edge length of your pyramid.
Constructing the pyramid is pretty easy now: Start with a plane of the desired size. I started with the default plane (edge length of 2):

Now go into edit mode, select one vertex and extrude it (it does not matter which one or how far).

In the properties shelf you can now set the coordinates of the vertex. The properties shelf is the one to the right of your 3d viewport which you can toggle by pressing N. Under 'Transform' set the x- and y-coordinate to 0, and the z-coordinate according to the formula from Wikipedia. Since Blender can interpret some python commands in the number fields you can type in the formula directly:

Now always select three vertices that should form a pyramid side and connect them to a face.

To make sure your normals are all pointing outwards, select everything and press Ctrl+N to recalculate them.
To see the angles between faces go to the properties shelf again, scroll down to 'Mesh Display' and enable the 'Angle' checkbox under 'Edge Info':

@Vladimir It only looks a different size since the camera is not looking directly on the face. If you look onto an object from an angle it becomes distorted. You can also enable 'Length' under 'Edge Info' to see that all edges are of length 2.

yeah sorry. I didn't see that "angle" is enabled instead of "lenght".


text:
How to add a ground for a model that is used as a displacement modifier?
How would anybody go if you have a model and you use it as a displacement texture, but the ground to be separated from the model (not literaly separated, but to distinguish the ground from the model)? Maybe the boolean can solve the problem, but of big curiosity, what are some of the ways and approaches of doing that?
I'm aiming for this kind of result -

I'm still not sure what you are asking.. What do you mean by "if you have a model and you use it as a displacement texture"? What do you mean by ground?

What I mean is - If you bake a displacement texture of the model on a plain and then add a displace modifier to the plain and then when you apply a material on it, I don't want the hole plain to be with that texture, just the formation that forms from the displacement modifier witch is the yellow thing show on the image above.

The formation and the parts that are supposed to act as a ground don't have to be on a same mesh.

Oh.. I see now, partially. Though how do you want the displacement to be separated from the plane? Also, do you have any particular reason you want to use a displacement? Why not put a plane under (or through) the existing model?

I thought of that too, but the material will still be visible underneath. thanks anyway

What do you mean? (sorry.. I just don't understand :/)

Ok, it's like this - To achieve a result like the image above, its just that the model to be just a plane that has a Displace modifier on it and the parts that pop up from the displacement texture to act as a model (something like the glossy object on the image) and the parts that are standing still to act as black texture like in the image above.
Sorry if I confused you again

Basicaly, the displacement modifier to be in a desired shape on witch I can add a material and the ground to be a separete material.

The ground to be a different mesh.

Let us continue this discussion in chat.

Sorry, I can't log in for some reason on chat.
The model to be the displace modifier and the ground to be a separate material that is outlining it.

Ah, I think I see what you are saying. I still think it would be better to use the existing model + a plane though.. What do you mean by "the material will still be visible underneath"?

You said to add another plane slightly above the uneffected parts of the model that has the Displace modifier and use it as a separete material so that the parts that are effected from the modifier will be above that plane. And that is a good idea if I understood you, but the rest of the mesh with the Displace modifier will still be visible underneath that plane.

Much like the answer of "Cegaton". Any other ideas?

I was thinking of using the original mesh, and not using a displace modifier at all. Here's an example file I made.

Thanks. I was thinking more in terms of the possibilities in Blender with the Displace modifier.

Okay. I still don't see how using a displace modifier has any advantage in this case though..

Ok, imagine this scenario - You have a model with no modifiers on it, but however the model is still to high poly. You make displacement textures from the model on a plane. Then add a low amount of Multiresolution modifier and a Displace modifier on it. Duplicate the plane. Make the amount of the multiresolution much higher. Apply both of the modifiers on both planes. Bake a normal map form the higher poly plane on the lower poly plane. And then separate the ground from the formation that was caused by the modifiers (something like the answer of Cegaton. I find this combination pretty handy.

Basically, to use a Displace modifier in a combination with normal map and alpha texture. It's not who knows what, but its handy in many situations.

Well, whatever works for you.. Though it seems to me that the displaced plane is higher poly than the original in this case..

If you mean "in this case" for what I asked in the first place on this post, then I agree, the Displace modifier is a pretty bad choice for this model, but since I'm not that experienced with Blender, who knows, maybe it has some advantages.

Or maybe you mean the displacement texture I posted on the previews question is baked as a higher poly model then what it is on the render I posted here. No, they are the same polygon count

You had it the first time :)
I meant that using the model in your render as is is probably going to use fewer polys than baking it to a displacement map.


text:
Keeping track of splines in curve -> splines.get(), but what is the key?
I have a curve and want to check whether a spline already exists.
As other data types, there is a get() method. But what is the key? Since splines.new() takes only one argument (the type), there seems to be no identifier?
My current workaround is to use exception handling and accessing the splines directly using splines[x], but that is kinda ugly.

curve.splines is a list so you can test how long it is -
if len(obj.data.splines) > 0:
    print('There is a spline in this curve')

You can treat the points the same -
if len(obj.data.splines[i].bezier_points) > 0:
    print('We have a point in this spline')

Depending on what you are doing you could also use a for loop -
for s in obj.data.splines:
    print('This only prints if there is at least one spline')


text:
Python as module video editing
I am trying to do some video editing using blender in headless mode as a python module.  My first problem was that when I tried to import a video using movie_strip_add it always failed even when I tried multiple formats.  I tried importing an image and that works but when I go to check the length of the strip or even find the added strip I get array out of bounds errors.  Does anyone have an example of how to do this.
Second question is there anything special I have to do to add movie strips
def __init__(self):
    self.numRunning += 1
    self.scene = bpy.context.scene
    self.ops = bpy.ops
    self.data = bpy.data.scenes

def compress(self,filename):
    newname = os.path.splitext(filename)[0] + 'Compressed'
    (filepath,vidname)=os.path.split(filename)

    self.scene.camera = None
    for obj in self.scene.objects:
        self.scene.objects.unlink(obj)

    self.scene.sequence_editor_create()
    self.ops.scene.new(type='NEW')
    bpy.data.scenes['Scene'].render.resolution_x=1280

    file=[]
    #for i in vidname:
    frame={"name":vidname}
    file.append(frame)
    scene_name=self.data[0].name

    self.ops.sequencer.image_strip_add(directory = filepath, files = file, channel =1, frame_start = 0, filemode = 1)
    #self.ops.sequencer.movie_strip_add(filepath = filepath,files = file,frame_start=0, channel=1)

    stripname=file[0].get("name")
    print(self.scene.frame_end)
    print(self.data[scene_name].sequence_editor.sequences[stripname].frame_end)

Blender uses ffmpeg to handle video formats, you can check that it was built with ffmpeg enabled by entering getattr(bpy.app.build_options,'codec_ffmpeg') into blender's Python console.
For your script --
self.scene.camera = None
for obj in self.scene.objects:
    self.scene.objects.unlink(obj)

This will remove all objects from the current scene yet you follow it with creating a new scene -
self.scene.sequence_editor_create()
self.ops.scene.new(type='NEW')
bpy.data.scenes['Scene'].render.resolution_x=1280

You create a new scene and set the resolution on the scene called 'Scene' - as that is the name of the first scene in blender this won't be the name of the scene you just created. By creating a new scene you will have a scene without objects - sounds better than the previous step of unlinking everything.
Try
myScene = bpy.data.scenes.new('myscene')
myScene.render.resolution_x = 1280

Operators depend on the context to perform tasks, normally this includes the current window, which you aren't going to have if you are running the script headless.
Instead of using operators -
myScene.sequence_editor_create()

myImageStrip = myScene.sequence_editor.sequences.new_image(name = 'imgStrip', filepath = '/tmp/image001.png', channel = 1, frame_start = 1)
myImageStrip.frame_final_duration = 5

myMovieStrip = myScene.sequence_editor.sequences.new_movie(name = 'firstClip', filepath = '/tmp/test.mp4', channel = 2, frame_start = 1)


text:
blender game - animation of skeleton - not playing
In Blender i have a model and an armature with one action. When i play the animation in blender it works but in blender game i cannot get the action playing.
The used blender version is 2.70 svn running in Linux Mint.
To narrow down and locate the problem i made a simple blender scene.
Here is what i did:

Make model and skeleton and parent model to the created armature.
Create action with a small animation
in the logic editor i added this chain (Always - AND - Action: Play|Continue|Select Action)

here is a link to the blend file: https://dl.dropboxusercontent.com/u/91457585/animation%20test.blend
Thanks for any help!

Put the action actuator on the armature not the mesh object.
When an action actuator is triggered the object it is related to is the one performing the action, the action you setup has no effect on the mesh object.

Wow that did it! I even i tried that before but i guess something else was wrong as well. Thanks a lot!

Indeed, it helped us a lot too, we were doing it the wrong way.


text:
Object delete handler
Is there any way to call a function on object delete or on changing count of bpy.data.objects?
There is nothing suitable in bpy.app.handlers and I coudn't find something anywhere else.

could set up a scene_update handler to do this with a global dic or similar and check with something like this http://blender.stackexchange.com/questions/34860/how-to-check-if-an-object-is-deleted?rq=1

Thanks. I Tried to avoid scene_update handler because it calls too often but it's ok if this is an only option...

Could use a modal timer operator, or even a draw method to flag change.  The scene_update handler is AFAIK the "catch all" way to check on delete.

You can override the delete function. https://blender.stackexchange.com/questions/28932/prevent-accidental-deletion-of-object/28933

Piotr commented that you could override the Delete operator, as described for a different purpose in this answer: https://blender.stackexchange.com/a/28933/66651
I am using it to remove derivative objects. It works very well!
class delete_override(bpy.types.Operator):
    """delete objects and their derivatives"""
    bl_idname = "object.delete"
    bl_label = "Object Delete Operator"

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        for obj in context.selected_objects:

            # replace with your function:
            my_function(obj)

            bpy.data.objects.remove(obj)
        return {'FINISHED'}

def register():
    bpy.utils.register_class(delete_override)

def unregister():
    bpy.utils.unregister_class(delete_override)

What if two add-ons override like this?

@Ray, good point! The later one would win. Good enough for experiments, not good enough for release quality.


text:
Child object doesn't move with parent bone
I'm working on a game (and thus using the Game Engine) and I have a pistol parented to a bone. When I play the game, the pistol moves with the animation, but the actual location does not change with the character. Here's some images of it happening:

You can see the pistol is in the hand, and it follows the animation for rest.

When I run to another location, the pistol moves like it is running, but stays in the same place.

I can probably take a video of it if that's required.

It is not locked in any way.

This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.

I'm not sure if the same applies to the game engine, but when animating the bones don't move the body unless they share the same name as the (vertex group) they are meant to move.
this link shows how to make vertex groups
http://www.youtube.com/watch?v=w1EZZIsiIUA
I assume you already have bones, go into edit mode and make sure each one has a name which matches its appropriate vertex group.
sorry if this doesn't help.

I don't think this answers what the OP is asking.. (I could be wrong though). I think the OP wants the gun (a separate object) to follow the armature/character object in addition to following the parent bone.

Gandalf3 is correct, although I have tried deleting the pistol's armature and just making the model parented to the bone, and that didn't work either.


text:
Game Engine - Change an image based on property?
For a HUD I'm making I would like the ammo to be displayed based on an image instead of text. How do I link what image is being displayed on a plane (a texture) based on a property?

Figured it out. I made multiple planes and assigned different textures to each, then changed the visibility of each plane based on the property.


text:
Shrinkwrap modifier has no target available, not sure what I'm doing wrong

Hiya! I am extremely new Blender, and in particular Bezier curves. I found a tutorial which shows how I could use the shrinkwrap modifier to snap the "ribbon" around another object, so I was hoping to do that here.
I have created a bezier curve and have adjusted to preferred general features to what I am after, but when I've tried to add the Shrinkwrap modifier and select a target, I am unable to.
I am sure it's likely an error on my end but I am struggling to figure what I've done wrong as I'm completely new to Bezier curves as a whole hahah.
If someone could help out that would be awesome ~ for context I am making a model for a 3D printing pipeline so Topography mapping etc is not an issue here.

you can only shrinkwrap on meshes. Is it possible that you have only curves? If you want a precise answer and that we don't have to guess what's going on, it would be very helpful if you edit your question and add a link to the tutorial and upload your blend file -> you can do that by opening https://blend-exchange.com/ and follow instructions

... and if you you're aiming at solving the particular case of a nice regular spiral on a curve... there's a better way.


text:
Two similar meshes and points between them
I have 2 meshes which are of the same object in different poses. I'd like to get meshes which are midway between these, as if they are being transformed into each other. They aren't rigged with armatures.
Can Blender do this, if so how and what is the result like?
Seems relatively straightforward in 2D but I imagine harder on 3D.
Thanks in advance.
K

Are you interested in a solution with Geometry Nodes? ...that would possibly work (depending on your mesh).

The meshes need to have the exact same topology or this wont work.
Here I have two object with the same topology but with different shapes:

Now select first the object with the shape to be transferred, and last the object you want to transfer the shape to:

Then in the shape key pannel, click the arrow and select join as shape:

Now you can play with the shape key value to get your model to be transformed:

https://i.sstatic.net/BGSZS.jpg


text:
How to smoothen out extrusion on a curved surface
Say I have a curved surface with some extruded text on it:

What is the best way to remove that extrusion to best approximate the original curve? In other words, transform the above image into the underlying curve like this:

With extrusions on flat surfaces, I would usually resort to the typical S -> [dimension] -> 0 method, but I'm at a bit of a loss as to what I can do in situations like this. All the better if the method also works with etchings, or if there is an alternative for that case.

You can keep the top edge loop only, remove the rest, and extrude down this edge loop on Z?

.. or keep top and bottom edge-loops only. and Bridge Edge Loops between them.

As far as I can tell from your first image, the writings don't share any vertex with the surface. I that's true, they should be easy to select with the "Select Linked" function (hover your mouse on the writing then press L), and therefore easy to delete.

What is the purpose of smoothing out extrusion?

Sorry, how do I do that? @moonboots

Could you share a step-by-step on how to do that? @RobinBetts

@thibsert that's true, but I made this as an example just to demonstrate what I was talking about. Most of the time when I want to do this, it's with a model that is fully connected.

@vklidu there are a few different scenarios when I want to do this. For example, I downloaded a 3d model of a book that had extruded text on the side, which is curved. In that case, I wanted to keep the model of the book, but the text didn't fit my purpose.

If you don't need text topology select rectangular area of this part of mesh delete and search for Grid Fill operator. At letdown corner you can adjust some properties. If you want to keep text topology, but just flatten, try Sculpt brush Flatten.


text:
Bevel doesn't offset
I'm new to learning Blender and being in the process of learning to understand lights, I wanted to make a studio light but in wanting to bevel the side of my plane to make a curve, the bevel only applies to one axis and doesn't "offset".
On the screenshots I just added a plane, scaled it, extruded one edge, selected the edge and ctrl+B to bevel, but it always do the same result, if not the same but on the Z axis, like the angle seems to contain 2 different edges who are not merged together and, by only doing an extrusion, I don't get why.
Sorry if my question is frequently asked but I didn't find any response, maybe my formulation is bad or I'm not doing my researches with the right terms :(
Thank you !

Have you applied the scale of your object in Object mode? (Ctrl A)

Yes, I've already read this on other topics but nothing changes :(

I think you have duplicate vertices there. In edit mode and vertex select mode, select everything with A and go to Mesh > Merge > By distance

if it still doesn't work please share your file

It works ! Thank you so much Gorgious, I don't know why I had duplicate vertices though


text:
Transform splines like a mesh
I added wave modifiers to a mesh and want to have the same transformation to a imported svg respectively splines.
I tried to add the same modifiers to the svg but of course this doesn’t do it as it’s no mesh.
This is the mesh:

This is the svg hovering above the mesh:

Can anyone help?

In order to deform any object smoothly you need to have enough geometry so that the object can hold any form it is deformed to. So for example a simple cube can have 8 vertices and hold its form:

However if I wanted to use a wave modifier and maybe animate it I would need thousands of vertices instead of the 8 for the exact same cube, because 8 vertices cannot convey the forms needed:

The same applies to whatever vector graphics you import.
One way would be to convert the curves to meshes, then take the messy triangulated geometry that would not deform well, extrude it and use it to cut a dense grid plane with boolean modifier. This way you would have some uniform density geometry you can deform:


text:
Field of mesh lines
I'm stumped to do the following project for a few days now and I would be grateful for any help :
Let's consider two series of points (blues and reds in the picture below).

I would like to connect all the possibilities between the blue points and the red points (and therefore not the red ones between them and the blue ones between them). For example, for the first red point, this would give the figure

But the idea of my project is to do it for all the points
I tried with the idea below

but I understood that Mesh line doesn't accept field....since then, I'm looking for the solution to my problem
Thanks in advance,

A possibility is to make a line with a count of vertices that is the product of the point cloud sizes multiplied by two, and make this line goes alternatively from a point cloud to the other one.
As illustrated here (four points for 'cloud one' and three points for 'cloud two'):

Making that, one segment on two will overlap, so we'll merge after the calculation.

The top node line create the mesh line.
Then above, depending on the index parity, we pick on a point cloud or the other one using sample indexnode.
As result:

Thx a lot for your help ;)

This version:

Instances [sets of Blue-Count duplicates of a  Curve Line] on to each Red instance, stashing the Duplicate Index
After realizing, moves the far End Point of each line to the position of the Blue instance with an Index corresponding to its own saved Duplicate Index

.. and decorates:


text:
Python script for geometry node
My question concerns the use of scripts to generate nodetrees. If I manage to use and link all the nodes offered by Blender on the same tree, I can't find a way of using a custom group.
an example below (the code itself is of no interest; it's just so I can understand how to code nodetrees)

as mentioned before, within a single tree, I have no problem creating nodes, but as soon as I want to create group with the following function (which works since I can add it manually after) :
##############
def create_group():
group = bpy.data.node_groups.new(type="GeometryNodeTree", name="test-group")
new_socket_g = group.interface.new_socket(name='in Socket', in_out='INPUT',socket_type='NodeSocketVector',)
return group
################
I don't know how to use it with a python command on the main tree since the command g1=node_tree.nodes.new(type="test-group") returns the error message : "RuntimeError: Error: Node type test-group undefined"
So what is the script to load a custom group intside a tree ??

Thank you very much for any help
Crys

The solution can be found in the following post:
how to create node group inside another node group using Python script
simply create an instance between the node you want to create and the tree in which you want to place the node
so you need to define the function (as well explained in the post):
def instanciate_group( nodes, group ) :
"""
Instantiates a group in a tree of nodes

Parameters
nodes: the nodes of the node tree in which the group is to be instantiated
group: the group to instantiate

Returns :
instance: the group instance created
"""
instance = nodes.new( type = 'GeometryNodeGroup' )
instance.node_tree = group
Returns the instance

and in the main program
test=create_group()
test_inside=instanciate_group('nametree'.nodes,test)

where nametree is the name of the tree in which you want to place the new node


text:
sum the coordinates of two geometries via geometry nodes
Sorry for this naive question; I was wondering if it was possible to add the coordinates of 2 meshes to make a third one?
To illustrate my problem in a simple way, let's imagine that I have two spheres with the same number of points and that I want to generate a third sphere whose coordinates would be the sum of the two others:

unfortunately this approach does not work and I would be grateful for any help

check this out:

result:

To "transfer" values from one branch to another, you can use sample index node.

thx a lot ! :):)


text:
Exporting image sequence as an animated 3D object?
With this amazing tutorial (5:56 - 10:00) I imported my video as PNG image sequence and with the depth maps made it into an animated 3D image sequence. (But this is all just a plane object)

How to export this 3D animated image sequence as an animated 3D object? I need to have it in Unreal Engine animated, 3-dimensional and extruded like this. I only found explanations on how to export this as a video or IMG sequence (which it already is).
My version is 2.93
And please have in mind when answering that I'm not too good with Blender, so imagine you're talking to a complete beginner lol!

If I understood properly, in general, you can't just 'export' to convert from a planar 2D image to the underlying 3D information it appears to be a window into. There are methods for taking large numbers of static 2D images, e.g. photos taken from different angles, and automatically trying to build a corresponding 3D model, but this generally requires more than just one angle, and is not as simple as exporting from one file type to another; it usually requires trial-and-error. This area of work is https://en.wikipedia.org/wiki/Structure_from_motion; there are some Blender addons for this.

In case it helps, the basic reason this isn't just a straightforward export is that any given 2D image contains strictly less (a lot less) information than a full 3D model. Going from 2D to 3D requires a fairly complex process for trying to extrapolate from the 2D information to corresponding 3D information. Structure-from-motion algorithms attempt to do this by assuming they have access to many different perspectives on the same fixed 3D object.

Hi @NeverConvex thank you very much for your answers. Just to clarify - are you talking about photogrammetry? This is how this image sequence looks in motion in Blender  https://youtube.com/shorts/ZS0WhLrkLgM - I would like to have it like that in Unreal Engine as well, regardless if it's a 3D object or an extruded image sequence. I just thought as I achieved it here already there would be an easy way to transfer it like that directly to Unreal. Maybe I should try it there directly from scratch?

Yes, SfM is a specific photogrammetry technique, as I understand it. And -- oh, I think I misunderstood your goal; you want to convert a preexisting extrusion to a 3D model; I didn't appreciate from your original question that you already have the extrusion present. That may be more easily doable, then; will try to come back later if no one else suggests a method first

Just as a quick suggestion: have you tried clicking Apply on each of the modifiers (starting from the one on the bottom, first)? I usually work with static rather than sequences of images, but I think this should, at least for a single frame, convert your plane into a fairly complex object with the expected 3D structure. I am a little unsure if it will automatically handle that you have a sequence of images correctly; suspicious that may require writing some Python code, but won't be certain until I also try

@NeverConvex thanks for getting back to me! When I export it as .fbx or .gltf it does export it with all the extruded surface and the image texture. But it's just one frozen frame. Would it help if I sent you the blender file? And regarding the Apply button, I can't find it in the Modifier segment? And unfortunately I can't code.

The Apply button should appear on each modifier in your modifier stack, in the top-left of it (e.g., see this Mirror modifier example for reference: https://docs.blender.org/manual/en/latest/_images/modeling_modifiers_introduction_mirror-subdiv1.png). It sounds like the export process is already applying the modifiers, though, so your real problem is that export doesn't know you want to generate a 3D model complete with animation. Uploading your .blend would help; I'm not sure linking the frames is trivial, but it will be interesting to try

@NeverConvex amazing, thanks a lot! Here's the link to the file:
https://we.tl/t-SrHnxrL8jY

@NeverConvex hey, I managed to do it in Unreal Engine!! https://forums.unrealengine.com/t/image-sequence-3d-extruded-with-depth-maps/852901/2 here's the topic with my explanation, this tutorial helped me a lot! https://www.youtube.com/watch?v=1GkS9-94k80

Oh, nice! I had not had a chance to open the Blend file and try yet. You might consider adding an Answer to your question below, explaining how you solved your problem (for other users who may come across it).

@NeverConvex oh sure, thanks, I'll do that now!

I didn't figure how to export this, but my main goal was achieving the same thing in Unreal Engine (and even additionally the background transparency) which I did!
So first I added an image sequence as explained here, for both the base color and another one for the depth maps.
Then I followed this tutorial to "extrude" it (displacement/tessellation).
I achieved background transparency by setting the material type to "masked" and then plugging the media texture's alpha channel into the "opacity mask" option.
I initially achieved the transparency in my image sequence by editing the first image in Photoshop and exporting it as .png, and then using the amazing program Ebsynth to generate the rest of the sequence like that based on the first one.