[Add-On] - Randomize Vert Location.

This addon randomize the location of selected vertices.
You can mix it with a vertex group weight.

Blog: http://oscurart.blogspot.com.ar/

Download: http://oscurart.com/sc/Oscurart_random_vertices.zip

Aww, thank you for this)
I was trying to get it from blogsbot, but with no succes.
Itā€™s very useful to me rigth now =)

Hi 1D
The version for download here is the last version!
Enjoy it!!!

Greetings

I wish this were still alive :confused:

rand vert location is really usefull and i hardly need it ā€¦

I guess iā€™ll have to write my own script :frowning:
Or maybe thereā€™s another addon that does it ? :smiley: if anybody knowsā€¦

Thanks and happy blending ! :slight_smile:

EDIT: Sorry for the necro :confused:

EDIT2: Finally i found one randomize verts :smiley: in the ā€œedit mesh toolsā€ addon :smiley: I just have to modify it a bit so that the randomize axis can be choosen :wink:

For playing a bit with it and/or non-destructive-workflow you also can also use a Displace modifierā€¦ with a Cloud textureā€¦ for axis or normalsā€¦ and even for Vertex Groupsā€¦

:wink:

1 Like

Hi @Okidoki for sure :smiley: but i wanted simpler and better controllable method as i dont want to randomize a big bunch of verts but only some few :slight_smile:

So here we are : I had to modify the python a bit so that it allows to make zero randomization on choosen axis:

random_vertices.py



def MyRandRange(mini,maxi,nothing)->float:
    valeur = random.random()*(maxi-mini)+mini
    return(valeur)



def add_object(self, context, valmin, valmax, factor, vgfilter):
    # select an option with weight map or not
    mode = bpy.context.active_object.mode
    # generate variables
    objact = bpy.context.active_object
    listver = []
    warn_message = False

    # switch to edit mode
    bpy.ops.object.mode_set(mode='OBJECT')
    bpy.ops.object.mode_set(mode='EDIT')

    # bmesh object
    odata = bmesh.from_edit_mesh(objact.data)
    odata.select_flush(False)

    # if the vertex is selected add to the list
    for vertice in odata.verts[:]:
        if vertice.select:
            listver.append(vertice.index)

    # If the minimum value is greater than the maximum,
    # it adds a value to the maximum
    if valmin[0] >= valmax[0]:
        valmax[0] = valmin[0]

    if valmin[1] >= valmax[1]:
        valmax[1] = valmin[1]

    if valmin[2] >= valmax[2]:
        valmax[2] = valmin[2]

    odata.verts.ensure_lookup_table()

    random_factor = factor
    for vertice in listver:
        odata.verts.ensure_lookup_table()
        if odata.verts[vertice].select:
            if vgfilter is True:
                has_group = getattr(objact.data.vertices[vertice], "groups", None)
                vertex_group = has_group[0] if has_group else None
                vertexweight = getattr(vertex_group, "weight", None)
                if vertexweight:
                    random_factor = factor * vertexweight
                else:
                    random_factor = factor
                    warn_message = True

            v0 = MyRandRange(valmin[0], valmax[0], 1)
            v1 = MyRandRange(valmin[1], valmax[1], 1)
            v2 = MyRandRange(valmin[2], valmax[2], 1)

            odata.verts[vertice].co = (
                (((v0) * random_factor) / 1000) +
                odata.verts[vertice].co[0],
                (((v1) * random_factor) / 1000) +
                odata.verts[vertice].co[1],
                (((v2) * random_factor) / 1000) +
                odata.verts[vertice].co[2]
                )


..... etc....

Happy blending :smiley:

EDIT: just a pic of the resultā€¦ Itā€™s exactly what i need :smiley:

1 Like

Ahhā€¦a castle aging addonā€¦ :wink:

1 Like

LOL ! :smiley:
I dream of a button called ā€˜ruin my buildingā€™ :rofl:

Happy blending @Okidoki :slight_smile: