Screen Shot 2016-04-27 at 09.56.08

Script example


Use this first script to generate the random base mesh and spark your imagination! Blender3d builds the scene using the Metaballs objects and therefore you can export them to zBrush using the OBJ file format.

How to use:

Download the script here. Switch Blender3d to scripting UI. Open the downloaded script in the Blender’s scripting window and hit “RUN SCRIPT” button. And now just watch the camera window.

Please make sure that you use the most recent release of Blender. This script was developed and tested on Blender 2.77 MAC El Captain 64bit. Functionality should be not influenced by used platform. (WIN, MAC, LINUX ... all should be green)

Don’t forget to share your results using the Facebook comments section at the bottom bellow!






# SCRIPT EXAMPLE STARTS HERE
# Note: Browser may remove formatting such as intents. Use only as reference


# form bombing
# styleon collider
# blobber 01

import random
import bpy
import sys
import os

scene = bpy.context.scene

# add metaball object
mball = bpy.data.metaballs.new("Oom")
obj = bpy.data.objects.new("OomGroup", mball)
scene.objects.link(obj)

# list of styleon types
styleon_types = ["BALL", "CAPSULE", "PLANE", "ELLIPSOID", "CUBE"]

# collider quality
mball.resolution = 0.16 # View resolution


for x in range(0, 44):

bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)

# engine
locx = random.randrange(0, 14)
locy = random.randrange(0, 14)
locz = random.randrange(0, 14)

sclx = random.randrange(1, 7)
scly = random.randrange(1, 7)
sclz = random.randrange(1, 7)

styleon_radius = random.randrange(1, 2)
# styleon_radius = 1

styleontype = random.randrange(1, 5)

# blobostructure
ele = mball.elements.new()
ele.type = styleon_types[styleontype]

# location
ele.co = ( locx, locy, locz)

# size
ele.size_x = sclx
ele.size_y = scly
ele.size_z = sclz

# styleon field radius
ele.radius = styleon_radius

# dark styleon toggle
dark_styleon_treshold = random.randrange(0, 2)
if dark_styleon_treshold < 1:
ele.use_negative = True
elif dark_styleon_treshold >= 1:
ele.use_negative = False

# blobostructure symmetric space
ele = mball.elements.new()
ele.type = styleon_types[styleontype]

# location
ele.co = ( -locx, locy, locz)

# size
ele.size_x = sclx
ele.size_y = scly
ele.size_z = sclz

# styleon field radius
ele.radius = styleon_radius

# dark styleon toggle
dark_styleon_treshold = random.randrange(0, 2)
if dark_styleon_treshold < 1:
ele.use_negative = True
elif dark_styleon_treshold >= 1:
ele.use_negative = False


# SCRIPT END

Overpaint examples


01a.1260untitled.1258 kopie