diff --git a/Data/resources/models/fumo.txt b/Data/resources/models/fumo.txt index b2c59af..169c0ff 100644 --- a/Data/resources/models/fumo.txt +++ b/Data/resources/models/fumo.txt @@ -1 +1,4 @@ fumo/reimu_fumo.obj +0/-0.5/0 +90/0/0 +0.1/0.1/0.1 diff --git a/Data/resources/models/fumo/reimu_fumo.mtl b/Data/resources/models/fumo/reimu_fumo.mtl new file mode 100644 index 0000000..f8d91f9 --- /dev/null +++ b/Data/resources/models/fumo/reimu_fumo.mtl @@ -0,0 +1,10 @@ +newmtl reimu +Ns 0.000000 +Ka 1.000000 1.000000 1.000000 +Kd 0.800000 0.800000 0.800000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.450000 +d 1.000000 +illum 2 +map_Kd reimu.png diff --git a/Data/resources/models/fumo/reimu_fumo.obj b/Data/resources/models/fumo/reimu_fumo.obj index 68b0719..5b9a4f1 100644 --- a/Data/resources/models/fumo/reimu_fumo.obj +++ b/Data/resources/models/fumo/reimu_fumo.obj @@ -4,10 +4,10 @@ # Engine version v1.0.3.4987 # 5044 vertices, 9999 faces # -mtllib reimu_low.mtl +mtllib reimu_fumo.mtl g default -usemtl reimu_low_Material +usemtl reimu v -1.5952618122100830e+000 3.0455412864685059e+000 2.7793842315673828e+001 0.611765 0.094118 0.117647 v -8.1648931503295898e+000 1.3741362094879150e+000 2.3164319992065430e+001 0.458824 0.231373 0.188235 v -2.0829384326934814e+000 1.0307786464691162e+000 2.7772064208984375e+001 0.619608 0.070588 0.090196 diff --git a/Data/resources/models/fumo/reimu.png b/Data/resources/models/fumo/reimu_fumo.png similarity index 100% rename from Data/resources/models/fumo/reimu.png rename to Data/resources/models/fumo/reimu_fumo.png diff --git a/Data/resources/models/pistol.txt b/Data/resources/models/pistol.txt new file mode 100644 index 0000000..16661ad --- /dev/null +++ b/Data/resources/models/pistol.txt @@ -0,0 +1 @@ +pistol/gun.obj diff --git a/Data/sandbox-log.txt b/Data/sandbox-log.txt index ab38ce2..a7e6100 100644 --- a/Data/sandbox-log.txt +++ b/Data/sandbox-log.txt @@ -1,226 +1,228 @@ -[00:19:47 AM] Info: Starting... +[12:42:25 PM] Info: Starting... KP3D version 2 =============================== Copyright (C) kpworld.xyz 2018-2024 Contact me! @kp_cftsz -[00:19:47 AM] Info: Initializing SDL -[00:19:47 AM] Info: Initializing OpenGL -[00:19:47 AM] Info: OpenGL version: 4.6.0 NVIDIA 536.23 -[00:19:47 AM] Info: Initializing GLEW -[00:19:47 AM] Info: Initializing SDL_mixer -[00:19:47 AM] Info: Reticulating splines... -[00:19:47 AM] Info: Ready! -[00:19:47 AM] Info: Loading script: build-cylinder.scm -[00:19:47 AM] Info: Loading script: build-stairs.scm -[00:19:47 AM] Info: Loading material resource: block.png -[00:19:47 AM] Info: Found normal map texture: materials/block_n.png -[00:19:47 AM] Info: Loading material resource: brick2.jpg -[00:19:47 AM] Info: Found normal map texture: materials/brick2_n.jpg -[00:19:47 AM] Info: Loading material resource: bricks.jpg -[00:19:47 AM] Info: Found normal map texture: materials/bricks_n.jpg -[00:19:47 AM] Info: Loading material resource: FLAT5_7.png -[00:19:47 AM] Info: Found normal map texture: materials/FLAT5_7_n.png -[00:19:47 AM] Info: Loading material resource: floor0.png -[00:19:47 AM] Info: Found normal map texture: materials/floor0_n.png -[00:19:47 AM] Info: Loading material resource: floor1.png -[00:19:47 AM] Info: Found normal map texture: materials/floor1_n.png -[00:19:47 AM] Info: Loading material resource: GRASS2.png -[00:19:47 AM] Info: Found normal map texture: materials/GRASS2_n.png -[00:19:47 AM] Info: Loading material resource: hardwood.jpg -[00:19:47 AM] Info: Found normal map texture: materials/hardwood_n.jpg -[00:19:47 AM] Info: Loading texture resource: .kp3d/banner.png -[00:19:47 AM] Info: Loading texture resource: .kp3d/crosshair.png -[00:19:47 AM] Info: Loading texture resource: .kp3d/empty.png -[00:19:47 AM] Info: Loading texture resource: .kp3d/logo.png -[00:19:47 AM] Info: Loading texture resource: .kp3d/map_grid.png -[00:19:47 AM] Info: Loading texture resource: .kp3d/not_found.png -[00:19:47 AM] Info: Loading texture resource: .kp3d/skybox.png -[00:19:47 AM] Info: Loading texture resource: .kp3d/uv_test.png -[00:19:47 AM] Info: Loading texture resource: .kp3d/water.png -[00:19:47 AM] Info: Loading texture resource: dot.png -[00:19:47 AM] Info: Loading texture resource: editor/stem.png -[00:19:47 AM] Info: Loading texture resource: logo.png -[00:19:47 AM] Info: Loading texture resource: skyboxes/sky50e2dd1d496fc.jpg -[00:19:47 AM] Info: Loading texture resource: skyboxes/sky8.jpg -[00:19:47 AM] Info: Loading texture resource: skyboxes/sky9.jpg -[00:19:47 AM] Info: Loading texture resource: skyboxes/skybox.jpg -[00:19:48 AM] Info: Loading texture resource: skyboxes/skybox_11.jpg -[00:19:48 AM] Info: Loading texture resource: skyboxes/skybox_14.jpg -[00:19:48 AM] Info: Loading texture resource: skyboxes/skybox_15.jpg -[00:19:48 AM] Info: Loading texture resource: skyboxes/skybox_3.jpg -[00:19:48 AM] Info: Loading texture resource: skybox_16.jpg -[00:19:48 AM] Info: Loading model resource: fumo.txt -[00:19:48 AM] Info: Map init -[00:19:48 AM] Info: Finalized mesh with 49 batches -[00:19:48 AM] Info: # of bones for model konata/Konata_Anim_2.dae: 23 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Pelvis: 432 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 279 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 350 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 515 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 132 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 25 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 6 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 219 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 226 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Forearm: 342 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Hand: 254 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 172 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 208 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Forearm: 333 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Hand: 248 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Thigh: 475 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Calf: 382 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Foot: 319 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Toe0: 159 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Thigh: 490 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Calf: 359 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Foot: 304 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Toe0: 154 -[00:19:48 AM] Info: # of bones for model konata/Konata_Anim_2.dae: 7 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 312 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 168 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 164 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 154 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 408 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 3912 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 14 -[00:19:48 AM] Info: # of bones for model konata/Konata_Anim_2.dae: 8 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 30 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 26 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 123 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 1027 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 87 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 5 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 64 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 3 -[00:19:48 AM] Info: Starting animation -[00:19:48 AM] Info: # of bones for model konata/Konata_Anim_2.dae: 23 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Pelvis: 432 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 279 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 350 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 515 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 132 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 25 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 6 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 219 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 226 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Forearm: 342 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Hand: 254 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 172 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 208 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Forearm: 333 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Hand: 248 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Thigh: 475 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Calf: 382 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Foot: 319 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Toe0: 159 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Thigh: 490 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Calf: 359 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Foot: 304 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Toe0: 154 -[00:19:48 AM] Info: # of bones for model konata/Konata_Anim_2.dae: 7 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 312 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 168 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 164 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 154 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 408 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 3912 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 14 -[00:19:48 AM] Info: # of bones for model konata/Konata_Anim_2.dae: 8 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 30 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 26 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 123 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 1027 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 87 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 5 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 64 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 3 -[00:19:48 AM] Info: Starting animation -[00:19:48 AM] Info: # of bones for model konata/Konata_Anim_2.dae: 23 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Pelvis: 432 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 279 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 350 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 515 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 132 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 25 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 6 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 219 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 226 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Forearm: 342 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Hand: 254 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 172 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 208 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Forearm: 333 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Hand: 248 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Thigh: 475 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Calf: 382 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Foot: 319 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Toe0: 159 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Thigh: 490 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Calf: 359 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Foot: 304 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Toe0: 154 -[00:19:48 AM] Info: # of bones for model konata/Konata_Anim_2.dae: 7 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 312 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 168 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 164 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 154 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 408 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 3912 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 14 -[00:19:48 AM] Info: # of bones for model konata/Konata_Anim_2.dae: 8 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 30 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 26 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 123 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 1027 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 87 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 5 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 64 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 3 -[00:19:48 AM] Info: Starting animation -[00:19:48 AM] Info: # of bones for model konata/Konata_Anim_2.dae: 23 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Pelvis: 432 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 279 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 350 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 515 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 132 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 25 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 6 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 219 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 226 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Forearm: 342 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Hand: 254 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 172 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 208 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Forearm: 333 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Hand: 248 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Thigh: 475 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Calf: 382 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Foot: 319 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Toe0: 159 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Thigh: 490 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Calf: 359 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Foot: 304 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Toe0: 154 -[00:19:48 AM] Info: # of bones for model konata/Konata_Anim_2.dae: 7 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 312 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 168 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 164 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 154 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 408 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 3912 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 14 -[00:19:48 AM] Info: # of bones for model konata/Konata_Anim_2.dae: 8 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 30 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 26 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 123 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 1027 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 87 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 5 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 64 -[00:19:48 AM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 3 -[00:19:48 AM] Info: Starting animation -[00:19:51 AM] Info: Placed thing at {5.47038, -1.5, -7.50712} -[00:19:57 AM] Info: Finalized mesh with 48 batches +[12:42:25 PM] Info: Initializing SDL +[12:42:25 PM] Info: Initializing OpenGL +[12:42:25 PM] Info: OpenGL version: 4.6.0 NVIDIA 536.23 +[12:42:25 PM] Info: Initializing GLEW +[12:42:25 PM] Info: Initializing SDL_mixer +[12:42:25 PM] Info: Reticulating splines... +[12:42:25 PM] Info: Ready! +[12:42:25 PM] Info: Loading script: build-cylinder.scm +[12:42:25 PM] Info: Loading script: build-stairs.scm +[12:42:25 PM] Info: Loading material resource: block.png +[12:42:25 PM] Info: Found normal map texture: materials/block_n.png +[12:42:25 PM] Info: Loading material resource: brick2.jpg +[12:42:25 PM] Info: Found normal map texture: materials/brick2_n.jpg +[12:42:25 PM] Info: Loading material resource: bricks.jpg +[12:42:25 PM] Info: Found normal map texture: materials/bricks_n.jpg +[12:42:25 PM] Info: Loading material resource: FLAT5_7.png +[12:42:25 PM] Info: Found normal map texture: materials/FLAT5_7_n.png +[12:42:25 PM] Info: Loading material resource: floor0.png +[12:42:25 PM] Info: Found normal map texture: materials/floor0_n.png +[12:42:25 PM] Info: Loading material resource: floor1.png +[12:42:25 PM] Info: Found normal map texture: materials/floor1_n.png +[12:42:25 PM] Info: Loading material resource: GRASS2.png +[12:42:25 PM] Info: Found normal map texture: materials/GRASS2_n.png +[12:42:25 PM] Info: Loading material resource: hardwood.jpg +[12:42:25 PM] Info: Found normal map texture: materials/hardwood_n.jpg +[12:42:25 PM] Info: Loading texture resource: .kp3d/banner.png +[12:42:25 PM] Info: Loading texture resource: .kp3d/crosshair.png +[12:42:25 PM] Info: Loading texture resource: .kp3d/empty.png +[12:42:25 PM] Info: Loading texture resource: .kp3d/logo.png +[12:42:25 PM] Info: Loading texture resource: .kp3d/map_grid.png +[12:42:25 PM] Info: Loading texture resource: .kp3d/not_found.png +[12:42:25 PM] Info: Loading texture resource: .kp3d/skybox.png +[12:42:25 PM] Info: Loading texture resource: .kp3d/uv_test.png +[12:42:25 PM] Info: Loading texture resource: .kp3d/water.png +[12:42:25 PM] Info: Loading texture resource: dot.png +[12:42:25 PM] Info: Loading texture resource: editor/stem.png +[12:42:25 PM] Info: Loading texture resource: logo.png +[12:42:25 PM] Info: Loading texture resource: skyboxes/sky50e2dd1d496fc.jpg +[12:42:25 PM] Info: Loading texture resource: skyboxes/sky8.jpg +[12:42:25 PM] Info: Loading texture resource: skyboxes/sky9.jpg +[12:42:25 PM] Info: Loading texture resource: skyboxes/skybox.jpg +[12:42:25 PM] Info: Loading texture resource: skyboxes/skybox_11.jpg +[12:42:25 PM] Info: Loading texture resource: skyboxes/skybox_14.jpg +[12:42:26 PM] Info: Loading texture resource: skyboxes/skybox_15.jpg +[12:42:26 PM] Info: Loading texture resource: skyboxes/skybox_3.jpg +[12:42:26 PM] Info: Loading texture resource: skybox_16.jpg +[12:42:26 PM] Info: Loading model resource: fumo.txt +[12:42:26 PM] Warning: Model missing texture: fumo/reimu_fumo.obj. Loading next available PNG as fallback. +[12:42:26 PM] Info: Loading model resource: pistol.txt +[12:42:26 PM] Info: Map init +[12:42:26 PM] Info: Finalized mesh with 49 batches +[12:42:26 PM] Info: # of bones for model konata/Konata_Anim_2.dae: 23 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Pelvis: 432 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 279 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 350 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 515 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 132 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 25 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 6 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 219 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 226 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Forearm: 342 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Hand: 254 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 172 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 208 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Forearm: 333 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Hand: 248 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Thigh: 475 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Calf: 382 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Foot: 319 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Toe0: 159 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Thigh: 490 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Calf: 359 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Foot: 304 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Toe0: 154 +[12:42:26 PM] Info: # of bones for model konata/Konata_Anim_2.dae: 7 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 312 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 168 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 164 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 154 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 408 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 3912 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 14 +[12:42:26 PM] Info: # of bones for model konata/Konata_Anim_2.dae: 8 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 30 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 26 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 123 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 1027 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 87 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 5 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 64 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 3 +[12:42:26 PM] Info: Starting animation +[12:42:26 PM] Info: # of bones for model konata/Konata_Anim_2.dae: 23 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Pelvis: 432 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 279 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 350 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 515 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 132 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 25 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 6 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 219 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 226 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Forearm: 342 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Hand: 254 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 172 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 208 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Forearm: 333 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Hand: 248 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Thigh: 475 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Calf: 382 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Foot: 319 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Toe0: 159 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Thigh: 490 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Calf: 359 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Foot: 304 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Toe0: 154 +[12:42:26 PM] Info: # of bones for model konata/Konata_Anim_2.dae: 7 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 312 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 168 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 164 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 154 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 408 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 3912 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 14 +[12:42:26 PM] Info: # of bones for model konata/Konata_Anim_2.dae: 8 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 30 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 26 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 123 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 1027 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 87 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 5 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 64 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 3 +[12:42:26 PM] Info: Starting animation +[12:42:26 PM] Info: # of bones for model konata/Konata_Anim_2.dae: 23 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Pelvis: 432 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 279 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 350 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 515 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 132 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 25 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 6 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 219 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 226 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Forearm: 342 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Hand: 254 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 172 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 208 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Forearm: 333 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Hand: 248 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Thigh: 475 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Calf: 382 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Foot: 319 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Toe0: 159 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Thigh: 490 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Calf: 359 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Foot: 304 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Toe0: 154 +[12:42:26 PM] Info: # of bones for model konata/Konata_Anim_2.dae: 7 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 312 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 168 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 164 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 154 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 408 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 3912 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 14 +[12:42:26 PM] Info: # of bones for model konata/Konata_Anim_2.dae: 8 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 30 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 26 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 123 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 1027 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 87 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 5 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 64 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 3 +[12:42:26 PM] Info: Starting animation +[12:42:26 PM] Info: # of bones for model konata/Konata_Anim_2.dae: 23 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Pelvis: 432 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 279 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 350 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 515 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 132 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 25 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 6 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 219 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 226 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Forearm: 342 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Hand: 254 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 172 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 208 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Forearm: 333 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Hand: 248 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Thigh: 475 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Calf: 382 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Foot: 319 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Toe0: 159 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Thigh: 490 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Calf: 359 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Foot: 304 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Toe0: 154 +[12:42:26 PM] Info: # of bones for model konata/Konata_Anim_2.dae: 7 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine: 312 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine1: 168 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 164 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 154 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 408 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 3912 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 14 +[12:42:26 PM] Info: # of bones for model konata/Konata_Anim_2.dae: 8 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine2: 30 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Spine4: 26 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Neck1: 123 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_Head1: 1027 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_Clavicle: 87 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_R_UpperArm: 5 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_Clavicle: 64 +[12:42:26 PM] Info: Num weights for Konatap_ARM_ValveBiped_Bip01_L_UpperArm: 3 +[12:42:26 PM] Info: Starting animation +[12:42:28 PM] Info: Placed thing at {5.98608, -1.5, -7.07184} +[12:42:32 PM] Info: Finalized mesh with 48 batches diff --git a/KP3Dii/src/KP3D_Model.cpp b/KP3Dii/src/KP3D_Model.cpp index d3a23b7..79f366c 100644 --- a/KP3Dii/src/KP3D_Model.cpp +++ b/KP3Dii/src/KP3D_Model.cpp @@ -515,6 +515,23 @@ ErrCode Model::LoadModel(const std::string& path) } } + // If, for whatever reason, we can't find a texture path in the model itself or associated .mlt file, let's do something + // stupid and just load a .png file with the same name as the .obj (if we can.) + if (!tex) + { + KP3D_LOG_WARNING("Model missing texture: {}. Loading next available PNG as fallback.", path); + std::string name = "$" + kp3d_path.substr(0, kp3d_path.find_last_of(".")) + ".png"; + if (std::filesystem::exists(name.substr(1))) + { + tex = new Texture(); + tex->Load(name); + } + else + { + KP3D_LOG_ERROR("Failed to load fallback texture: {}", name); + } + } + if (model->HasBones()) m->AddSkinnedBatch(tex ? tex : default_tex, def.vertices, def.indices, def.bones, !noflip, normal_tex); else diff --git a/KP3Dii/src/KP3D_Resources.cpp b/KP3Dii/src/KP3D_Resources.cpp index e2b58f1..a83a70e 100644 --- a/KP3Dii/src/KP3D_Resources.cpp +++ b/KP3Dii/src/KP3D_Resources.cpp @@ -167,8 +167,9 @@ void LoadModels() } model_cache.emplace(mesh_path, std::make_shared()); - model_cache[mesh_path]->Load(mesh_path); + model_cache[mesh_path]->noflip = true; model_cache[mesh_path]->relative_transform = {relative_translation, relative_rotation, relative_scale}; + model_cache[mesh_path]->Load(mesh_path); } } diff --git a/KP3Dii/src/KP3D_Thing.cpp b/KP3Dii/src/KP3D_Thing.cpp index af1df76..970f420 100644 --- a/KP3Dii/src/KP3D_Thing.cpp +++ b/KP3Dii/src/KP3D_Thing.cpp @@ -47,8 +47,23 @@ void Thing::Render() Renderer3D::DrawBillboard(*default_sprite.get(), transform.translation, {1.0f, 1.0f}); break; case Display::MESH: + Renderer3D::PushShader(Renderer3D::GetMapShader()); if (display.data.mesh.model) - Renderer3D::DrawModel(*display.data.mesh.model, transform); + { + // Set up some offsets. Note that the scale is ONLY the relative scale. + Transform rt = display.data.mesh.model->relative_transform; + Transform m = transform; + m.translation += rt.translation; + m.rotation += Vec3( + ToRadians(rt.rotation.x), + ToRadians(rt.rotation.y), + ToRadians(rt.rotation.z) + ); + m.scale *= rt.scale; + + Renderer3D::DrawModel(*display.data.mesh.model, m); + } + Renderer3D::PopShader(); break; case Display::SPRITES: if (display.data.sprites.textures[0][0]) diff --git a/Sandbox/src/Editor.cpp b/Sandbox/src/Editor.cpp index 616d104..27a0517 100644 --- a/Sandbox/src/Editor.cpp +++ b/Sandbox/src/Editor.cpp @@ -1140,7 +1140,7 @@ void Editor::RenderUI() case kp3d::Display::MESH: if (m_selected_thing->display.data.mesh.model) { - ImGui::Text("Selected: %s\n", m_selected_thing->display.data.mesh.model->GetPath()); + ImGui::Text("Selected: %s\n", m_selected_thing->display.data.mesh.model->GetPath().c_str()); ImGui::SameLine(); } if (ImGui::Button("Set Mesh..."))