I am trying to setup an automated pipeline for importing assets, auto generating LODs, and applying specific settings.
I've followed a few of the tutorials for creating LODs, but there doesn't seem to be any information on simplifying the vertex mesh. I only seem to be creating duplicates of LOD 0.
This is the code I have so far:
import unreal_engine as ue
from unreal_engine.classes import SkeletalMesh
original_mesh = ue.get_selected_assets()[0]
if not original_mesh.is_a(SkeletalMesh):
raise DialogException('the script only works with Skeletal Meshes')
# get original vertex data
vertices = original_mesh.skeletal_mesh_get_lod()
# inform UE4 that this SkeletalMesh has vertex colors
original_mesh.bHasVertexColors = True
original_mesh.bHasBeenSimplified = True
# LOD 1
original_mesh.skeletal_mesh_build_lod(vertices, 1)
# LOD 2
original_mesh.skeletal_mesh_build_lod(vertices, 2)
# LOD 3
original_mesh.skeletal_mesh_build_lod(vertices, 3)
# LOD 4
original_mesh.skeletal_mesh_build_lod(vertices, 4)
original_mesh.save_package()
#ue.open_editor_for_asset(original_mesh)
I'm sure that there is some sort of settings function that i need to fill in and apply to this mesh, but I'm at a bit of a loss. Any help would be appreciated, thanks!
This is pretty much the functionality I'm looking for.
I have found ways to set some of the data, but I am still unable to simplify the skeletal mesh when lodding. Has this simply not been added to the API yet?
I am trying to setup an automated pipeline for importing assets, auto generating LODs, and applying specific settings. I've followed a few of the tutorials for creating LODs, but there doesn't seem to be any information on simplifying the vertex mesh. I only seem to be creating duplicates of LOD 0.
This is the code I have so far:
I'm sure that there is some sort of settings function that i need to fill in and apply to this mesh, but I'm at a bit of a loss. Any help would be appreciated, thanks!