3D Workspace
Home
Assets
Affiliate Program
Creator Program
Sign up/Log in
View Plans
DCC Bridge
Anonymous1758726427
10-21 02:43
Model Name
head and neck 3d model
Tags
character
character realistic
character rendering
character rendering realistic
head and neck bust
head shaped
headframe
neckpiece
realistic
rendering
rendering realistic
smooth white
Prompt
import bpy import bmesh import mathutils # 清理场景 bpy.ops.object.select_all(action='SELECT') bpy.ops.object.delete(use_global=False) def create_human_head(): # 创建头部基础球体 bpy.ops.mesh.primitive_uv_sphere_add(radius=1, location=(0, 0, 1.7)) head = bpy.context.active_object head.name = "Head" # 进入编辑模式调整头部形状 bpy.ops.object.mode_set(mode='EDIT') bm = bmesh.from_edit_mesh(head.data) # 拉伸下巴区域 for vert in bm.verts: if vert.co.z < 0 and vert.co.y > 0: vert.co.z -= 0.3 # 下拉形成下巴 if vert.co.z > 0.5 and vert.co.y < -0.5: vert.co.x *= 0.8 # 收窄后脑 bmesh.update_edit_mesh(head.data) bpy.ops.object.mode_set(mode='OBJECT') # 添加细分表面修改器 head.modifiers.new(name="Subdivision", type='SUBSURF') head.modifiers["Subdivision"].levels = 2 return head def create_neck(): # 创建脖子圆柱体 bpy.ops.mesh.primitive_cylinder_add( vertices=8, radius=0.3, depth=0.8, location=(0, 0, 0.8) ) neck = bpy.context.active_object neck.name = "Neck" # 调整脖子形状 - 上细下粗 bpy.ops.object.mode_set(mode='EDIT') bpy.ops.mesh.select_all(action='SELECT') bpy.ops.transform.resize(value=(1, 1, 1.2)) # 选择顶部顶点并缩小 bpy.ops.mesh.select_all(action='DESELECT') bpy.ops.object.mode_set(mode='OBJECT') return neck def connect_head_neck(head, neck): # 选择头部和脖子 bpy.ops.object.select_all(action='DESELECT') head.select_set(True) neck.select_set(True) bpy.context.view_layer.objects.active = head # 使用布尔运算连接 bool_mod = head.modifiers.new(name="Boolean_Neck", type='BOOLEAN') bool_mod.operation = 'UNION' bool_mod.object = neck # 应用修改器获得单一网格 bpy.ops.object.select_all(action='DESELECT') head.select_set(True) bpy.context.view_layer.objects.active = head # 复制对象并应用修改器 bpy.ops.object.duplicate() combined = bpy.context.active_object combined.name = "Head_Neck_Combined" bpy.ops.object.modifier_apply(modifier="Boolean_Neck") return combined # 执行建模 head = create_human_head() neck = create_neck() final_model = connect_head_neck(head, neck) # 设置平滑着色 bpy.ops.object.shade_smooth() print("人头和脖子白模创建完成!")
Detailed Info
Related Models
Enter invite code
Enter invite code to get credits!