Hi aprendendo.next,
Thanks! Actually, I’ve been experimenting with the Blender bpy method of a Lego Build example by asking GPT to write Python code to generate LEGO part-building scripts. And the demo is pre sure from manipulating the bny API rather then directly generate 3d model blueprints. I am comparing the “GPT + Codex Python code + Blender bpy API and render methods” with the “GPT Models Directly Infer 3D parts blueprint + Direct Render in Viewer” methods, and want to find out is it the real spatial intelligence?
I can say that GPT 6 model are capable of writing good enough code to generate very complicated 3D structures by bpy python APIs. However, directly generating a blueprint file and inferring the precise centroids and positions of individual parts as output of the LLM is still quite hard for models to complete and challenging.
Method 1 or 2: ChatGPT/Codex + Python Code + Blender Python API
Prompt: Generate 3D Premium white and blue double-deck yacht Lego Builds with studs parts inventory. Write Python Code to Call Blender Bny
Write a python code generate_lego.py and output glb file.
## some demo generation code of contour, location of the parts
def create_cube(name,location,dimensions,material,bevel=0.025):
bpy.ops.mesh.primitive_cube_add(
location=location
)
obj = bpy.context.object
obj.name = name
obj.dimensions = dimensions
bpy.ops.object.transform_apply(
location=False,
rotation=False,
scale=True
)
if bevel > 0:
modifier = obj.modifiers.new(
"LEGO Soft Edges",
"BEVEL"
)
modifier.width = bevel
modifier.segments = 2
obj.data.materials.append(material)
return obj
Method 3 or 4: GPT Models Directly Infer 3D parts blueprint + Direct Render File
Prompt: Generate 3D Premium white and blue double-deck yacht Lego Builds with parts inventory. Generate Parts Inventory Description that works Craftsman Agent Lego Builds APIs Outputs Blueprint with
color size and centroid position (x,y,z) formats
[{"color":"bright_blue","size":[1,1,1],"position":[4,0,0]},{"color":"bright_blue","size":[1,1,1],"position":[4,1,0]},{"color":"bright_blue","size":[1,1,1],"position":[4,2,0]},{"color":"bright_blue","size":[1,1,1],"position":[3,3,0]},{"color":"bright_blue","size":[1,1,1],"position":[4,3,0]},{"color":"bright_blue","size":[1,1,1],"position":[5,3,0]}
....
]
3D Model OBJ Viewer of Craftsman Agent of the Lego Blueprints : Lego Luxury Yacht Assembly Pack | Lego | Craftsman Agent
Final 3D Models Preview Image
So even for GPT-6, building complex things still needs to manipulate of Blender APIs rather than direct generation of the 3d blueprints.