Pipeline: generate material from baked bpr textures

This commit is contained in:
brothermechanic 2023-10-28 20:15:45 +03:00
parent a1a961e7a7
commit 6538f70d54
No known key found for this signature in database
GPG key ID: BFB3FB14288FAC5E
2 changed files with 122 additions and 0 deletions

View file

@ -24,6 +24,7 @@ from blender.processing.lowpoly_setup import parts_to_shells
from blender.processing.uv_setup import uv_unwrap
from blender.texturing.bake_submitter import bw_submit
from blender.texturing.composing import compose_baked_textures
from blender.texturing.shading import assign_pbr_material
from blender.export.dae import export_dae
from blender.export.stl import export_stl
import bpy
@ -132,6 +133,7 @@ def cg_pipeline(**kwargs):
bpy.ops.wm.open_mainfile(filepath=blend_path)
textures_path = bw_submit(lowpoly_obj_names)
compose_baked_textures(textures_path)
assign_pbr_material(lowpoly_obj_names, textures_path)
# export object meshes and urdf
to_urdf = collections.defaultdict(list)