How to decimate hi-poly STLs in Blender

Описание к видео How to decimate hi-poly STLs in Blender

Ever downloaded a set of STLs and been shocked to find a .zip that's several gigs in size? This tutorial shows how I decimate hi-poly meshes in Blender.

I'm not saying this is the best approach, it's just what I do as a Blender user for whom that programme is the most comfortable. There may be better methods with the likes of Meshmixer.

Please don't ask me to share the STLs or the creator, I'd sooner not throw them under the bus with the likes of you-know-who.

0:00 - Introductory Waffle
0:38 - Comparing decimated & non-decimated heads
1:18 - Decimating an object
4:10 - Re-exporting the STL
4:39 - Copying modifiers (faster)
5:10 - Using a script to decimate everything
6:54 - Re-exporting all the heads
8:05 -Bye bye

The decimation script (copy and paste this):

import bpy

def decimate_and_apply(obj):
"""Applies two decimate modifiers to the given object and converts it to a mesh."""
Ensure the object is selected and active
bpy.context.view_layer.objects.active = obj
obj.select_set(True)

Add the first Decimate modifier (Collapse mode)
collapse_modifier = obj.modifiers.new(name="Decimate_Collapse", type='DECIMATE')
collapse_modifier.decimate_type = 'COLLAPSE'
collapse_modifier.ratio = 0.1

Add the second Decimate modifier (Planar mode)
planar_modifier = obj.modifiers.new(name="Decimate_Planar", type='DECIMATE')
planar_modifier.decimate_type = 'DISSOLVE'
planar_modifier.angle_limit = 1 * (3.14159265 / 180) # Convert degrees to radians

Apply both modifiers by converting the object to a mesh
bpy.ops.object.convert(target='MESH')

Run the script on all selected objects
selected_objects = bpy.context.selected_objects

for obj in selected_objects:
if obj.type == 'MESH':
decimate_and_apply(obj)

print("Decimation complete.")

Комментарии

Информация по комментариям в разработке