October 15, 2018, 12:26pm
I wanted to write a greeble script, but I had to settle for something I could finish in like 3 hours. I’ve always wanted a displace option that takes into account the mesh density. This script displaces each vert individually as a percentage of its shortest connected edge. There are 2 parameters, displace strength along the normal, and displace globally in x,y,z. Currently it it still possible for the script to return overlapping geometry on thin geometry, like suzanne’s ear, as the script does not check for verts nearby in 3-d space but far away in edges. The script creates a duplicate object of the active object and will not alter the original object.
# MIT license
# 2018, Photox
import bpy, bmesh
displace_strength_along_normal = .8 # Best if in 0.0 to 1.0 range) > 1.0 may give you overlapping geometry
displace_strength_global = .4
def get_shortest_connected_edge_length(my_vert, my_bm):
shortest = 1000000.0
for e in my_bm.edges:
if my_vert in e.verts:
if e.calc_length() < shortest:
shortest = e.calc_length()
bm = bmesh.new()
ob = bpy.context.object
new_name = ob.name + '_smart_displaced'
matrix_world = ob.matrix_world
for v in bm.verts:
shortest_connected_edge_length = get_shortest_connected_edge_length(v, bm)
random_displace_maxima_normal = shortest_connected_edge_length * displace_strength_along_normal
random_displace_maxima_global = shortest_connected_edge_length * displace_strength_global
r_normal = random.uniform(-1.0 * random_displace_maxima_normal, random_displace_maxima_normal)
r_global = random.uniform(-1.0 * random_displace_maxima_global, random_displace_maxima_global)
v.co += r_normal * v.normal
v.co += v.co * r_global
for v in bm.verts:
#v.co += v.co * r_global
v.co = matrix_world * v.co # re-apply the object mode loc,rot, and scale.
mesh_smart_displace = bpy.data.meshes.new(new_name)
o = bpy.data.objects.new(new_name, mesh_smart_displace)
bpy.context.scene.objects.link( o )
Abstract art follows a narrow line between art and chaos.
Nice entry beau11, do you happen to still have your presculpt wip image from over the weekend?
I remember it being very cool as well!
October 15, 2018, 2:35pm
Do you mean my first iteration of the project? If so I do have it.
NOT AN ENTRY
Yep, exactly. Thank you for posting it.
I love this version too!
I really enjoyed the contrast in this image, the paint strokes on the right side, they really appear like oil on canvas, did you make those in blender?
October 15, 2018, 4:50pm
Non-competing. Cycles, 5 samples.
October 15, 2018, 4:58pm
I didn’t make those in blender. It’s a background image, but I made it a much smaller part of the scene in my later iterations in order for me to keep it Pure-ish
October 15, 2018, 5:46pm
Ok, so I finished my entry and the script. If anyone is curious, I released the script and wrote a bit about it
Your new image is amazing.
Got it. Makes sense.
Its a very cool image!
October 15, 2018, 6:21pm
Haha thank you
I haven’t touched on the abstract side of art for a minute so it’s refreshing.
October 15, 2018, 7:18pm
"Flee the Chaos"
Pure, Competing, Cycles 128 Samples, Denoising
I was short of time again this week, so here is a quick, ~1 hour for model/texture, just for fun. I like how it turned out.
October 15, 2018, 7:33pm
@Photox I just quickly looked through your script, and I was wondering if you could assign
o.matrix_world = ob.matrix_world
instead of applying the matrix to the vertices.
The effect looks interesting, by the way. Like clay or something.
October 15, 2018, 7:49pm
Oh that is much better! Otherwise the orientations are basically applied. Version 1.1 IS born!
Same, it looks really good !
October 15, 2018, 8:23pm
This is a great idea for this theme, although I can´t find any “Mugo” in there, but I take your word for it. ^^ … It might be easier to find if one would know what to look for?
October 15, 2018, 10:04pm
Super pretty image! But I have no idea what you are talking about haha, Ive done some modifier based procedural modeling but this is another level. Any links you could provide to read up on this kind of stuff? sounds super interesting!!
@DM9 Thanks for the feedback - good point about Mugo. I updated the image, does it help much?
Title: organized chaos ? .
Not competing (ofcourse)