国内公司为什么很少用blender?
因为国内绝大多数人无法正常使用ChatGPT。
别笑,但凡用过blender的,都应该知道它可以直接用python脚本来直接创建模型和动画。
那么问题来了,懂设计里面python脚本写的最好的是谁?ChatGPT!懂python里面最了解设计的是谁?ChatGPT!
只需要把你的需求描述给ChatGPT,比如说你想画一枝箭穿过一颗心,ChatGPT就可以给你自动生成blender的python脚本,你复制粘贴到里面,模型就出来了。当然不太可能一次成功,但你仍然可以把问题说给ChatGPT来进行更新啊。
这个工作效率,针对别的同类软件,简直是碾压级别的。
补一张chatgpt写的代码画的图
import bpy
import math
# Define the number of vertices and the size of the heart
num_vertices = 100
size = 0.05
# Calculate the vertices of the heart shape
vertices = []
for i in range(num_vertices):
t = math.pi * 2 * i / num_vertices
x = size * (16 * math.sin(t)**3)
y = size * (13 * math.cos(t) - 5 * math.cos(2*t) - 2 * math.cos(3*t) - math.cos(4*t))
vertices.append((x, y, 0))
# Define the faces of the heart shape
faces = [(i, (i+1) % num_vertices, num_vertices) for i in range(num_vertices)]
# Add a point at the center of the heart
vertices.append((0, 0, 0))
# Create a new mesh and a new object
mesh = bpy.data.meshes.new(name="HeartMesh")
obj = bpy.data.objects.new(name="HeartObject", object_data=mesh)
# Link the object to the current collection
bpy.context.collection.objects.link(obj)
# Set the object to be the active object
bpy.context.view_layer.objects.active = obj
obj.select_set(True)
# Create the mesh from the vertices and faces
mesh.from_pydata(vertices, [], faces)
mesh.update()
# Switch to edit mode
bpy.ops.object.mode_set(mode='EDIT')
# Select all
bpy.ops.mesh.select_all(action='SELECT')
# Extrude along the z-axis to give some height to the heart
bpy.ops.mesh.extrude_region_move(
TRANSFORM_OT_translate={"value": (0, 0, 0.2)}
)
# Switch back to object mode
bpy.ops.object.mode_set(mode='OBJECT')
# Create an arrow
bpy.ops.mesh.primitive_cone_add(vertices=12, radius1=0.1, depth=4, location=(0, 0, 0.5))
arrow_shaft = bpy.context.object
bpy.ops.mesh.primitive_cone_add(vertices=12, radius1=0.2, depth=0.8, location=(0, 0, 2.4))
arrow_head = bpy.context.object
# Combine the parts of the arrow into one object
bpy.ops.object.select_all(action='DESELECT')
arrow_shaft.select_set(True)
arrow_head.select_set(True)
bpy.context.view_layer.objects.active = arrow_shaft
bpy.ops.object.join()
# Position the arrow at the heart's center
arrow_shaft.location = (0, 0, 0)
# Rotate the arrow
arrow_shaft.rotation_euler = (math.pi/1.5, math.pi/4, -math.pi/6)
# Scale the arrow to fit the heart
arrow_shaft.scale = (0.5, 0.5, 0.5)