Trying to get any script working in Blender 2.83

This is mostly a place for me to whine. I am trying, ultimately, to get blender to a) Import a video or frame sequence onto a bunch of planes spaced out in the X direction b) Create cube particles, or billboard particles, or voxels for each pixel of each frame–the same color as the pixel.

I’ve looked at this https://blender-addons.org/command-recorder-addon/ and can’t get the damn thing to install.

I’ve also looked at this:

And can’t get that script to run. So, obviously I’m doing something basic VERY wrong. Any ideas would be appreciated, code that I can pop into my scipt editor and run to do this would be amazing.

Frustrated. Going to try and install a different add-on and try to run a different script to see if I can get SOMETHING to work.

In short, the “photo.py” script you linked is broken because
a) It was written for an older version of blender (before 2.8. I think it would work ok in 2.79)
b) It is extremely inefficient, which means that in practice it can only be used with very small images.
For example if you try running that script with a 1920 * 1080 pixels image, I estimate it would probably take weeks, and more likely would just crash blender.

Anyway, if you still want to use it in blender 2.83, then you’ll need to replace “Diffuse BSDF” with “Principled BSDF”. (And of course change the name of the image to match the name of the image you want to use.) After that it works (although it still can’t handle large images).

However, I think you might be better off with the new Geometry Nodes in blender 2.93.
You could distribute points on a grid and use attribute sample texture to drive the colour based on an image (probably. I haven’t actually tried that)

Thank you, McAllister. I didn’t realize the API had changed so much between versions. It did take quite a while to render on even a very small image. I got it to run by deleting the Diffuse _BSDF line last night…and everything was grey. I think it’s creating a new material for each pixel, when really they can all share the same material. Just need the base material color changed for the new faces being created. I will look into upgrading Blender and checking out geometry nodes.

Third video row, middle ‘tab’: sample texture &
https://docs.blender.org/manual/en/2.93/modeling/geometry_nodes/attribute/attribute_sample_texture.html
I’ve seem more of these in the Geometry Nodes thread & on YT. It might be a better solution and a lot faster.

Progress! After fiddling around with instancing…I don’t think that’s going to work… nor will geometry nodes. So, back to a script. Realized that I can just create a single texture and manipulate geometry UV coordinates to be covered by a single pixel of the texture. Can’t find many scripts online that manipulate UVs, though. Here is the command and the response in the active Python editor:

bpy.ops.uv.rip_move(UV_OT_rip={“mirror”:False, “release_confirm”:False, “use_accurate”:False, “location”:(0, 0)}, TRANSFORM_OT_translate={“value”:(0, 0, 0), “orient_type”:‘GLOBAL’, “orient_matrix”:((0, 0, 0), (0, 0, 0), (0, 0, 0)), “orient_matrix_type”:‘GLOBAL’, “constraint_axis”:(False, False, False), “mirror”:False, “use_proportional_edit”:False, “proportional_edit_falloff”:‘SMOOTH’, “proportional_size”:1, “use_proportional_connected”:False, “use_proportional_projected”:False, “snap”:False, “snap_target”:‘CLOSEST’, “snap_point”:(0, 0, 0), “snap_align”:False, “snap_normal”:(0, 0, 0), “gpencil_strokes”:False, “cursor_transform”:False, “texture_space”:False, “remove_on_cancel”:False, “release_confirm”:False, “use_accurate”:False, “use_automerge_and_split”:False})

Traceback (most recent call last):
File “<blender_console>”, line 1, in
File “C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\bpy\ops.py”, line 132, in call
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.uv.rip_move.poll() failed, context is incorrect

Not sure why the context would be incorrect on this…I had a plane selected as my active object when I tried to run this command.

Ideas?

Not entirely sure what the end result has to be…

How many planes are we talking about? If it’s a manageable amount, you could start with those, merge them and add a UV for the whole ‘planed’ object. Add the material + video texture.

After that you could make them into separate objects again in edit mode, so you can manipulate them one by one.
But the ‘how many’ might become a thing for performance when it’s ‘a lot’ … :wink:

Rob, I’m definitely shooting for millions (MILLIONS!) of billboarded pplanes—so creating and then texturing them afterwards as a group is a GREAT idea–thanks! Will try to figure that out…

Well, making slow progress by bashing together some files found on the internet and lots of fiddling…I still don’t understand why some things work and somethings don’t, but…as long as I can get the effect I will be OK.


First moderately successful attempt…moderately successful…


Second somewhat closer to successful attempt…if I can connect the particle life with the frame number I’ll be set, actually.