text:
How to create a Tetrix/Sierpinski Tetrahedron fractal radiating from 0,0,0 ? Python or nodes

Animation nodes method true to description has been provided by @lemon,
Vote his answer UP UP UP!

INFERIOR

INFERIOR

INFERIOR / different concept
Mesh. I want to create it not by dissection of edges, but instead by splitting 1 into 4, or should I say, adding 3 more to the original location before moving all 4 away from Local 0,0,0 , and then doing the same with the 4 replicas, as each of them is splitting the same way (the subsequent movements of replicas becoming more and more complex/derived),
so that (if animated) it really looks like the one is splitting into 4, and each of the 4 results are then splitting into 4 (and so on).
If Empties were placed in each start/end position of each object it would, looking at the Empties hierarchically connected, appear like a branching tree, with old branches continuously lengthening.
Though I wouldn't mind knowing the opposite too. Having 1 edges dissected(halved) and created vertexes connected, but always so that connection doesn't happen toward the inside (coordinate 0,0,0),
THOUGH THAT WOULDN'T  really be the opposite of the previous,
the real opposite would look like the 1 is scaling in (previously mentioned) 4 directions (toward the vertexes of the 1), and so on, in each of the 4 newly created. Yeah XD definitely wouldn't mind knowing how to do this.
Method using python script or nodes would be just FINE!
IRL construction
BTW I have a hunch it would be easier to construct it if there was some alignment with the coordinate system, such as edge midpoints aligning on the axes.

https://en.wikipedia.org/wiki/Sierpi%C5%84ski_triangle#Analogues_in_higher_dimensions

Nice to remind me to check wikipedia for terminology, but there's no blender instructions.  Since I'm getting into blender and python simultaneously, you can see how this is good practice matter.

Yes agree, I like these kind of challenges in blender. Can bmesh script  the example as shown in mathematica code  in wiki, is that what you are after?  Also would improve (IMO) the question if you add a picture.  Not everyone will go off to yt to watch a vid.

I'm not sure XD literally started python yesterday, but I'll definitely look into it.  Opened the question since Tetrix doesn't come up anywhere, and input cant hurt, as you've proven.

For more general fractals: https://github.com/buddhi1980/mandelbulber2

To answer my own subquestion, this is how to access some of the custom transform orientations https://www.youtube.com/watch?v=aaL05JYEP9o&t=2m52s    Ctrl+Alt-Space  once in Edit mode, and once the desired subelement of an object is selected,  in my case it was the vertex, so to move in any of the 4 ways the tetra is pointing.

Would you accept a modelling-only answer? This is quite easy to do by hand.

Yes I would, but for the subquestion about positioning/nesting an already created tetrahedron inside the unit cube, as I described in the previous comment.

@John Dvorak    Are you sure it's easy ?

Animation nodes version
One tetrahedron is used as model.
Another one is used as duplivert. Its parent's vertices will be constructed by the nodes.
An empty is used to control the iterations. And this is triggered when the empty is scaled.

The nodes setup is composed of 4 parts.

A main: get the input and produce the resulting vertices into the dupli parent
A first sub part: calculate the scale factors and iterate to construct each level
A second sub part: iterates on the model to produce each vertex
And a last sub part: duplicate each vertex of the model and place it

The scales are calculated by power of two: 0, 1, 2, 4, etc.
For each level, depending on the scale of the empty, we have a scale that is proportional to the intervals [0,1], [1,2], [2, 4], etc.
The final unit is the base tetrahedron obtained from regular solid addon.
Main

This main part calculates the amount of iteration and the relative scale.
For instance, if the empty is scale by 3.20, we have 3 iterations and a position of 0.2 for the scale.
First sub part

From that the iteration is done from a base vertex input which is reassigned to itself after each iteration.
The calculation is to determinate the scale level ([0,1], [1,2], [2, 4], etc.) and adjust it from the scale position (the 0.2 above).
Second and third sub parts

Simply iterates on the model for each cumulated vertex.
And in the last sub part, place the vertex scaled and offset from the model.

When the empty is scaled up to ten, that will generate more than 5 millions vertices. So... be careful.

Python version
Uses the same principles as the AN version above.
I've added the possibility to use other shapes.
So we can have:

Or:

The principle is to use:

An empty to scale the figure (scale the empty to scale it)
A model object which gives the base vertices
A dupli object which gives the shape of the inner elements
A target object (dupli parent of the dupli) for which the code calculates the vertices

The script itself is in the following parts:

Setup a hook function on bpy.app.handlers.scene_update_pre so that it can be animated
Get the key objects (hard coded) to apply the generative code
The generation itself
A function to clean the target mesh
A function to calculate the wanted scales depending of the depth of the figure

Scene handler
Remove previous ones and setup/update the hook
def setup_handler():
    for h in [x for x in bpy.app.handlers.scene_update_pre]:
        if h == update_sierpinsky:
            bpy.app.handlers.scene_update_pre.remove( update_sierpinsky )

    bpy.app.handlers.scene_update_pre.append( update_sierpinsky )

Get key objects
Here if you change (in the given .blend below) model1/dupli1 by model2/dupli2 you'll have cubes instead of Sierpinski.
def update_sierpinsky( scene ):
    scale_object = scene.objects['scale']
    model_object = scene.objects['model1']
    dupli_object = scene.objects['dupli1']
    target_object = scene.objects['target']

    sierpinsky( scale_object, model_object, dupli_object, target_object )

Scales calculations
Calculate 0, 1, 2, 4, etc. plus a value between 0 and 1 to make the transitions.
More precisely, this is 0, 1, sqrt of the model vertex count as the scales are not the same depending on the figure (but not sure of this formula...).
def scales( scale_object, scale_factor ):
    scale = scale_object.scale.z - 1
    scale = max( scale, 0 )
    scale_floor = int( scale )
    scale_delta = scale - scale_floor
    iterations = scale_floor + 1

    def calc( sd, i, sf ):
        i2 = sf ** i
        prev = i - 1
        prev2 = sf ** prev if i != 0 else 0
        return prev2 + sd * (i2 - prev2)

    return [calc( scale_delta, i, scale_factor ) for i in reversed( range( iterations ) )]

Vertices generation
I've choose an iterative one (for a variant).
It loops overs the scales and generates the vertices locations level by level.
def sierpinsky( scale_object, model_object, dupli_object, target_object ):

    model_vertices = [Vector( v.co ) for v in model_object.data.vertices]
    result_vertices = [Vector()]
    scale_factor = len(model_vertices) ** 0.5

    for scale in scales( scale_object, scale_factor ):
        scaled_vertices = [scale * v for v in model_vertices]
        result_vertices = [r + s for r in result_vertices for s in scaled_vertices]

    clear_mesh( target_object )
    target_object.data.from_pydata( result_vertices, [], [] )
    target_object.data.update()

Target mesh clean up
The vertices of the target mesh are removed before each calculation.
There may be a better way to do that but don't know how.
def clear_mesh( obj ):
    bm = bmesh.new()
    bm.from_mesh( obj.data )
    bm.verts.ensure_lookup_table()
    for v in [x for x in bm.verts]: # use a copy before removing
        bm.verts.remove(v)
    bm.to_mesh( obj.data )
    obj.data.update()

The blend file for the Python version:

I'd like to mark this as a correct answer but I'd still like to get the Python version, and I  don't know if the incentive will still be there if the question gets answered.  Vote this one UP PEOPLE

@t8ja, answer edited for the Python version + a little extra ;)

How would I go about rotating the whole composit object/animation ? Translate works, but rotation messes it up by moving every individual element.

@t8ja, simply rotate the 'target' object (it is at the center of the scene). The rest is depending on the relative positions when dupli and target are parented. So you may need to reparent the dupli to the target having them at the same position (or simply move the dupli at the position of the 'target').

I see now, I didn't consider the resultVertices to be an object I could move/rotate.  Man, I feel you yould answer every question I have, after seeing this LOL

@t8ja, ahah, please don't! ;)

Big one here https://blender.stackexchange.com/questions/118827/snapping-vertices-in-a-particle-system   I should have made the Question more vague in terms of method. I'm sure you see the similarity.

About this question https://blender.stackexchange.com/questions/118827/snapping-vertices-in-a-particle-system, is that similar to replace the dupli object (in the answer here) by a sphere?

Updated answer with animation technique (sort'a cheating)
So to generate an animation of the tetrix levels increasing I kind'a cheated.
Since my previous answer already used a dictionary to store all the levels, I simply wrote that data structure into a json file, then used an app handler function to read it prior to every frame change and load the current level matching the frame number.

So this has solution has two steps:
Generate data file
import numpy as np
from time import time
import bpy, bmesh, json
from mathutils import Vector

def generate_quad( original, quads, level, max_level ):
    ''' Recursive function generating 4 tetrahedra off of the the input tetrahedron '''

    # The 1st new tetrahedron is simply half the scale of the original starting from the original tet's bottom left corner
    origin = original.min(axis=0) / 2
    half  = original / 2
    half += origin

    # Calculate the dimensions of the new tetrahedra
    newdims = Vector( half.max(axis=0) - half.min(axis=0) )

    # The 2nd moves by the new tet's x dimension to the right
    right = half.copy()
    right[:,0] += newdims.x

    # The 3rd moves by half the x dim and all the y dim
    forward = half.copy()
    forward[:,0] += newdims.x / 2
    forward[:,1] += newdims.y

    # The 4th moves by half the x, a third of the y and all the z
    up = half.copy()
    up[:,0] += newdims.x / 2
    up[:,1] += newdims.y / 3
    up[:,2] += newdims.z

    quad = [ half, right, forward, up ]
    quads[ level ].extend( quad )

    if level < max_level:
        for q in quad:
            quads = generate_quad( q, quads, level + 1, max_level )

    return quads

## Main Code
start = time()
n     = 5  # Number of steps of the fractal
scale = 10 # Scale of the original tetrahedron

# Generate regular tetrahedron at the desired scale
orig = np.array([
    [0,   0, 0],
    [1,   0, 0],
    [0.5, 3**0.5/2, 0],
    [0.5, 1/3*3**0.5/2, ((3**0.5/2)**2 - (1/3*3**0.5/2)**2)**0.5]
]) * scale

# Initialize data structure for all tetrahedra in all steps
quads = { i : [] for i in range( n+1 ) }

# Generate tetrix via recursive function
quads = generate_quad( orig, quads, 0, n )

# From numpy to simple lists to prepare to save as json
quads = { i : np.array(quads[i]).tolist() for i in quads }

quad_cache_file_path = r'C:\Users\username\Documents\tetrix.json'
with open( quad_cache_file_path, 'w' ) as fh:
    quads = json.dump( quads, fh )

print( f'Generated {n} tetrix levels in {round(time() - start,1)} seconds' )

Add frame_change_pre app handler function to link between the frame number and the tetrix's level
import itertools
import numpy as np
import bpy, bmesh, json
from mathutils import Vector

def update_tetrix( scene ):
    C = bpy.context
    D = bpy.data
    S = C.scene

    regular_tet_faces = np.array([[3, 0, 1], [1, 0, 2], [0, 3, 2], [3, 1, 2]])

    quad_cache_file_path = r'C:\Users\username\Documents\tetrix.json'
    with open( quad_cache_file_path ) as fh:
        quads = json.load( fh )

    # Select level to display at current frame (match
    n = S.frame_current - 1
    n = n if str(n) in quads else max( quads.keys() )

    # Generate mesh data
    verts = []
    faces = regular_tet_faces.tolist()
    for q in quads[str(n)]:
        # Find last vert index and add new verts
        last_vert_index = max([ len( verts ) - 1, 0 ])
        verts.extend( q )

        # Use base face arrangement of original regular tetrahedron and offset indices
        faces_indices = regular_tet_faces + last_vert_index + 1
        faces.extend( faces_indices.tolist() )

    # Remove duplicates
    faces = sorted([ sorted(f) for f in faces])
    faces = list(f for f,_ in itertools.groupby(faces))

    if 'tetrix' in D.objects:
        print( f"Updating mesh with level {n}" )
        o = D.objects['tetrix']
        m = o.data

        bm = bmesh.new()

        bmverts = [ bm.verts.new(co) for co in verts ]
        bmfaces = [ bm.faces.new([ bmverts[i] for i in f]) for f in faces ]

        bm.to_mesh( m )
        m.update()

    else:
        # Generate mesh data and initialize vertex and face arrays
        m = D.meshes.new('tetrix')

        # Generate mesh object and add to scene
        m.from_pydata( verts, [], faces )
        print({ k : len( quads[k] ) for k in quads })
        o = D.objects.new('tetrix',m)
        S.collection.objects.link( o )

bpy.app.handlers.frame_change_pre.append(update_tetrix)

Caveats

This solution doesn't enable animating a transition between levels, simply a harsh switch. You also don't get a lot of control over how long the pauses are between switches (though this could be done in post in any video editing software by multiplying or delaying frames).
Currently the entire data file is read prior to every frame change. This can be pretty slow if you've generate a big file with many levels (above 7), depending on your computer's specs. It could probably be improved by loading the file once to memory as a global scene object then reading directly from that prior to every frame change, rather than reading the file from disk every time.

Original Answer

This script can generate a n-level tetrix. It will work only in Blender 2.8 and utilizes some Numpy tricks for more efficient numerical manipulation.
import bpy, bmesh
import numpy as np
from mathutils import Vector

def generate_quad( original, quads, level, max_level ):
    ''' Recursive function generating 4 tetrahedra off of the the input tetrahedron '''

    # The 1st new tetrahedron is simply half the scale of the original starting from the original tet's bottom left corner
    origin = original.min(axis=0) / 2
    half  = original / 2
    half += origin

    # Calculate the dimensions of the new tetrahedra
    newdims = Vector( half.max(axis=0) - half.min(axis=0) )

    # The 2nd moves by the new tet's x dimension to the right
    right = half.copy()
    right[:,0] += newdims.x

    # The 3rd moves by half the x dim and all the y dim
    forward = half.copy()
    forward[:,0] += newdims.x / 2
    forward[:,1] += newdims.y

    # The 4th moves by half the x, a third of the y and all the z
    up = half.copy()
    up[:,0] += newdims.x / 2
    up[:,1] += newdims.y / 3
    up[:,2] += newdims.z

    quad = [ half, right, forward, up ]
    quads[ level ].extend( quad )

    if level < max_level:
        for q in quad:
            quads = generate_quad( q, quads, level + 1, max_level )

    return quads

## Main Code
C = bpy.context
D = bpy.data
S = C.scene

n     = 2  # Number of steps of the fractal
scale = 10 # Scale of the original tetrahedron

# Generate regular tetrahedron at the desired scale
orig = np.array([
    [0,   0, 0],
    [1,   0, 0],
    [0.5, 3**0.5/2, 0],
    [0.5, 1/3*3**0.5/2, ((3**0.5/2)**2 - (1/3*3**0.5/2)**2)**0.5]
]) * scale

regular_tet_faces = np.array([[3, 0, 1], [1, 0, 2], [0, 3, 2], [3, 1, 2]])

# Initialize data structure for all tetrahedra in all steps
quads = { i : [] for i in range( n+1 ) }

# Generate tetrix via recursive function
quads = generate_quad( orig, quads, 0, n )

# Generate mesh data and initialize vertex and face arrays
m     = D.meshes.new('tetrix')
verts = []
faces = regular_tet_faces.tolist()

# Generate mesh data
for q in quads[n]:
    # Find last vert index and add new verts
    last_vert_index = max([ len( verts ) - 1, 0 ])
    verts.extend( q.tolist() )

    # Use base face arrangement of original regular tetrahedron and offset indices
    faces_indices = regular_tet_faces + last_vert_index + 1
    faces.extend( faces_indices.tolist() )

# Generate mesh object and add to scene
m.from_pydata( verts, [], faces )
print({ k : len( quads[k] ) for k in quads })
o = D.objects.new('base',m)
S.collection.objects.link( o )

Here's a higher level tetrix from all orthographic angles and a free one (quad view):

Sorry for not commenting earlier. Nice result, but the sequence of creation doesn't fit the description, judging from the animation. If you're up to it, you can update the answer putting an alternative on top.

My description somewhat resembles an orderly explosion.

I should have realized immediately that the easiest way is to simply move duplicates by using the vertice coordinates of the original (which is what I was saying before, only in a more convoluted way, since coincidence was escaping me). The trouble is, I'm noticing the vertex coordinates of the moved tetrahedrons, aren't exact, even though they should be.  For example I get 2,000002,000002

Bmesh version.
Pyramid

Scaling a tetra particle on a single vert point cloud, such that each time it doubles in size, it uses the next level pyramid as a particle
Make one tetrahedron from coordinates. I have skinned it lazilly with convex hull
Now for each level, its pretty much from any vertex corner of the first tetrahedron, make 3 copies and move to the other end of each linked edge.
As the level increases by one the number of unit tetra edges that make up the offset doubles.
So pretty much make a unit mesh, for each level copy and distribute mesh 3 times, write to mesh.
Pointcloud
As well as creating a skinned unit form tetrahedrons, can simply seed the pyramid with a single vertex mesh, at the tetra origin.  Dupliverts or particle systems can then instance our units.

Four units, a level 0, 1, 2 and 3 pyramid. Three point clouds at level 0, 4, and 8
Script to make the 4 units and 3 point clouds.
import bpy
import bmesh
from mathutils import Vector
context = bpy.context
scene = context.scene

levels = 12
sublevels = 4

def new_coll(name, parent=None, obs=()):
    c = bpy.data.collections.new(name)
    if parent:
        parent.children.link(c)
    for o in obs:
        c.objects.link(o)
        o.hide_set(True)
    return c

coords = [Vector(c) for c in (
    (0, 0, 0),
    (1, 0, 0),
    (.5, 3**.5 / 2, 0),
    (.5, 1 / 3 * 3**.5 / 2, ((3**.5 / 2)**2 - (1 / 3 * 3**.5 / 2)**2)**.5))]

o = sum(coords, Vector()) / 4

def pyramid(me, levels, origin=o, scale=(1, 1, 1)):
    bm = bmesh.new()
    bm.from_mesh(me)
    for l in range(1, levels + 1):
        lvrts = len(me.vertices)
        for vec in coords[1:]:
            bm.from_mesh(me)
            bmesh.ops.translate(bm,
                                vec=2 ** (l - 1) * vec,
                                verts=bm.verts[-lvrts:],
                                )
        bm.to_mesh(me)
        # me.update()

    # to change origin to centroid.
    x = sum([v.co for v in bm.verts], Vector()) / len(bm.verts)

    bmesh.ops.translate(bm,
                        vec=-x,
                        verts=bm.verts,
                        )

    bmesh.ops.scale(bm,
                    vec=scale,
                    verts=bm.verts)

    bm.to_mesh(me)
    bm.free()
    return me

bm = bmesh.new()
# make a tetra
bmesh.ops.convex_hull(bm,
                      input=[bm.verts.new(c - o) for c in coords]
                      )
me = bpy.data.meshes.new("Tetra")
bm.to_mesh(me)
ob = bpy.data.objects.new("0Tetra", me)

trap_coll = new_coll("Trapinski", scene.collection)
units = [ob]
for level in range(1, sublevels):
    units.append(bpy.data.objects.new(f"{level}Pyramid",
                                      pyramid(me.copy(), level, origin=o / 4, scale=(2 ** -(level), ) * 3)))

unit_coll = new_coll("Units", trap_coll, units)

bm.clear()
frames = []
for level in range(0, levels, sublevels):  # levels):
    mef = bpy.data.meshes.new(f"Frame{level}")
    bm.verts.new(o)
    bm.to_mesh(mef)
    pyramid(mef, level)
    ob = bpy.data.objects.new(f"Frame{level}", mef)
    ob.scale = (2 ** -level,) * 3
    frames.append(ob)
    ob.instance_type = 'VERTS'

frame_coll = new_coll("Frames", trap_coll, frames)

Animating
Using a method similar to @TLousky with a frame change handler. continuing from script above

Swaps pointcloud every 40 frames and unit parented to that pointcloud ever 10 frames.
def show(units, frames):
    def handler(scene):
        f = scene.frame_current
        uidx = (f % 40) // 10
        idx = (f // 40) % len(frames.objects)
        #uidx = 0
        #uidx = scene.get("prop", 0)
        unit = units.objects[uidx]
        for frame in frames.objects:
            frame.hide_set(True)
        frame = frames.objects[idx]
        frame.hide_set(False)

        for u in units.objects:
            u.scale = (1, 1, 1)
            u.parent = None
        unit.parent = frame
        frame.hide_set(False)
    return handler

bpy.app.handlers.frame_change_pre.clear()
bpy.app.handlers.frame_change_pre.append(show(unit_coll, frame_coll))

Particle System
Another way of instancing is via a particle system.

Here I've added a simple particle system to single vertex frame 0 and shown result using each of 4 units as particle object
Can stack a number of particle systems per pointcloud objects, staggering a start and end frame and life time.
Using particles to grow the tree.

Growing the pyramid like a tree
AFAIC this is a tree structure.  It doesn't radiate out from its centre, rather it grows from the selected base.

Stepping through the first few frames. The top vertex is vertex group "level0" and particle system "level0" of the point cloud, the tetra particle grows (particle scale 0 to 1)  in 5 frames. (given a long life time or they start vanishing (cool effect actually), whereapon the next level is used, and so on
Here I've made one tetra, and one point cloud. Each level of the cloud is assigned a vertex group, and for each vertex group used as density for a staggered frame start  particle system.  The particle is keyframed to scale from 0 to 1 over tpf frames. For a level levels point cloud.
import bpy
import bmesh
from mathutils import Vector
context = bpy.context
scene = context.scene

def new_coll(name, parent=None, obs=()):
    c = bpy.data.collections.new(name)
    if parent:
        parent.children.link(c)
    for o in obs:
        c.objects.link(o)
        #o.hide_set(True)
    return c

coords = [Vector(c) for c in (
    (0, 0, 0),
    (1, 0, 0),
    (.5, 3**.5 / 2, 0),
    (.5, 1 / 3 * 3**.5 / 2, ((3**.5 / 2)**2 - (1 / 3 * 3**.5 / 2)**2)**.5))]

o = coords[3]

def pyramid(me, levels, origin=None, scale=(1, 1, 1)):
    bm = bmesh.new()
    bm.from_mesh(me)
    for l in range(1, levels + 1):
        lvrts = len(me.vertices)
        for vec in coords[1:]:
            bm.from_mesh(me)
            bmesh.ops.translate(bm,
                                vec=2 ** (l - 1) * vec,
                                verts=bm.verts[-lvrts:],
                                )
        bm.to_mesh(me)
        # me.update()

    # to change origin to centroid.
    if origin is not None:
        x = Vector(o)
    else:
        x = sum([v.co for v in bm.verts], Vector()) / len(bm.verts)

    bmesh.ops.translate(bm,
                        vec=-x,
                        verts=bm.verts,
                        )

    bmesh.ops.scale(bm,
                    vec=scale,
                    verts=bm.verts)

    bm.to_mesh(me)
    bm.free()
    return me

bm = bmesh.new()
# make a tetra
bmesh.ops.convex_hull(bm,
                      input=[bm.verts.new(c - o) for c in coords]
                      )
me = bpy.data.meshes.new("Tetra")
bm.to_mesh(me)
ob = bpy.data.objects.new("0Tetra", me)
# parameters ##########################
fpt = 5
level = 6
#######################################
trap_coll = new_coll("Trapinski", scene.collection)
units = [ob]
unit_coll = new_coll("Units", trap_coll, units)
bm.clear()
frames = []
ob.hide_set(True)
mef = bpy.data.meshes.new(f"Frame{level}")
bm.verts.new()
bm.to_mesh(mef)
pyramid(mef, level)
f = bpy.data.objects.new(f"Frame{level}", mef)

frames.append(f)

bm.clear()
bm.from_mesh(mef)
verts = sorted(bm.verts, key=lambda v: v.co.z)

lev = 0
while verts:
    v = verts.pop()
    print(v.co)
    vlevel = [v.index]
    while verts:
        if abs(v.co.z - verts[-1].co.z) < 1e-6:
            vlevel.append(verts.pop().index)
        else:
            break
    vg = f.vertex_groups.new(name = f"level{0}")
    vg.add(vlevel, 1, 'REPLACE')
    ps = f.modifiers.new(f"level{lev}", 'PARTICLE_SYSTEM')
    psys = ps.particle_system
    psys.settings.count = len(vlevel)
    psys.settings.frame_start = lev * fpt + 1
    psys.settings.frame_end = lev * fpt + 1
    psys.settings.lifetime = 1000
    psys.settings.render_type = 'OBJECT'
    psys.settings.instance_object = ob
    psys.settings.emit_from = 'VERT'
    psys.settings.use_emit_random = False
    psys.settings.physics_type = 'NO'
    psys.settings.particle_size = 0
    psys.settings.keyframe_insert("particle_size", frame=lev * fpt + 1)
    psys.settings.particle_size = 1
    psys.settings.keyframe_insert("particle_size", frame=lev * fpt + fpt + 1)
    psys.settings.use_global_instance = True
    psys.settings.use_rotation_instance = True
    psys.settings.use_scale_instance = True

    psys.settings.rotation_mode = 'NONE'
    psys.vertex_group_density = vg.name

    lev += 1

frame_coll = new_coll("Frames", trap_coll, frames)

Note could use a certain level staggered to be the next level, ie use the animation created again offset to the bottom three corners.
Collection Instance
Lastly, can make a collection instance from the duplivert frame / unit pair.

The collection instance of frame4 dupliverting simple tetra
This instance can be used as a particle.
Scaling
The code above is set up to have the units unit size, and the frames scaled such that the whole is unit size.  The pyramid will double in size for each level, and gets large very quickly.  It is not splitting edges.

Adding a parent empty to double unit in size on every level change.  Looking from above in viewport, till it gets so large we are inside it looking thru the bottom gap, at which time the viewport is rolled around x
Summing Up.
There are a number of techniques shown here to make animations going from base tetra to extremely high level pyramids, only using one tetra, or a few simple levels of faced meshes.

Try to do it as I described in reply to miceterminator, and then animate it, and if you also tell me how to position the tetrahedron the way I want, that's a bonus, because it's really bugging me.

Edited such that origin in centroid of tetra verts.

I can't tell if this is doing what I described LOL you'd have to animate it.

Crazy compact and cool solution!

Cheers TLousky, great group of answers.  @t8ja possible this could be two questions, creating and animating.

It is a great collection and many will benefit from it, as have you, I suppose since maybe you haven't though of doing this before, but my description of multiplication with translation (or the opposite, multiplication with scaling) still hasn't been fulfilled in any of the answers. There's a paraphrased description under @miceterminators answer, in case you couldn't properly visualize the one in the my chief question.  Seeing what you've done already, I'm convinced you'd have no problem following the paraphrased  "instruction" .

It appears I got confused, the description that was under @miceterminator question, was more simplistic than the original, and the gif I now added depicts how that would look.  The original description lacks any overlapping of shapes, except in the first stage, which repeats, more and more off center, branching out.

I consider TLousky's answer superior, especially for pedagogic reasons (expressiveness and documentation of the code).
A few minutes late but without numpy (also 2.8 only):
import bpy
from itertools import combinations
from mathutils import *

scale = .333 #scale of one tetrahedon
tetrons = 0  #index of current tetron
steps = 4    # recursion steps

vec =(
(0,0,0),
(1,0,0),
(.5,3**.5/2,0),
(.5,1/3*3**.5/2, ((3**.5/2)**2 - (1/3*3**.5/2)**2)**.5))
verts = Matrix(vec)
vertices = []
faces = []

def Tetron(vec=Vector([0,0,0]), ):
    #Adds tetrahedons to vertices and faces
    global tetrons
    base_vecs = verts*scale
    for base_vec in base_vecs:
        base_vec += vec*scale
        vertices.append(base_vec)
    faces_ = list(combinations(list(range(tetrons*4, tetrons*4+4)), r = 3))
    faces.extend(faces_)
    print("ind {}".format(tetrons))
    tetrons+=1

def SiPyramid(depth, vec=Vector([0,0,0])):
    #Recursive function to add Tetrahedons
    if depth < 0:
        return 0
    if depth==0:
        Tetron(vec)
    else:
        for base_vec in verts:
            print(depth-1)
            print((2**(depth-1)*base_vec + vec ))
            SiPyramid(depth-1, 2**(depth-1)*base_vec + vec   )

SiPyramid(steps)

#Link data to blender objects
mesh_data = bpy.data.meshes.new("sierpinsky")
mesh_data.from_pydata(vertices, [], faces)
mesh_data.update()
obj = bpy.data.objects.new("Sierpinsky", mesh_data)
bpy.context.collection.objects.link(obj)

At 10 steps (might take a few seconds to generate):

You're too kind @miceterminator (though maybe not to mice? :-D). Great job reconstructing that Mathematica code in an elegant, efficient way. I suspect your code might run faster, it took me 120 seconds on my 13" Macbook pro to generate a 10 step tetrix. Did you run any benchmarks?

Speed counts for nothing without readability. My code runs a bit faster, but it is not really well documented. I spend too much time trying to get  a cool animation to go with the answer :).

Very nice results, but can you tell me do they relate to the methods I was describing, since my idea was to do the multiplication and repositioning in a way such that every step is animatable ?  Are the original single tetra in your scripts oriented in the way I described in the end ? I'd like to confirm my hunch, that this approach would slim down the script.

I don't follow. There are many ways to animate the creation of a Tetrix and I am unable to deduce the way you want to do it from your question. The alignment is somewhat flexible as you can change that by rotating the original vertex coordinates defined in the "vec" variable.

So far I've identified the "manipulator elements" I need to get the desired result. For the first case"multiplication case", the sequence goes as follows: first there is one, one multiplies to 4, the 4 go in the directions determined by the vertices (Ctrl+Alt+Space to get a custom orientation from the 4 vertices).

LOL I got confused... the gif I now added shows the simpler version (previously, DELETED, described here, done manually and in an easier more logical way) , but the original description would have each tetra experience the initial fragmentation and that appears much more difficult to animate.

I've produced a Sierpinski Pyramid using Array modifiers. Two are needed per iteration.
First, create a tetrahedron. This can be done by creating a cube, deleting two opposite vertices from the top face and the other two opposite vertices from the bottom face, then reconnecting the remaining vertices. Then rotate it and align it so that one face is flat and the top vertex is the object's origin.
Next create an empty at the origin, and rotate it 120 degrees. Call this RotEmpty.
Finally create an empty at one of the bottom vertices. Call this LocEmpty1.
Apply two Array modifiers to the object. The first should use LocEmpty1 for its offset and have a count of 2. The second should use RotEmpty and have a count of 3. Check the boxes to merge vertices - this will help reduce the geometry as it's not optimal...
To add another tier, place a new Empty at the bottom of the pyramid, duplicate both modifiers on the pyramid and set the Loc one to the new empty. Repeat as needed until you have the number of tiers you need.
The advantage to generating it this way is that you can animate it. I did this by parenting everything to the pyramid, then animating each Empty going from the origin to its "full" location in sequence, and moving the whole pyramid up to keep its center at the origin. Set the camera to zoom out over the whole thing, slap a sun light on there, and... ta-da!

Nice method, and it visually reproduces the "opposite procedure" I described in the second paragraph, though only in the first iteration.   General visual impression is GREAT though.   Post another answer or make an addendum to this one  if you can modify the procedure so that every individual newly created tetrahedron experiences the internal division, without overlapping the prior stage , as is happening here.  The closest answer yet (or at least because I can actually see the steps because you cared to animate)

Did you use 2.8 ? Because the blend file appears empty, and also when I do the procedure manually in 2.79 it doesn't turn out right.

Yes, this was done with 2.8. Sorry, I should have specified that. I don't think it uses 2.8-specific features, so if you recreate it in 2.79 it should work.

You didn't specify the rotation axis of the RotEmpty, and I have a difficulty understanding how just stacking tetrahedrons (if that is what this array is doing) is giving this appearance of scaling (in the first stage).  Your instructions are probably  incomplete.

The RotEmpty should be rotated in the Z-axis. The "scaling" effect is just the camera zooming out.

No, the scaling effect I'm talking about is the appearance of the 4 tetrahedra gradually scaling toward the vertices

Yup. There's no scaling involved. The four tetrahedra are the same size as the original one, the camera has just been zoomed backwards to make it appear the same size.

You could, of course, simply animate the Scale of the initial tetrahedron from 1 to 0.5.

The thing is... I can't even reproduce the fist stage in blender 2.79, using the instructions as you've laid them out

I've re-created the first level in 2.79: Download - Hope that helps.

Something must have been wrong with my settings, but not with the ones I was looking at and setting LOL because everything I'm seeing in your file is the same

"Relative offset" was ticked by default, and you didn't explicity say to turn it off XD,  I got the second stage.

I added a GIF so you can see exactly what I was describing.

Actually no, the description is even more complex... damn it's tripping me up

The GIF IS the same result you got, and your is still manual, maybe even harder to repeat than mine.

This is a non-script approach. You can create this fractal adding a tetrahedron with Extra Objects add-on. Then subdivide it once, remove middle triangles and make inner faces. Repeat the subdivide once and remove and  make faces steps a few times. Scale the fractal down and then animate scaling it up to show the structure.

Read the comments.


text:
How to snap plane center to a static vertex?
I want to snap the center of the circular plane to the vertex of the tetrahedron while rotating the cone around the origin (keeping its' peak in the origin).
I have made a vertex at the center of the circular base, but it's not showing up in object mode, and does not appear to be interactive in a snapping manner.
I realize this could also be done just by knowing the angle (and, in this case, rotating along the X axis), but I'm not aware of an embedded way to determine it.
Generally, in dealing with symmetrical manipulations, it would be nice to have a snapping grid that conforms to certain form. The regular cartesian could then be called "octahedral" since there are 3 axes x,y,z , and the next in axis count would be "tetrahedral"(one I would be using in this example) which would have all the common options that constrict manipulation to given axes. Just a suggestion, or in case there's already an Addon, feel free to link.

It looks as if you've already done most of this, but for the sake of completeness, trying to keep the steps minimal from the worst case:
To place the tetrahedron's origin at its centroid

In Object Mode, tetrahedron selected, ShiftAltO > 'Origin to Center of Mass'

To place the cone's origin at its point

In Edit mode, select the point vertex
ShiftS > 'Cursor to Selected'
In Object Mode, ShiftAltO > 'Origin to 3D Cursor'

To place the cone's point at the centroid of the terahedron

In Object Mode, tetrahedron selected, ShiftS > 'Cursor to Selected'
Cone selected, ShiftS > 'Selection to Cursor'

TL;DR, cut to the chase....
To align the cone to one of the vertices of the tetrahedron
(given you have created a vertex at the center of the cone's base, and having centered the cone to the tetrahedron, as above)

Set Pivot to '3D Cursor', Snap to 'Active' and 'Vertex'.
Object Mode, ShiftS 'Cursor to Selected' ( either cone or tetrahedron, to put the cursor at the cone's point)
Edit Mode, select all vertices of the cone, make the base-center vertex active.
In each axis in turn, RX,RY,RZ, snap the active vertex in rotation to the desired corner of the tetrahedron.

To move the base of the cone to one of the vertices of the tetrahedron

With preceding step taken, S scale the base to the corner, snapping to the active base-center vertex.

(You don't actually have to create a vertex at the center of the base of the cone .. instead of setting the snap to 'Active' you can set it to 'Center' and snap the cone's base as a whole, to the corner of the tetrahedron.)

I believe I've done everything per instruction, even tried Center instead of Active, but it doesn't stick. Here's the file, to inspect          from this point I'm rotating on X, but snapping doesn't occur, even though I'm certain the base center vertex should coincide with tetrahedron corner. Thank you for responding.

Works for me... :( .. I got a perfect snap in your file (which arrived slightly out)- the height of your cone is spot on . You can't guarantee a snap to position in the first two rotations - only orientation in those dimensions. The last rotation should take you there. It helps to look down the axis you're rotating around.. I generally have the snap magnet set to off,  and use ctrl to wake it up. Hover over the target until the snap circle is visible. I'm in 2.97?

What do you mean by first two rotations ? I press R then X to constrain, and while rotating around, the cone gets into weird, seemingly random positions, although they're always the same depending on which snap option is chosen.  I have the same version 2.79.

maybe it has something to do with coordinates, because when I go into "Edit mode" on the cone, it shows me the original/spawn coordinates, not the actual coordinate of the vertex (for every vertex on the circle it's showing z=-1 while the other two are varying).

I created a new cone, did the same thing as last time, but now it's working and the coordinates are correct (maybe I accidentally pressed something). Thank you for helping, and maybe you can explain this coordinate discrepancy (what did I press) ?

I've been trying to get it go wrong.. I can sometimes get a sort of gimballing... but then I just switch to a more skew axis .. maybe that's what I'm doing instinctively going round numpad 1,3,7, looking for the axis with greatest skew, and correcting that first, rotating around the axis I'm looking down.

I've been looking down the X axis from the start, but that didn't seem to make a difference, probably because these coordinates were stuck, and the system was recognizing the transform (rotation), I was doing, as if it were happening some other way.         I was getting into Blender a while back, but had to pause, and some info slipped from my mind, but i remembered cases where the coordinates would remain "struck" this way after transform (I remember seeing an explanation in tutorials)

source: Stack Exchange

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

sort: votes


text:
3 problems achieving a 10:00 minute countdown clock animation. (non-repeating seconds, changing 100 units to units of 60, minutes not following math)
I'm working on creating a COUNTDOWN ANIMATION of ten minutes 10:00 to 0:00 using the Animation Nodes Add On.
I can't find as yet a way to repeat the seconds portion so every 60 seconds so it recycles again starting over and repeating 9 more times. Is there s a loop node within the animation nodes?
I'm also unable to find a UNITS NODE offering an ability to change it's native 100, to 60. My workaround was to create two separate countdowns, one for minutes, and one for seconds next to each other. Of course one major problem with this is when the countdown begins, the minutes doesn't change from 10 to 9 immediately, instead changing 1/10th the time between 10:00 and 0:00.
Here's the current left to right setup of the nodes:

Timer Info > Delay Time 10-0 > Animate Float > Float to Text > Text Object Output

Timer Info > Delay Time  60-0> Animate Float > Float to Text > Text Object Output

Hello and welcome. Please don't write in all caps, it is the online equivalent of shouting and is considered rude

Use math operator integer modulus relative to a frame number.
pseudo programming language ... I think you can translate this to BAN
time = (10 * 60 )- ((frame - offset)) #bias can be used
hour = integer(time/60)
minute = time % 60 # modulus operation

please improve

I was very scared by your shouting.

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


text:
How to loop cut a hexagon into 8 parts
I'd like to cut a hexagonal cylinder into 8 parts. I don't understand why the cut isn't going all around it, but instead it is just on one face. Anyone know how to fix this?

If you use Ctrl R to create an edge loop, it can only cut a quad, it can't cut a ngon, because it doesn't know where it is supposed to cut. What you can do, depending on how you want to cut the top face, is either use a knife (K to activate), or inset the top face with "i", or J to join 2 vertices, etc

Hello. Above the ngon issue, what are the 8 parts you want to obtain?


text:
Middle Mouse Button not working in blender
I have a Three button mouse. But still I cannot use the middle mouse button to rotate and pan the view in the navigation port. I also cannot set the start and end points of the output in the timeline using middle mouse button.

Things to try:

Check that the mouse works and that no other software steals the input
Backup your settings (optional but a good idea)
Reset Blenders factory settings

i did everything. i also tried blender to install in my another pc. but same issue there. is there a specific mouse company or driver that blender needs


text:
Rendered image is way too pixelated

When I render, I get an image that is pixelated far beyond recognition.

Have you considered researching within Cycles settings such as Sampling Tab/ samples render and samples viewport? (names may differ slightly for different versions Blender)  Please see denoising.   You can search those topics here at BSE and there are tutorials at the website which has a name that rhymes with noonoob.  I do recognize some structure in your image as opposed to random noise.  Keep in mind Blender allows low compute requirements render and high compute requirement render so you can decide when the work is best for you.

The Resolution $X$ and $Y$ settings for the Render Dimensions determine the render size in pixels.
But when you use percentage control, the number of pixels will be reduced if you use a smaller number than 100%.
In this example, a 1920 x 1080 image is rendered at 1%, yielding an image measuring of only 19 x 10 pixels.
Hardly enough pixels to make the sense of the original scene.

thank you! why would these dimension settings have been set to 1% by default i wonder

Blender does not do that on it's own, that much I can tell you. Check how you move the mouse and where you click...

Hi @DaveFransz Please consider to accept the answer if your issue has been solved. How this site works: https://blender.stackexchange.com/tour


text:
help me to install and run version 2.9 in Ubuntu
How can I install Blender 2.9 in Ubuntu linux?
I installed the blender 2.9 file and extract it then when I tried open it there was so many files so I ran the file which is named 'blender'. I have tried to run the file multiple times, but have failed each time.
I also had a older version of blender 2.79 which I can use, but I need to use blender 2.9 for my animation project because it is the version my friends are using.

Most 2.9 files are compatible with 2.8x.

Just download the file from blender.org, uncompress the file, open the directory and run the file named blender.

Ubuntu has a snap store, download blender from there, make sure is the one made by the blender foundation. Just download and install like a regular app on a phone

You have to make a file executable before running it.I will explain two ways to do that here.
Gui way

Right click on blender
click on properties
click on permissions tab
check make as executable box

now apply your changes and run blender

command line way

navigate to the location were you have extracted blender via a file manager.

right click on empty space and select open terminal here.Note open terminal option may be in different sub menu for you.

now execute the following commands one by one

  chmod +x blender
  ./blender


text:
Certain image textures not applying right
Currently, I am trying to apply an image texture to the eyes of this model, yet when I add the image into the nodes, the texture will either come out misaligned and not be where it should, or just appear black like in the picture. (The problem has occurred on other models as well) The model I am currently using was imported from SFM using Crowbar, and the textures were imported using VTF

Edit. I am unsure of whether or not the UV is misaligned in any way, so I have attached an image with the entire UV shown.

"Applying right" is not a universal concept. When you use an image as texture on a material, the default coordinates are set by the UV maps. Most likely the UV maps are not set the way you need them. Please [edit] your question and show an image that shows said UVs.

There we go. I'm still fairly new to Blender, so I'm sorry if I'm slow to catch onto things.


text:
Viewports broken on RX 580
Blender was working fine until recently (I can't pin point what happened). I have not knowingly changed any settings in Blender or on my PC in general.
I've been working with Blender daily and hadn't noticed the change since most of what I was doing was in Cycles Render View, which does seem to work.
Here's the problem.
Doesn't matter if it's a file I open or a default object on a fresh file.
In Object mode, if I add any object (example monkey), then switch to wire frame, I get an outline of the object only, no wire frame. Solid view seems to show correctly. Material Preview only shows a filled outline, the fill color is the same as the grid color, but applying a color does not make any difference. Render View EEVEE shows a filled outline, not a render, and the fill color disappears as I rotate the object. If I switch to Cycles, it seems to be ok.
I was using Blender 2.90, and hoped that switching to 2.91 would resolve, but it's exactly the same. I also tried going back to 2.8 and got the same result. I then looked at my graphics card RX 580 which recently did an update...I reverted back to the previous version, but to no avail.
I'm out of ideas, and cannot figure out if this a Blender issue, a hardware/software issue....or if I inadvertently clicked something. I've looked through Blender settings repeatedly but can't see what could be wrong.
I did see a post here from another user who is having the exact same issue, and he/she uploaded a youtube video showing their issue. I would have preferred to comment on theirs, but this forum doesn't let me, so I had to load my own questions.
[UPDATE Dec 4-2020]
I did a system restore back 1 month (to ensure no new updates were present), tested and Blender was working fine (V2.90). I began re-installing updates one at a time and test after each.
Summary of results - All Windows updates installed to current, Blender works fine.
Radeon updates - v20.9.2 (driver v27.20.12031.1000), Blender works without issue.
Radeon update 20.11.2 & 20.11.3, Blender is broken.

Yes there are the graphic card driver discussions drifting about. You did look at the overlay settings for particular objects and classes of objects in the 3D Viewport Window?  I had a problem that I did not pursue strongly with lattices.  It was in the overlay [extras] category.

I've seen a lot of related complaints on this site recently, some specific to the RX 580, others with newer cards such as the RTX 3000 series. I'm beginning to thing it must be the result of some driver update that was pushed out in timing with the new hardware. Some have had success using 2.92 alpha, but it doesn't always work.

@ atomicbezierslinger
I'm using factory default settings (with the exception of changing to OpenCL). No addons are active, and the issue is present on default objects on a new file. I tried looking at the overlays, but don't see any problems from there, and changing any settings does not resolve the issue.

"Not knowingly changed", could it mean that the OS (windows?) did an automatic update ?

@susu
Yes, as a matter of fact, Windows did a large update last week. I considered that, but would have thought there to be way more noise about this issue if that were the case. I suppose I can't rule it out, but I don't even know where to begin if that's the case.

Probably not what you want to hear, but AMD GPUs are known for having issues. Sometimes also the new updates on the OS can break the drivers, so look for updated drivers. If you were able to work last week, then consider reverting the updates on the OS as well.

Started having the same problem just after a Radeon update[I think 20.11.1]  (AMD RX580 8gb),
GPU viewport rendering is broken(was using portable Blender folder, tried installing updated Blender and still no fix).
After some googling found some people were having similar problems and decided to leave it for a couple of weeks in case of a fix-patch.
No update patch yet but I tried switching to "High Quality Normals" and it totally worked for me!
TEMPORARY FIX: Render Properties > Performance > High Quality
Hope this can help others too.

I have the same exact issue as you and I actually posted about it a few hours back. During that time I was just fiddling around with the render settings and I discovered that (in Eevee) going to Performance > High Quality normals and turning "High Quality Normals" on fixed the issue for me. Hope if works for you too!

I use Cycles render and don't see an option for High Quality Normals. But thanks for taking the time to send your find, glad it works for you.

Graphics card update is cause of issue in viewport.

Radeon updates - v20.9.2 (driver v27.20.12031.1000), Blender works without issue.
Radeon update 20.11.2 & 20.11.3, Blender is broken.


text:
How can the active bone group be set from a script?
According to the docs

bpy.ops.pose.group_select()
   Select bones in active Bone Group

How can the active bone group be set?
Context:
import bpy
is_debug = True

def debug(msg):
    if is_debug:
        print( "Frame:%d %s" % (bpy.context.scene.frame_current, msg ))

def find_bone_names_by_group(passedPose, passedGroupName):
    result = []
    for b in passedPose.bones:
        if hasattr( b.bone_group, "name"):
            if b.bone_group.name == passedGroupName:
                result.append(b.bone.name)
    return result

def dump(obj,name="obj"):
   for attr in dir(obj):
       if hasattr( obj, attr ):
           print( "%s.%s = %s" % (name,attr, getattr(obj, attr)))

def assign_pose(rig, bone_group_name, pose_name):

    pl = rig.pose_library
    pm=pl.pose_markers[ pose_name ]
    #dump(pm)
    debug("pose_marker=" +str(pm))
    p = rig.pose

    bones_to_modify = find_bone_names_by_group(p, bone_group_name)
    if len(bones_to_modify ) < 1:
        print("No bones found in group [" + bone_group_name + "].")
        return

    action =  bpy.data.actions[pl.name]
    debug("assign_pose " + pose_name)
    for agrp in action.groups:
        if agrp.name in bones_to_modify:
            i = p.bones.find(agrp.name)
            if i != -1:
                pb = p.bones[i]
                debug("Found bone:" + pb.name )
                # check if group has any keyframes.
                for fc in agrp.channels:
                    tmpValue = fc.evaluate(bpy.context.scene.frame_current)
                    # Determine where to assign this value based upon the data_path.
                    if fc.data_path.find("location") != -1:
                        pb.location[fc.array_index] = tmpValue
                    if fc.data_path.find("rotation_quaternion") != -1:
                        pb.rotation_quaternion[fc.array_index] = tmpValue
                bpy.ops.anim.keyframe_insert(type='BUILTIN_KSI_LocRot',confirm_success=is_debug)
                #bpy.ops.anim.keyframe_insert(type='DEFAULT', confirm_success=True)
            else:
                print("Pose bone [" + agrp.name + "] not found.")

txt = bpy.data.texts["pose.txt"].as_string()
for line in txt.splitlines():
    if line.find(" ") != -1 and line.find("#") == -1:
        sframe,rig_and_poses= line.split(" ")
        rest=rig_and_poses.split(":")
        print("-"*40)
        rig_name=rest[0]
        poses=rest[1]
        pose_list=poses.split(",")
        bpy.context.scene.frame_set( int( sframe ))
        for assignment in pose_list:
            bone_group_name,pose_name=assignment.split("=")
            rig = bpy.data.objects.get(rig_name)
            if rig == None:
                print("rig name=" + rig_name + " not found.")
                break
            debug("assign rig:%s bone_group:%s, pose:%s" % (rig, bone_group_name, pose_name))
            assign_pose(rig, bone_group_name, pose_name)

Example:
import bpy

obj = bpy.data.objects['Armature']
bone_groups = obj.pose.bone_groups

bone_groups.active = bone_groups[string_key]
#or
bone_groups.active_index = new_index

The indices relate to the order of the bone groups in the list. In the UI the first element is shown at the top and the last element is shown at the bottom. You will probably want to change the bone group directly via .active in most cases. But sometimes you might want to refer to a given position in that list. In this case you can change the active group via .active_index. The order roughly resembles the creation order.

Pose bone groups are accessible via Object.pose.bone_groups, the active group is readable and writeable using the active property:
bone_groups.active
You can actually select the bones of a group without the operator. What we need is the bone group and a way to select bones. The bone group is stored in a pose bone itself:
PoseBone.bone_group
So we iterate over all pose bones, check the bone group and need to select the bones that are in your desired group. PoseBones don't have a .select property, we need to use their corresponding Bones and set the .select = True on them:
ob = bpy.context.object # assuming this is an armature
pb_group = ob.pose.bone_groups['Group'] # the pose bone group we wanna select

for pbone, bone in zip(ob.pose.bones, ob.data.bones):
    if pbone.bone_group == pb_group:
        bone.select = True
        bone.select_head = True
        bone.select_tail = True

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


text:
I can't render animation in Blender with the rendered model and a picture background
I have created in Blender a Star Destroyer Model from scratch, with textures and all, and rendered it to an image ( it's attached here ).

It looks great in my opinion. So I decided to create an animation with it. It is supposed to look like this: https://youtu.be/ljvxzYJhRYo ( it's my own video on my Youtube channel).
The animation above was made with opengl render and my problem is that it doesn't have the background that I put as well as any textures and displacements on the Star Destroyer like in the rendered image attached here.
I tried to render also with the normal render button and always it rendered a black screen. I am 100% sure that my camera angle is right so I know that is not the problem.
This is how I want to be the animation, of course with all the textures and background image.
https://www.youtube.com/watch?v=9qc9WmDYXFs&feature=youtu.be (my own video recording of my screen)
Can you tell me why my normal rendering doesn't work? This is how it looks when I render with the normal button NOT opengl:

The renderer doesn't do anything and I don't know why.
You would help me a lot if you could help me with this project of mine.

I suggest you familiarize yourself a bit more with the software. The background images you see in the 3d viewport will NEVER be rendered. In order to get a background image you can use the compositor:
How to composite in a background picture?
As for the rendering to black screen, check the compositor as well (is everything set up correctly) and check if the light sources work. (This you can check in the viewport by changing to the cycles preview)
What does the Render and Preview of the Samples section do?
a relevant tutorial is
here


text:
Creating orthogonal axis in blender (geometric model)
I'm not a blender expert, so I don't know how to do this quickly.
Is it possible to create quickly something like the following?

Regardless of the "Blend4Web" or "Blender" I'd literally like to istantiate these axis as geometric models in a scene, it doesn't seem to be a default model in blender.
What I'm trying to achieve is
Not exactly, but basically a couple of these reference frames two planes in front of each, a third plane and a couple of lines, maybe showing where the intersections happen.
Update: Something like the stuff below is more close to what I want:

I would create a Cube and position then delete unwanted Edges in Edit mode.
In Object Mode I would press Alt+C to convert the Object to a Curve from Mesh and then in the Data Tab for Curve, Fill: Full at a Depth and Resolution that suits my needs.
Once settled, I could color the axis or texture the object by converting it BACK to a Mesh from Curve so I was back on familiar ground (Curves have different behaviors).

What about the arrows?

In Edit Mode, you could close the converted axis geometry with arrows you make from the resulting cylinders or boxes. If you're going to do it a lot, it would be a benefit to do it right once and save that file to append the model later. There are also Extra Curve Objects as an addon that might have shapes you prefer to use as arrows.

Can you please elaborate a little bit more about the color and the arrows?

XYZ correspond to RGB so I thought you'd consider color an important part of the axis mesh.
The addon under User Preferences isn't active by default but once enabled, [Shift]+[A] Curves will reveal Arrow profiles and three or so different styles exist.
You might be better off posting a drawing and seeing if a Blender user can knock out a diagram for you! The orthographic or iso view would make it fun.
(My profile seems to have been split in half - sorry for any delay in getting back to you.)

Hello, I did post a picture which is a bit closer to what I'm trying to achieve. The thing is I'd like to have the basic geometry, which intersections point highlighted and  reference frame. So I can rotate the view by myself, render, and later add labels with some notation of formulas.


text:
Please can anyone tell me how i can model the areas in the red box
I am trying to model the side wall light in the reference image can anyone help me?

How to upload an image to a post

You can use your image as Reference, extrude vertices along the shape:

Fill the faces:

Extrude upwards:

Extrude downwards to dig the sculpture, etc:

Thank you that was really helpful ❤❤


text:
SheepIt upload warning, Files not found
I started using SheepIt today and I tried uploading my first .Blend onto it. After I uploaded it, I got this error message. I had already used the Find Missing Files Function, and the Pack All in .Blend Function to get these files into the .Blend, but it still thinks these two files are missing. Does anybody know what to do? Thanks!

It would help if you added some information about your scene. The "Pack All" function will only pack images into the file. It will not pack simulation caches, video files, image sequences.

The Face_1 and FaceB_1 were both part of image sequences. Is there a way I can also pack them into the scene?

https://blender.stackexchange.com/questions/63251/packing-image-and-movie-strips/63253#63253

I use sheepit too!
This error comes up when you are missing image files, caches, or other external sources which are required in the rendering process. In this case, I would check the box in Blender under File > External Files > Automatically pack into .blend.
This should do the trick.
If not, then you would have to take the image files and pack the into a .zip file with the blender file. You would have to make sure that the image directory in Blender for the images is set to local in the file, so that it would find it on any computer. (Which is how sheepit works.)


text:
Whats the easiest way to get an add on working again?
I have been using the rock generator function which is part of the Add Mesh: Extra Objects add on in Blender 2.9.
I found a section of the code wasn't working the way I wanted it to and hence edited one of the python scripts associated with the rock generation.
I now realize that this was a mistake. The option to add rocks has disappeared from blender (although the Add Mesh: Extra Objects add on is selected).
I have also changed back the add on and have found another way (in my own blender scripting) to get round the issue I was having with the add-on.
Whats the easiest way to get the rock generator add on working again?

Have you tried simply reinstalling it? All of the bundled addons come with any build of blender...

@Timaroberts I have now, and have everything back, however im still curious about whether theres another way of doing it.


text:
How can I determine the resulting numbers for dice throw on an animation?
I have two normal game dice with numbers 1 - 6. I want throw them. - It is OK. I know how to do that.
The result (numbers on dice when stop) of the throw is random. But I want exact numbers on the dice as a throw result (for example 1 and 5 on dice when animation ends).
Is there any way how to do that? Or I have to try randomly change high of the fall or rotation of the dice on start of the animation and hope it will help?
Thank you.

Create the animation first, so that you know what faces end up on top. Then assign the material and textures so that they are what you want.

Smart trick! I have seen this also used in "marble sorting" animations.

And now I'm wondering if the physics engine could be used to experiment with weighted dice...

Switch your Transform Orientations to Local, and once your dice has fallen and stopped, go in Edit mode and rotate it 180° or 90° or -90° on the right axis until you see the wanted face.
As Robin Betts says, if your cube has small differences of topology between its faces it may change the result, in that case you need to bake the result before rotating the cube.
Or, as suggested by user9746379, simply parent the dice to a basic cube of the same size and that contains it, this parent has the physics, not the dice, once the cube has rolled, rotate the dice as wanted, and at the end only render the dice. This way, the topology differences between faces won't be taken into account.

Naaah .. use a little script to tweak initial conditions, and keep rendering till it comes right. See?....

wow, nice, why make it simple when you can make it complicated, there's a two though, 5 six would have looked suspicious I guess

That's the joke ;).. Once I saw your method, I had to give it a go. Funnily enough, if there's the tiniest geometric difference between  the sides of the dice (My dots are concave) you must bake the simulation before making the mesh-rotate. Butterfly effect.

You're right I should precise that, so did you just bake or did you really use a script?

Thank you. I tried it and all results are not good. Sometimes it works and sometimes not.

Of COURSE  I did it your way!!!  XD.. I would have been rendering for months !

ok I didn't imagine small dots would make any difference, I'm going to roll a real dice several thousand times to see if one face has more chance to win than another ah ah

I tried to do little modification and it seems it works: Make a dice and make a basic cube only little bigger than dice around the dice (= envelope of the dice). Dice has no rigid body, envelope has rigid body. Set origin of the dice = origin of the envelope. Set transparent material for envelope cube. Start animation and when animation stops, rotate in Object Mode only dice inside envelope cube.

oh yes of course, and you don't even need to create a transparent material for the parent cube, just don't render it

Create the animation first, so that you know what faces end up on top.
Then assign the material and textures, so that they show the numbers you want.


text:
Why is my asset appearing as non-transparent?

I just downloaded a 3d plant asset in FBX format from Megascans and this is the way my model appears.

The wheat seems to not be flat, and non-transparent. How do I make it transparent around the grains, and not as rectangular?

I'm really sorry I thought the picture was added. I'm new to this so it was a bit confusing at first but thanks for pointing it out.

@susu I have edited the question to make it more clear, please review the question again.

Many thanks for reviewing my question. It's really appreciated.

Set the material's Blend Mode to Alpha Clip or Alpha Hashed. Also make sure the alpha socket is connected.

I did try this and connecting the alpha socket to albido.jpg, opacity.jpg and translucency.jpg 1 by 1 but still showing the rectangular shape.

None of the images you are using has an alpha channel. The transparency has to come from somewhere. Do you have a transparency map? That is the one that should be plugged to the alpha input on the Principled BSDF shader. Else try plugging the "translucency" and see if that works.

I don't have the transparency map and I tried with the translucent map and it doesn't work when I plug it into the principal BSDF - alpha

The alpha (transparency) has to come from somewhere. Blender will not create it magically for you.

Sorry Im new to this but I will do my best to learn fast, I checked in the export setting in megasacans and I can add those map: MASK, TRANSMISSION, FUZZ ? but I don't see the transparency map

What does the opacity map look like?

The opacity map got black and white information, I did try to link it with the alpha from the shader BSDF and change in material setting alpha clip or alpha rashed but still I don't see any result

Are you connecting the Color socket of the opacity map to the Alpha socket on the Principled node?

Thanks so much I did what you said about the opacity colour socket to the alpha from the principal BSDF and it works.

Thanks to everyone who helped me.

Looking at the material, nothing is connected to the alpha input of the shader. Connect this, and then make sure in the material settings that alpha mode is set to “hashed” and not “opaque”.

To have "transparency" you need some form of mask or map for it.
Let's say you have two images:
1- The color information
2 - A "Transparency" or "Opaque" map, which would be a black and white image that determines what is "see through" (black) and what is opaque (white).
Usually this information is embedded in an "Alpha" channel, but since you are dealing with the worst possible format (jpeg) there is no alpha channel.

To use the transparency, use an image texture node and plug it to the alpha socket of the Principled BSDF.

Read also:
Add a transparent image on top of a material
Transparent image like a decal on mesh with principled BSDF shader


text:
AMD ProRender 3.0.8 crashing on final render - 2.91.2
I am trying to use a Radeon RX570 in a Razor Core EGPU on a Mac. I was having constant crashing issues with it both in viewport and rendering. I have found a solution for the viewport problem by turning off the "OpenGL Interoperability" setting. However, I am still getting a crash when I try to render out a final result. Does anyone have a solution? I am using the latest version of both Blender and ProRender.


text:
Share custom compositor nodes among blend files
I feel there are some basic nodes currently missing from the node repertoire of the compositor and material editor. One such node (for me at least) is a "vector" node. This would be the 3D equivalent of the 1D "Value" node. Such node would takes 3 inputs X, Y, Z and have one vector output. Why the need for such a node? Some nodes take a vector as input (e.g. "offset" or "scale" etc), but you cannot connect a single value output of a node to the individual values of a 3 valued input. My solution was to create a "vector" group node in which I have XYZ single value inputs and use a "Combine RGBA" node to combine the XYZ values into one 3D (vector) value output. This works fine, however I want to have this custom node available to any of my blend files without having to always use append to grab this custom node any time i need it.
My question is: Is it possible to make a custom (compositor or material) node that is shared among blend files without explicitly importing that node by appending it from another file? .. perhaps via an add-on script that automatically creates these custom (group) nodes using the python node API?

I wonder if it is possible to create an addon which augments the relevant menu with your new group, creating the group if it is not yet in the menu...

You could customize your start up file.
1. Open your start up file
2. Append the node groups you use a lot, click on the F in the node groups and delete the node groups.
3. Go to your default screen
4. CTRL + U save sart up file.
5. Close your file
6. Open a new file, go to the compositor, SHIFT + A --> group --> your node groups

Yes, this would work only with the NEW blend files I create based on the customized start up file. The issue still remains with the already created blend files if i am editing them and want to add my customized group nodes to it. An add-on that could create (if possible) these custom groups would be desirable in this case.

Yes it is possible, python can create nodes, position them, group them and add links. See example in this answer.
As for your example, you may want to update, the Separate/Combine XYZ nodes were added in 2.72

Cool. I didn't know there is a Combine/Separate XYZ node. However, note that this node is ONLY available in the material editor NOT in the compositor. It would be useful to have this node in compositor as well.

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


text:
Execute custom code once automatically in an add-on
I want to create a very simple add-on that will automatically call some code (e.g. see example below) that will create a custom group node to be available in the compositor. What should the simple add-on look like? Apparently this code cannot be executed in the register() of the add-on due to the following error: AttributeError: '_RestrictData' object has no attribute “node_groups”. So where should such code be automatically be called within the add-on?
def createGroupNodes():
  # create a COMBINE XYZ group
  vector_group = bpy.data.node_groups.new('CombineXYZ', 'CompositorNodeTree')

  # create group INPUTS
  group_inputs = vector_group.nodes.new('NodeGroupInput')
  group_inputs.location = (-300,0)
  vector_group.inputs.new('NodeSocketFloat','X')
  vector_group.inputs.new('NodeSocketFloat','Y')
  vector_group.inputs.new('NodeSocketFloat','Z')

  # create group OUTPUTS
  group_outputs = vector_group.nodes.new('NodeGroupOutput')
  group_outputs.location = (300,0)
  vector_group.outputs.new('NodeSocketVector','Vector')

  # create three math nodes in a group
  node_combine = vector_group.nodes.new('CompositorNodeCombRGBA')
  node_combine.location = (000,0)

  # link inputs
  vector_group.links.new(group_inputs.outputs['X'], node_combine.inputs[0])
  vector_group.links.new(group_inputs.outputs['Y'], node_combine.inputs[1])
  vector_group.links.new(group_inputs.outputs['Z'], node_combine.inputs[2])

  #link output
  vector_group.links.new(node_combine.outputs[0], group_outputs.inputs['Vector'])

related with explanation of _RestrictData error http://blender.stackexchange.com/questions/8702/attributeerror-restrictdata-object-has-no-attribute-filepath/8732#8732

see here the equivalanet app.handler you could use http://blender.stackexchange.com/a/23230/47

related: http://blender.stackexchange.com/questions/5813/is-it-possible-to-execute-an-add-on-when-choosing-new-to-open-the-default-file?rq=1 (possible duplicate)


text:
Can you make a node socket entirely transparent?
I know you can set a node socket's fill color to anything color, but can you also set the stroke color to any color too so that the socket is completely invisible?
The need for this feature is really prompted my need to use a "dummy" sockets to insert spacing between other sockets in a node in order to separate input sockets visually in a group of inputs belonging to a set. (see attachment). My node makes sure this dummy socket cannot be linked to other nodes, but it would be nice if I could make the socket nodule be completely transparent not just the fill. (in the attachment you can see the separator sockets show the outline of the socket nodule).
Note: of course if the node API would allow inserting separators between sockets such feature to make the nodule 100% transparent would not be of use in this case.

You could try to add the separator label to the last socket in each group.


text:
Unlink selection in the UV editor doesn't seem to work in 2.72
I can't seem to get the "unlink selection" functionality in the UV editor to work inside Blender 2.72.
Pressing Alt-L does nothing. I have tried with the "keep selection in sync" -button both on and off. According to the Blender 2.6 manual Alt-L should unlink the selected islands. Has this been changed in Blender 2.72?

if you could post a .blend with an example of the UV's you are trying to unlink that you be great.


text:
Is there a bpy function to convert from blender units to Imperial?
Is there a bpy function to convert from blender units to Imperial? something like:
   >>> blender_to_imperial(2.0)
   ... 6.562'

This functionality is present when showing edge lengths, but I can't seem to find a function that can return the conversion.
I found one in the caliper script by macouno, but am wondering if this isn't something that exists already in bpy.

I don't think imperial merits a tag..

it wasn't an arbitrary tag choice.

ok, you could document it then. I can't imagine any real use of this tag, it will probably be synonymized into a larger one sooner or later, one that will account for all units.

I don't personally use Imperial units, perhaps [tag:dimensions] or [tag:dimensioning] would be better

I was thinking more along the lines of units to cover them all, blender-units, metric etc. dimensions sounds a bit too far off, perhaps a post on meta?

if it starts to crop up a lot definitely a meta post - good point and worth talking about.

I found several internal conversion code in the source, like one in view3d_ruler.c for bpy.ops.view3d.ruler(), or in drawobject.c for measurement stats, none of them with direct Python interface. No reference to it, too, in the API manual.
CMIIW, but I think we'll have to write one. All distributed addons so far, like Measure Panel, also write their own conversion function, and it looks like the aforementioned addon have several function we can use directly:
import space_view3d_panel_measure as pm

uinfo = pm.getUnitsInfo()
print(pm.convertDistance(2, uinfo)) # prints 2.0m, 2.0 BU, or 6.56168'
                                    # depending on selected unit system.

cool, yeah seems like a basic requirement for international 'precision' based modelling tools, and nice to have a solid implementation to call at will.

this method works fine @Adhi, thank you! And using it in the edge sum script: https://gist.github.com/zeffii/3839812

The question is old and now Blender has built-in utilities to convert text input to internal units, for example you can set 2in like this:
bpy.utils.units.to_value("IMPERIAL", "LENGTH", "2in")

Read more: https://docs.blender.org/api/current/bpy.utils.units.html


text:
How do I create a custom-keying set based on a built-in keying set?
While creating actions I noticed that I sometimes forgot to keyframe the IK/FK sliders separately. Therefore I decided to create a custom keying-set. The question is can I copy the setup from say LocRot into my customized keying set or do I have add each location and rotation for all bone layers separately?

Properties can't be added to a built-in keying-set, which isn't necessary. The keying-set Whole Character also includes ik/fk switch (among others).

Note that for walk cycles the keys for the root bone should be removed.
Related:
Coding your own "Builtin Keying Set"


text:
How should a glass material be setup in Cycles?
A glass-shader produces a render like this:

Adding a transparent shader creates

Where does the border labeled as 1 come from? Why is the outer region (2) more translucent than transparent?
Not sure this is a material or lighting issue.
.blend
With out a subsurf modifier it looks terrible:

I tried several values from the IOR range 'Glass': 1.440 - 1.900
Only the upper edges and bottom are beveled.

Bevel, lighting, IOR

use the smooth shading option  if its not enough add subsurf modifier "set to 2 or more" and

@Chebhou thanks for your replies, subsurf is already at 3, switching from flat to smooth doesn't have any visual impact.

try this for the glass :mix shader of refraction and glossy with fresnel node as the factor ,set roughness to Zero and IOR to 1.4->1.6

There are a couple things going on here:

The glass is not entirely white, so a noticeable amount of light is being absorbed. Setting it to white (or almost white) gives a more glassy result:

With a less uniform lighting/environment the glass is more visible:

In this render I adjusted the model to get rid of the subsurf artifacts and thicken the bottom a bit.
There is an air gap between the liquid and the glass. This isn't the way liquid normally sits in a glass in real life, so it might look funny. See Liquid / glass interface IOR and normals in Cycles.
If the interface between the liquid, air, ice, and glass are setup as described, you get a result like this:

the #1 region is caused by the IOR of the Glass that means it is present even in the first render but adding the transparency make it more visible as in the second render you can play with the IOR to see how it effects the shape of that region ; and change the Fac to see were is the transparency applied
note : "the region is darker  because it is the refraction of the liquid inside the glass"


text:
Select a group of vertices by indices in a ply/obj file and delete all the others
I have a mesh stored in ply file (or the obj equivalent). I'd like to do the following operation:

If all the vertices are numbered (like v0,...vn) I'd like to specify a set indices to select those instead of selecting them manually.
Once I select such vertices I'd like to remove all the other ones and keep those.

The idea would be to keep a small square region of the mesh (which essentially is an height map).
Is there a quick way to do such job?
I'm not a blender expert and sometimes the interface is a bit hard to understand.
I'm aware that If I press the B button I can select using a box, but unless I align the camera correctly I always miss some of the points and include others that I don't actually need.
Any suggestion?
As example consider the following grid, and I'd like to crop it from 10x10 (original size) to, say, 4x4.
ply
format ascii 1.0
comment Created by Blender 2.79 (sub 0) - www.blender.org, source file: ''
element vertex 100
property float x
property float y
property float z
property float nx
property float ny
property float nz
element face 81
property list uchar uint vertex_indices
end_header
-10.000000 -10.000000 0.000000 0.000000 0.000000 1.000000
-7.777778 -10.000000 0.000000 0.000000 0.000000 1.000000
-7.777778 -7.777778 0.000000 0.000000 0.000000 1.000000
-10.000000 -7.777778 0.000000 0.000000 0.000000 1.000000
-5.555556 -10.000000 0.000000 0.000000 0.000000 1.000000
-5.555556 -7.777778 0.000000 0.000000 0.000000 1.000000
-3.333333 -10.000000 0.000000 0.000000 0.000000 1.000000
-3.333333 -7.777778 0.000000 0.000000 0.000000 1.000000
-1.111111 -10.000000 0.000000 0.000000 0.000000 1.000000
-1.111111 -7.777778 0.000000 0.000000 0.000000 1.000000
1.111112 -10.000000 0.000000 0.000000 0.000000 1.000000
1.111112 -7.777778 0.000000 0.000000 0.000000 1.000000
3.333334 -10.000000 0.000000 0.000000 0.000000 1.000000
3.333334 -7.777778 0.000000 0.000000 0.000000 1.000000
5.555556 -10.000000 0.000000 0.000000 0.000000 1.000000
5.555556 -7.777778 0.000000 0.000000 0.000000 1.000000
7.777778 -10.000000 0.000000 0.000000 0.000000 1.000000
7.777778 -7.777778 0.000000 0.000000 0.000000 1.000000
10.000000 -10.000000 0.000000 0.000000 0.000000 1.000000
10.000000 -7.777778 0.000000 0.000000 0.000000 1.000000
-7.777778 -5.555556 0.000000 0.000000 0.000000 1.000000
-10.000000 -5.555556 0.000000 0.000000 0.000000 1.000000
-5.555556 -5.555556 0.000000 0.000000 0.000000 1.000000
-3.333333 -5.555556 0.000000 0.000000 0.000000 1.000000
-1.111111 -5.555556 0.000000 0.000000 0.000000 1.000000
1.111112 -5.555556 0.000000 0.000000 0.000000 1.000000
3.333334 -5.555556 0.000000 0.000000 0.000000 1.000000
5.555556 -5.555556 0.000000 0.000000 0.000000 1.000000
7.777778 -5.555556 0.000000 0.000000 0.000000 1.000000
10.000000 -5.555556 0.000000 0.000000 0.000000 1.000000
-7.777778 -3.333333 0.000000 0.000000 0.000000 1.000000
-10.000000 -3.333333 0.000000 0.000000 0.000000 1.000000
-5.555556 -3.333333 0.000000 0.000000 0.000000 1.000000
-3.333333 -3.333333 0.000000 0.000000 0.000000 1.000000
-1.111111 -3.333333 0.000000 0.000000 0.000000 1.000000
1.111112 -3.333333 0.000000 0.000000 0.000000 1.000000
3.333334 -3.333333 0.000000 0.000000 0.000000 1.000000
5.555556 -3.333333 0.000000 0.000000 0.000000 1.000000
7.777778 -3.333333 0.000000 0.000000 0.000000 1.000000
10.000000 -3.333333 0.000000 0.000000 0.000000 1.000000
-7.777778 -1.111111 0.000000 0.000000 0.000000 1.000000
-10.000000 -1.111111 0.000000 0.000000 0.000000 1.000000
-5.555556 -1.111111 0.000000 0.000000 0.000000 1.000000
-3.333333 -1.111111 0.000000 0.000000 0.000000 1.000000
-1.111111 -1.111111 0.000000 0.000000 0.000000 1.000000
1.111112 -1.111111 0.000000 0.000000 0.000000 1.000000
3.333334 -1.111111 0.000000 0.000000 0.000000 1.000000
5.555556 -1.111111 0.000000 0.000000 0.000000 1.000000
7.777778 -1.111111 0.000000 0.000000 0.000000 1.000000
10.000000 -1.111111 0.000000 0.000000 0.000000 1.000000
-7.777778 1.111112 0.000000 0.000000 0.000000 1.000000
-10.000000 1.111112 0.000000 0.000000 0.000000 1.000000
-5.555556 1.111112 0.000000 0.000000 0.000000 1.000000
-3.333333 1.111112 0.000000 0.000000 0.000000 1.000000
-1.111111 1.111112 0.000000 0.000000 0.000000 1.000000
1.111112 1.111112 0.000000 0.000000 0.000000 1.000000
3.333334 1.111112 0.000000 0.000000 0.000000 1.000000
5.555556 1.111112 0.000000 0.000000 0.000000 1.000000
7.777778 1.111112 0.000000 0.000000 0.000000 1.000000
10.000000 1.111112 0.000000 0.000000 0.000000 1.000000
-7.777778 3.333334 0.000000 0.000000 0.000000 1.000000
-10.000000 3.333334 0.000000 0.000000 0.000000 1.000000
-5.555556 3.333334 0.000000 0.000000 0.000000 1.000000
-3.333333 3.333334 0.000000 0.000000 0.000000 1.000000
-1.111111 3.333334 0.000000 0.000000 0.000000 1.000000
1.111112 3.333334 0.000000 0.000000 0.000000 1.000000
3.333334 3.333334 0.000000 0.000000 0.000000 1.000000
5.555556 3.333334 0.000000 0.000000 0.000000 1.000000
7.777778 3.333334 0.000000 0.000000 0.000000 1.000000
10.000000 3.333334 0.000000 0.000000 0.000000 1.000000
-7.777778 5.555556 0.000000 0.000000 0.000000 1.000000
-10.000000 5.555556 0.000000 0.000000 0.000000 1.000000
-5.555556 5.555556 0.000000 0.000000 0.000000 1.000000
-3.333333 5.555556 0.000000 0.000000 0.000000 1.000000
-1.111111 5.555556 0.000000 0.000000 0.000000 1.000000
1.111112 5.555556 0.000000 0.000000 0.000000 1.000000
3.333334 5.555556 0.000000 0.000000 0.000000 1.000000
5.555556 5.555556 0.000000 0.000000 0.000000 1.000000
7.777778 5.555556 0.000000 0.000000 0.000000 1.000000
10.000000 5.555556 0.000000 0.000000 0.000000 1.000000
-7.777778 7.777778 0.000000 0.000000 0.000000 1.000000
-10.000000 7.777778 0.000000 0.000000 0.000000 1.000000
-5.555556 7.777778 0.000000 0.000000 0.000000 1.000000
-3.333333 7.777778 0.000000 0.000000 0.000000 1.000000
-1.111111 7.777778 0.000000 0.000000 0.000000 1.000000
1.111112 7.777778 0.000000 0.000000 0.000000 1.000000
3.333334 7.777778 0.000000 0.000000 0.000000 1.000000
5.555556 7.777778 0.000000 0.000000 0.000000 1.000000
7.777778 7.777778 0.000000 0.000000 0.000000 1.000000
10.000000 7.777778 0.000000 0.000000 0.000000 1.000000
-7.777778 10.000000 0.000000 0.000000 0.000000 1.000000
-10.000000 10.000000 0.000000 0.000000 0.000000 1.000000
-5.555556 10.000000 0.000000 0.000000 0.000000 1.000000
-3.333333 10.000000 0.000000 0.000000 0.000000 1.000000
-1.111111 10.000000 0.000000 0.000000 0.000000 1.000000
1.111112 10.000000 0.000000 0.000000 0.000000 1.000000
3.333334 10.000000 0.000000 0.000000 0.000000 1.000000
5.555556 10.000000 0.000000 0.000000 0.000000 1.000000
7.777778 10.000000 0.000000 0.000000 0.000000 1.000000
10.000000 10.000000 0.000000 0.000000 0.000000 1.000000
4 0 1 2 3
4 1 4 5 2
4 4 6 7 5
4 6 8 9 7
4 8 10 11 9
4 10 12 13 11
4 12 14 15 13
4 14 16 17 15
4 16 18 19 17
4 3 2 20 21
4 2 5 22 20
4 5 7 23 22
4 7 9 24 23
4 9 11 25 24
4 11 13 26 25
4 13 15 27 26
4 15 17 28 27
4 17 19 29 28
4 21 20 30 31
4 20 22 32 30
4 22 23 33 32
4 23 24 34 33
4 24 25 35 34
4 25 26 36 35
4 26 27 37 36
4 27 28 38 37
4 28 29 39 38
4 31 30 40 41
4 30 32 42 40
4 32 33 43 42
4 33 34 44 43
4 34 35 45 44
4 35 36 46 45
4 36 37 47 46
4 37 38 48 47
4 38 39 49 48
4 41 40 50 51
4 40 42 52 50
4 42 43 53 52
4 43 44 54 53
4 44 45 55 54
4 45 46 56 55
4 46 47 57 56
4 47 48 58 57
4 48 49 59 58
4 51 50 60 61
4 50 52 62 60
4 52 53 63 62
4 53 54 64 63
4 54 55 65 64
4 55 56 66 65
4 56 57 67 66
4 57 58 68 67
4 58 59 69 68
4 61 60 70 71
4 60 62 72 70
4 62 63 73 72
4 63 64 74 73
4 64 65 75 74
4 65 66 76 75
4 66 67 77 76
4 67 68 78 77
4 68 69 79 78
4 71 70 80 81
4 70 72 82 80
4 72 73 83 82
4 73 74 84 83
4 74 75 85 84
4 75 76 86 85
4 76 77 87 86
4 77 78 88 87
4 78 79 89 88
4 81 80 90 91
4 80 82 92 90
4 82 83 93 92
4 83 84 94 93
4 84 85 95 94
4 85 86 96 95
4 86 87 97 96
4 87 88 98 97
4 88 89 99 98

You may consider writing a short python script in blender for that

That's not a bad idea...

What is the alignment of the mesh?.  Sounds like you can simply select verts to delete if they are outside a range.   Eg if x coordinate of vert is outside range [A, B]  and similarly for y in [C, D]... vert.select =  not((A <= vert.co.x <= B) and (C <= vert.co.y <= D))

@batFINGER Topology wise they're sorted in scanline order already. From the top it's clearly visible.

Please consider adding more info and maybe a small sample file, image etc to question.

@batFINGER I've added a file, I don't what more info you want me to add. If you tell me what's unclear maybe I can sort it out.

Added answer, think using a cuboid to limit to desired size will suffice.

The Boolean Modifier
Suggest using the boolean modifier.
An intersection boolean modifier would be ideal for this.

The image shows a 20 x 20 grid (imagine that is your surface from STL)  which limited in size to be within the cube displayed as only its bounding box.
Size and move the cube to suit the desired part of grid to keep.
Applying the modifier will have the effect of removing the unwanted part.


text:
Python script not working beyond a certain line in the code
I am pretty new to coding in blender, just two days since I started.
I am trying to create a code that will align the local axis of an object to the local axis of another without changing its mesh alignment. So to do this I align the object in Object Mode and then go to edit mode to invert the changes.
I created a basic code but it seems to not work after a certain line.
import bpy
from mathutils import Matrix
from math import pi

class OrientLocalAxis(bpy.types.Panel):
    """Orients Local Axis to another Object without changing current
Structual view"""
    bl_label = "Orient Local Axis to object"
    bl_idname = "OBJECT_PT_OLAxis"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        scene = context.scene
        obj = context.object

        row = layout.row()
        row.label(text="Active object is: " + obj.name)
        layout.prop_search(scene, "Epty", scene, "objects")

        row = layout.row()
        row.operator("object.align_local_axis")

def main(context):

    #-------------Obj = Object we want to change----------------------------
    #------------TObj = Target Object we want to Align to-------------------

    scene = bpy.context.scene
    TObj = scene.objects[scene.Epty]

    TObjIRE = TObj.rotation_euler
    TObjIRM = TObjIRE.to_matrix()

    ObjIRE = bpy.context.active_object.rotation_euler
    ObjPos = bpy.context.active_object.location
    # We will need this later for rotating the mesh
    ObjIRM = ObjIRE.to_matrix()

    #We Find out the Rotation Matrix to transform TObj to Obj---------------
    # We will use this transform the mesh back to its original orientation--

    ITM = ObjIRM  #ITM is for Inverse Transformation Matrix

    # We set the orientation of the Object to the target

    bpy.context.active_object.rotation_euler = TObjIRE

    #Now we go to Edit Mode and select all Vertices

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

Doesn't seem to do anything after this point
    mesh = bmesh.from_edit_mesh(bpy.context.active_object.data)

    for v in mesh.verts: # Not sure if selection is needed Check Later
        v.select = True

    bpy.context.scene.objects.active = bpy.context.scene.objects.active

    bmesh.ops.rotate(mesh, cent=(0,1,0), matrix=TOBjIRM, verts=mesh.verts)

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

# Operator Definition

class AlignLocalAxis(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.align_local_axis"
    bl_label = "Align Local Axis"

def execute(self, context):
    main(context)
    return {'FINISHED'}

 #--------------------------------------------------------------------------
def register():
    bpy.utils.register_class(AlignLocalAxis)
    bpy.utils.register_module(__name__)
    bpy.types.Scene.Epty = bpy.props.StringProperty()

def unregister():
    bpy.utils.unregister_class(AlignLocalAxis)
    bpy.utils.unregister_module(__name__)
    del bpy.types.Object.Epty

if __name__ == "__main__":
    register()

So the code doesn't run after it goes to edit mode, essentially from the for loop on wards. It doesn't select all the vertices or rotate them.
I copied the code from the 'for loop' on wards till  'Object mode' and ran it as a separate code and it works just fine.
ps: I am not concerned about whether the code will serve my purpose or not, I would prefer fixing it myself. Thank you.

You may want to run blender from console in order to get the stack trace in case of errors.

I think the problem was actually me missing to add bmesh, Its weired because it did not show any errors. Even now when I remove bmesh it shows no errors.

I have copy-pasted the code in blender and with few changes, same variable wrong names like TObjIRM and TOBjIRM for the same var, include import bmesh at beginning,... the code works now without errors.
This is what you want? ;)
import bpy, bmesh
from mathutils import Matrix
from math import pi

class OrientLocalAxis(bpy.types.Panel):
    """Orients Local Axis to another Object without changing current
Structual view"""
    bl_label = "Orient Local Axis to object"
    bl_idname = "OBJECT_PT_OLAxis"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        scene = context.scene
        obj = context.object

        row = layout.row()
        row.label(text="Active object is: " + obj.name)
        layout.prop_search(scene, "Epty", scene, "objects")

        row = layout.row()
        row.operator("object.align_local_axis")

def main(context):

    #-------------Obj = Object we want to change----------------------------
    #------------TObj = Target Object we want to Align to-------------------

    scene = bpy.context.scene
    TObj = scene.objects[scene.Epty]

    TObjIRE = TObj.rotation_euler
    TObjIRM = TObjIRE.to_matrix()

    ObjIRE = bpy.context.active_object.rotation_euler
    ObjPos = bpy.context.active_object.location
    # We will need this later for rotating the mesh
    ObjIRM = ObjIRE.to_matrix()

    #We Find out the Rotation Matrix to transform TObj to Obj---------------
    # We will use this transform the mesh back to its original orientation--

    ITM = ObjIRM  #ITM is for Inverse Transformation Matrix

    # We set the orientation of the Object to the target

    bpy.context.active_object.rotation_euler = TObjIRE

    #Now we go to Edit Mode and select all Vertices

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

    mesh = bmesh.from_edit_mesh(bpy.context.active_object.data)

    for v in mesh.verts: # Not sure if selection is needed Check Later
        v.select = True

    bpy.context.scene.objects.active = bpy.context.scene.objects.active

    bmesh.ops.rotate(mesh, cent=(0,1,0), matrix=TObjIRM, verts=mesh.verts)

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

# Operator Definition

class AlignLocalAxis(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.align_local_axis"
    bl_label = "Align Local Axis"

    def execute(self, context):
        main(context)
        return {'FINISHED'}

 #--------------------------------------------------------------------------
def register():
    bpy.utils.register_class(AlignLocalAxis)
    bpy.utils.register_module(__name__)
    bpy.types.Scene.Epty = bpy.props.StringProperty()

if __name__ == "__main__":
    register()

Actually It was the bmesh, the variable mistake was added when I tried to debug.


text:
In wireframe mode, Is there a way to show edges at the back and not only whats directly in front?
If I go to wireframe mode, I only see whats directly in front of me and not the edges at the back or the ones of the objects inside unlike in edit mode. Is there a way to show them or do I just use edit mode?

If you want to see through your object just turn on x-ray mode. with option+z or alt+z

On the left of the Wireframe Shading button you have an X-Ray button.

...or turn it off. It toggles, and is independent of the wireframe mode.


text:
My object is not transparent even when screen space refractions are turned on
I'm following a "glitch" effect tutorial (blender 2.91, rendering in EEVEE - not sure which version he's using although it has to be close and he's also in eevee)

This image is at the point where he has the text with the emission, and it's behind an edited icosphere (subdivided in editing, then back to object mode and scaled a bit).
Then he moves to add a new material in the lefthand panel. Adds new material, puts the roughness at 0, transmission at 1, turns on screen space refractions and gets this.

But my icosphere is still not transparent

What am i doing wrong?

In your material settings, scroll down to "Blend Mode" and choose anything other than Opaque.


text:
How to place match the floor of a picture with a plane using f-spy?
I have this 3D ground and "image as plane" photo with fSpy camera, but it's look wrong on the legs, is there a way to make legs to touch the ground like in original photo? not sure in which direction to search

UPDATE:
I mean, I believe is right with fSpy, cause all geometry lines up in camera view, I guess I'm doing something wrong or impossible with "image as plane", wrong rotation or something?

Are you sure you correctly used fSpy? The point of view of the two images look different. You have to adjust the camera.

Incorrect perspective reconstruction
Your reconstructed camera in the blendfile has different orientation from the one used in the source image. Just look at the angle between the floor ad the camera's horizon: yours is totally parallel.
The narrow focal lenght of the camera is not helping either in hiding the little differences.
Here's my reconstruction in fSpy:

And here the reconstruction of the scene.

Hi, thanks for answer, I updated the question with new info, maybe you can provide some help with it as well, thanks

Oh, I talked with Ian Hubert on twitter (fantastic guy, isn't he?), and he explained me a lot, I will mark your answer as the best one, thanks!

Yep, he's fantastic. Your reconstruction looks ok indeed, but why the first picture you posted look so different from the ones with the blue floor? Are you animating the camera? Also I didn't mention, but you surely have to set up a dummy mesh to produce the correct shadow on the plane, or it will look bi dimensional in any case.

not really, I just try to place it to try to hide this effect, I think this is why it looked as from wrong perspective?
yes, I will do that, for now just overcast a lot and add distance to hide the shadow at all, so it's not really visible.