diff --git a/.gitignore b/.gitignore index eaa0b95..ac540bd 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ screenshot.png shot_*.png screenshot.png.import +shitboxes/ diff --git a/README.md b/README.md index c6c0e7f..625ebff 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,18 @@ Model convention (any GLB works, hand-modelled or generated): Piss-take names on purpose: real model names and badges are trademarks. To improve a silhouette: supply a side-on photo + front three-quarter photo, tweak the -profile points in the spec, rebuild, screenshot. Kerb weight and power figures go in -stats.tres if you want realism; otherwise vibes. +profile points in the spec, rebuild, screenshot. + +**Stats are low-key reversed**: the shitboxier the car was in real life, the better it +performs here. The Excel X3 is the fastest car in the game; the muscle cars are all bark. + +Downloaded models (from `shitboxes/`, gitignored + .gdignore'd) convert via: + +``` +/Applications/Blender.app/Contents/MacOS/Blender -b -P tools/import_shitbox.py -- "" [yaw_deg] +``` + +Imported cars don't shed det_* panels until someone cuts their doors out in Blender. ## Add a level diff --git a/cars/casserola_dx/car.glb b/cars/casserola_dx/car.glb new file mode 100644 index 0000000..5b5575a Binary files /dev/null and b/cars/casserola_dx/car.glb differ diff --git a/cars/casserola_dx/car.glb.import b/cars/casserola_dx/car.glb.import new file mode 100644 index 0000000..646f99f --- /dev/null +++ b/cars/casserola_dx/car.glb.import @@ -0,0 +1,42 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://dd3aov85sbn27" +path="res://.godot/imported/car.glb-6d8f2b8e5e0b6a46e40628e041439d43.scn" + +[deps] + +source_file="res://cars/casserola_dx/car.glb" +dest_files=["res://.godot/imported/car.glb-6d8f2b8e5e0b6a46e40628e041439d43.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/root_script=null +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +nodes/use_name_suffixes=true +nodes/use_node_type_suffixes=true +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +materials/extract=0 +materials/extract_format=0 +materials/extract_path="" +_subresources={} +gltf/naming_version=2 +gltf/embedded_image_handling=1 diff --git a/cars/casserola_dx/car_Image_0.png b/cars/casserola_dx/car_Image_0.png new file mode 100644 index 0000000..0755d56 Binary files /dev/null and b/cars/casserola_dx/car_Image_0.png differ diff --git a/cars/casserola_dx/car_Image_0.png.import b/cars/casserola_dx/car_Image_0.png.import new file mode 100644 index 0000000..a891447 --- /dev/null +++ b/cars/casserola_dx/car_Image_0.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cu6nllj3pxu8a" +path="res://.godot/imported/car_Image_0.png-f1e34ca46982f898b4d6c90b3f6c6148.ctex" +metadata={ +"vram_texture": false +} +generator_parameters={ +"md5": "348a9791dc41b89796ec3808b5b5262f" +} + +[deps] + +source_file="res://cars/casserola_dx/car_Image_0.png" +dest_files=["res://.godot/imported/car_Image_0.png-f1e34ca46982f898b4d6c90b3f6c6148.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/cars/casserola_dx/car_Image_1.png b/cars/casserola_dx/car_Image_1.png new file mode 100644 index 0000000..68806f4 Binary files /dev/null and b/cars/casserola_dx/car_Image_1.png differ diff --git a/cars/casserola_dx/car_Image_1.png.import b/cars/casserola_dx/car_Image_1.png.import new file mode 100644 index 0000000..56134ae --- /dev/null +++ b/cars/casserola_dx/car_Image_1.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://rleiwuy8oepq" +path="res://.godot/imported/car_Image_1.png-7be6a4a226014f015afe6ba35f1b7930.ctex" +metadata={ +"vram_texture": false +} +generator_parameters={ +"md5": "d8398af19e8e5a388342942b69550581" +} + +[deps] + +source_file="res://cars/casserola_dx/car_Image_1.png" +dest_files=["res://.godot/imported/car_Image_1.png-7be6a4a226014f015afe6ba35f1b7930.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/cars/casserola_dx/car_Image_2.png b/cars/casserola_dx/car_Image_2.png new file mode 100644 index 0000000..a7636d1 Binary files /dev/null and b/cars/casserola_dx/car_Image_2.png differ diff --git a/cars/casserola_dx/car_Image_2.png.import b/cars/casserola_dx/car_Image_2.png.import new file mode 100644 index 0000000..9fcf8ec --- /dev/null +++ b/cars/casserola_dx/car_Image_2.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bpj1jtpedqarf" +path="res://.godot/imported/car_Image_2.png-80fd138f6ac8f7ecbe057d68af58c928.ctex" +metadata={ +"vram_texture": false +} +generator_parameters={ +"md5": "64c1da604221bbc3457fd79772c2b578" +} + +[deps] + +source_file="res://cars/casserola_dx/car_Image_2.png" +dest_files=["res://.godot/imported/car_Image_2.png-80fd138f6ac8f7ecbe057d68af58c928.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/cars/casserola_dx/car_Image_3.png b/cars/casserola_dx/car_Image_3.png new file mode 100644 index 0000000..1d5a08f Binary files /dev/null and b/cars/casserola_dx/car_Image_3.png differ diff --git a/cars/casserola_dx/car_Image_3.png.import b/cars/casserola_dx/car_Image_3.png.import new file mode 100644 index 0000000..dd91cf5 --- /dev/null +++ b/cars/casserola_dx/car_Image_3.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bycgy0k5lu2rl" +path="res://.godot/imported/car_Image_3.png-eb4dcce541ecf0773ccc0fe8e2f1c81a.ctex" +metadata={ +"vram_texture": false +} +generator_parameters={ +"md5": "a2a9d313578563b9027384ffab32dc67" +} + +[deps] + +source_file="res://cars/casserola_dx/car_Image_3.png" +dest_files=["res://.godot/imported/car_Image_3.png-eb4dcce541ecf0773ccc0fe8e2f1c81a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/cars/casserola_dx/car_Image_4.png b/cars/casserola_dx/car_Image_4.png new file mode 100644 index 0000000..576cfcc Binary files /dev/null and b/cars/casserola_dx/car_Image_4.png differ diff --git a/cars/casserola_dx/car_Image_4.png.import b/cars/casserola_dx/car_Image_4.png.import new file mode 100644 index 0000000..91a60f8 --- /dev/null +++ b/cars/casserola_dx/car_Image_4.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://waymjnr0x1nk" +path="res://.godot/imported/car_Image_4.png-6c71e70c624b2dcf5383b469a764211d.ctex" +metadata={ +"vram_texture": false +} +generator_parameters={ +"md5": "b62d822f463da9bc8f0826af96238280" +} + +[deps] + +source_file="res://cars/casserola_dx/car_Image_4.png" +dest_files=["res://.godot/imported/car_Image_4.png-6c71e70c624b2dcf5383b469a764211d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/cars/casserola_dx/stats.tres b/cars/casserola_dx/stats.tres new file mode 100644 index 0000000..35a477f --- /dev/null +++ b/cars/casserola_dx/stats.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="CarStats" load_steps=2 format=3] + +[ext_resource type="Script" path="res://src/car_stats.gd" id="1"] + +[resource] +script = ExtResource("1") +display_name = "CASSEROLA DX" +model_path = "res://cars/casserola_dx/car.glb" +engine_power = 18.0 +mass = 1000.0 +grip = 7.0 +length = 4.27 +width = 1.80 diff --git a/cars/chaebol_x1/stats.tres b/cars/chaebol_x1/stats.tres index 56ee184..466fdc1 100644 --- a/cars/chaebol_x1/stats.tres +++ b/cars/chaebol_x1/stats.tres @@ -6,8 +6,8 @@ script = ExtResource("1") display_name = "CHAEBOL HLYR X1" model_path = "res://cars/chaebol_x1/car.glb" -engine_power = 10.0 +engine_power = 15.0 mass = 900.0 -grip = 6.2 +grip = 6.5 length = 4.28 width = 1.60 diff --git a/cars/chaebol_x2/stats.tres b/cars/chaebol_x2/stats.tres index 00afc18..36993b5 100644 --- a/cars/chaebol_x2/stats.tres +++ b/cars/chaebol_x2/stats.tres @@ -6,8 +6,8 @@ script = ExtResource("1") display_name = "CHAEBOL HLYR X2" model_path = "res://cars/chaebol_x2/car.glb" -engine_power = 11.5 +engine_power = 17.0 mass = 950.0 -grip = 6.5 +grip = 6.8 length = 4.15 width = 1.61 diff --git a/cars/datto_120y/stats.tres b/cars/datto_120y/stats.tres index 70d02f4..f94b973 100644 --- a/cars/datto_120y/stats.tres +++ b/cars/datto_120y/stats.tres @@ -6,8 +6,8 @@ script = ExtResource("1") display_name = "DADSON 420YO" model_path = "res://cars/datto_120y/car.glb" -engine_power = 11.0 +engine_power = 20.0 mass = 850.0 -grip = 6.5 +grip = 7.0 length = 3.92 width = 1.50 diff --git a/cars/excel_x3/stats.tres b/cars/excel_x3/stats.tres index 2c7bafc..a26cc82 100644 --- a/cars/excel_x3/stats.tres +++ b/cars/excel_x3/stats.tres @@ -6,8 +6,8 @@ script = ExtResource("1") display_name = "CHAEBOL HLYR X3" model_path = "res://cars/excel_x3/car.glb" -engine_power = 12.0 +engine_power = 22.0 mass = 980.0 -grip = 6.8 +grip = 7.5 length = 4.10 width = 1.62 diff --git a/cars/floored_xd/stats.tres b/cars/floored_xd/stats.tres index e65cf79..2f15142 100644 --- a/cars/floored_xd/stats.tres +++ b/cars/floored_xd/stats.tres @@ -6,8 +6,8 @@ script = ExtResource("1") display_name = "FLOORED XD LOLTOP" model_path = "res://cars/floored_xd/car.glb" -engine_power = 22.0 +engine_power = 10.0 mass = 1450.0 -grip = 5.2 +grip = 4.5 length = 4.85 width = 1.91 diff --git a/cars/gemmy_tx/stats.tres b/cars/gemmy_tx/stats.tres index 1294461..4caf564 100644 --- a/cars/gemmy_tx/stats.tres +++ b/cars/gemmy_tx/stats.tres @@ -6,8 +6,8 @@ script = ExtResource("1") display_name = "Gemmy TX" model_path = "res://cars/gemmy_tx/car.glb" -engine_power = 13.0 +engine_power = 16.0 mass = 950.0 -grip = 7.0 +grip = 7.2 length = 4.13 width = 1.57 diff --git a/cars/hardon_cmere/stats.tres b/cars/hardon_cmere/stats.tres index 85151bc..b39f003 100644 --- a/cars/hardon_cmere/stats.tres +++ b/cars/hardon_cmere/stats.tres @@ -6,8 +6,8 @@ script = ExtResource("1") display_name = "HARDON CMERE" model_path = "res://cars/hardon_cmere/car.glb" -engine_power = 12.0 +engine_power = 19.0 mass = 1060.0 -grip = 5.8 +grip = 6.0 length = 4.48 width = 1.66 diff --git a/cars/hardon_shaggen/stats.tres b/cars/hardon_shaggen/stats.tres index 4d847c5..ad2a5e7 100644 --- a/cars/hardon_shaggen/stats.tres +++ b/cars/hardon_shaggen/stats.tres @@ -6,8 +6,8 @@ script = ExtResource("1") display_name = "HARDON SHAGGEN" model_path = "res://cars/hardon_shaggen/car.glb" -engine_power = 14.0 +engine_power = 13.0 mass = 1250.0 -grip = 5.5 +grip = 5.0 length = 4.55 width = 1.72 diff --git a/cars/kingswood_hq/stats.tres b/cars/kingswood_hq/stats.tres index ccf3e75..f093bae 100644 --- a/cars/kingswood_hq/stats.tres +++ b/cars/kingswood_hq/stats.tres @@ -6,7 +6,7 @@ script = ExtResource("1") display_name = "Kingswood HQ" model_path = "res://cars/kingswood_hq/car.glb" -engine_power = 15.0 +engine_power = 14.0 mass = 1400.0 grip = 5.5 length = 4.81 diff --git a/cars/maxi_merk/stats.tres b/cars/maxi_merk/stats.tres index 17225fa..f1e0ac3 100644 --- a/cars/maxi_merk/stats.tres +++ b/cars/maxi_merk/stats.tres @@ -6,8 +6,8 @@ script = ExtResource("1") display_name = "MAXI MERK" model_path = "res://cars/maxi_merk/car.glb" -engine_power = 12.0 +engine_power = 13.0 mass = 800.0 -grip = 6.5 +grip = 6.0 length = 4.35 width = 1.45 diff --git a/cars/mini_merk/stats.tres b/cars/mini_merk/stats.tres index 1889d14..f9e2562 100644 --- a/cars/mini_merk/stats.tres +++ b/cars/mini_merk/stats.tres @@ -6,8 +6,8 @@ script = ExtResource("1") display_name = "MINI MERK" model_path = "res://cars/mini_merk/car.glb" -engine_power = 9.0 +engine_power = 17.0 mass = 600.0 -grip = 7.5 +grip = 8.0 length = 3.05 width = 1.42 diff --git a/cars/morry/car.glb b/cars/morry/car.glb new file mode 100644 index 0000000..496f329 Binary files /dev/null and b/cars/morry/car.glb differ diff --git a/cars/morry/car.glb.import b/cars/morry/car.glb.import new file mode 100644 index 0000000..9ad58a1 --- /dev/null +++ b/cars/morry/car.glb.import @@ -0,0 +1,42 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://c6dpiro6fcq0g" +path="res://.godot/imported/car.glb-0f2fdbe283a5aac151743baf08dd07fa.scn" + +[deps] + +source_file="res://cars/morry/car.glb" +dest_files=["res://.godot/imported/car.glb-0f2fdbe283a5aac151743baf08dd07fa.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/root_script=null +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +nodes/use_name_suffixes=true +nodes/use_node_type_suffixes=true +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +materials/extract=0 +materials/extract_format=0 +materials/extract_path="" +_subresources={} +gltf/naming_version=2 +gltf/embedded_image_handling=1 diff --git a/cars/morry/car_texture.jpg b/cars/morry/car_texture.jpg new file mode 100644 index 0000000..a2ec018 Binary files /dev/null and b/cars/morry/car_texture.jpg differ diff --git a/cars/morry/car_texture.jpg.import b/cars/morry/car_texture.jpg.import new file mode 100644 index 0000000..68f18b1 --- /dev/null +++ b/cars/morry/car_texture.jpg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bi6prwdh3ns62" +path="res://.godot/imported/car_texture.jpg-d907562fb0b101f8744fabee19c3eb54.ctex" +metadata={ +"vram_texture": false +} +generator_parameters={ +"md5": "1bce60184df05cd7b8719c8a4950dd96" +} + +[deps] + +source_file="res://cars/morry/car_texture.jpg" +dest_files=["res://.godot/imported/car_texture.jpg-d907562fb0b101f8744fabee19c3eb54.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/cars/morry/stats.tres b/cars/morry/stats.tres new file mode 100644 index 0000000..1841876 --- /dev/null +++ b/cars/morry/stats.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="CarStats" load_steps=2 format=3] + +[ext_resource type="Script" path="res://src/car_stats.gd" id="1"] + +[resource] +script = ExtResource("1") +display_name = "MORRY" +model_path = "res://cars/morry/car.glb" +engine_power = 16.0 +mass = 620.0 +grip = 8.0 +length = 3.05 +width = 1.45 diff --git a/cars/turdrunner_slur/stats.tres b/cars/turdrunner_slur/stats.tres index 07f5e35..2af6417 100644 --- a/cars/turdrunner_slur/stats.tres +++ b/cars/turdrunner_slur/stats.tres @@ -6,8 +6,8 @@ script = ExtResource("1") display_name = "TURDRUNNER SLUR 500" model_path = "res://cars/turdrunner_slur/car.glb" -engine_power = 21.0 +engine_power = 9.0 mass = 1200.0 -grip = 6.0 +grip = 4.3 length = 4.51 width = 1.71 diff --git a/cars/vl_terbo/stats.tres b/cars/vl_terbo/stats.tres index edc4476..99715af 100644 --- a/cars/vl_terbo/stats.tres +++ b/cars/vl_terbo/stats.tres @@ -6,8 +6,8 @@ script = ExtResource("1") display_name = "VL Terbo" model_path = "res://cars/vl_terbo/car.glb" -engine_power = 19.0 +engine_power = 11.0 mass = 1250.0 -grip = 5.0 +grip = 4.8 length = 4.72 width = 1.72 diff --git a/cars/xf_falcon/stats.tres b/cars/xf_falcon/stats.tres index d161284..d1ee47f 100644 --- a/cars/xf_falcon/stats.tres +++ b/cars/xf_falcon/stats.tres @@ -6,8 +6,8 @@ script = ExtResource("1") display_name = "XF Fungoon" model_path = "res://cars/xf_falcon/car.glb" -engine_power = 15.0 +engine_power = 12.0 mass = 1350.0 -grip = 5.5 +grip = 5.2 length = 4.91 width = 1.86 diff --git a/shot_casserola_dx.png.import b/shot_casserola_dx.png.import new file mode 100644 index 0000000..62c2cc2 --- /dev/null +++ b/shot_casserola_dx.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bvj8acey6cfwt" +path="res://.godot/imported/shot_casserola_dx.png-143068759f8248f4e67facd7ba986a47.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://shot_casserola_dx.png" +dest_files=["res://.godot/imported/shot_casserola_dx.png-143068759f8248f4e67facd7ba986a47.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/shot_chaebol_x1.png.import b/shot_chaebol_x1.png.import new file mode 100644 index 0000000..103658b --- /dev/null +++ b/shot_chaebol_x1.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bm80bpeqm41q4" +path="res://.godot/imported/shot_chaebol_x1.png-ab23f1251ae9c80a4dbe158ad9a4e40d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://shot_chaebol_x1.png" +dest_files=["res://.godot/imported/shot_chaebol_x1.png-ab23f1251ae9c80a4dbe158ad9a4e40d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/shot_chaebol_x2.png.import b/shot_chaebol_x2.png.import new file mode 100644 index 0000000..788de2d --- /dev/null +++ b/shot_chaebol_x2.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://khjyhwdfp4of" +path="res://.godot/imported/shot_chaebol_x2.png-85e80bf3292aa38ec2e2af06d6395f40.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://shot_chaebol_x2.png" +dest_files=["res://.godot/imported/shot_chaebol_x2.png-85e80bf3292aa38ec2e2af06d6395f40.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/shot_hardon_cmere.png.import b/shot_hardon_cmere.png.import new file mode 100644 index 0000000..4d5bb3c --- /dev/null +++ b/shot_hardon_cmere.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ogsrhjmu4sa5" +path="res://.godot/imported/shot_hardon_cmere.png-791bf7aa28c70148da5c8cc8507cb785.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://shot_hardon_cmere.png" +dest_files=["res://.godot/imported/shot_hardon_cmere.png-791bf7aa28c70148da5c8cc8507cb785.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/shot_morry.png.import b/shot_morry.png.import new file mode 100644 index 0000000..382b2d1 --- /dev/null +++ b/shot_morry.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bn4ofl8uhfeaq" +path="res://.godot/imported/shot_morry.png-654f7e7886c576aa15987960425204b9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://shot_morry.png" +dest_files=["res://.godot/imported/shot_morry.png-654f7e7886c576aa15987960425204b9.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/tests/smoke.gd b/tests/smoke.gd index ec3e2cf..72c1741 100644 --- a/tests/smoke.gd +++ b/tests/smoke.gd @@ -17,7 +17,8 @@ func _run() -> void: assert(s != null and s.engine_power > 0.0, "bad stats: %s" % p) if s.model_path != "": assert(load(s.model_path) is PackedScene, "bad model: %s" % s.model_path) - Game.car_path = cars.values()[0] + # datto is procedural (has det_* parts); imported models legitimately have none + Game.car_path = cars.get("datto_120y", cars.values()[0]) Game.level_path = levels.values()[0] # cruise: throttle 3s, car must move diff --git a/tools/import_shitbox.py b/tools/import_shitbox.py new file mode 100644 index 0000000..b7f46d1 --- /dev/null +++ b/tools/import_shitbox.py @@ -0,0 +1,82 @@ +"""Convert a downloaded model (glb/gltf/fbx/obj/blend) into a game-ready car GLB. + +Run: /Applications/Blender.app/Contents/MacOS/Blender -b -P tools/import_shitbox.py -- \ + "" [yaw_deg] + +Normalizes: uniform scale so the longest horizontal extent = target length, +optional yaw (degrees) so the nose faces +Y (Godot -Z), centered, ground at +-0.75 (the controller's ride height). Exports cars//car.glb. + +ponytail: imported models have no det_* panels, so they don't shed parts -- +cutting doors out of downloaded meshes is per-model surgery for later. +""" +import math +import os +import sys +import bpy +from mathutils import Vector + +argv = sys.argv[sys.argv.index("--") + 1:] +src, car_id, target_len = argv[0], argv[1], float(argv[2]) +yaw = math.radians(float(argv[3])) if len(argv) > 3 else 0.0 + +ext = os.path.splitext(src)[1].lower() +if ext == ".blend": + bpy.ops.wm.open_mainfile(filepath=src) +else: + bpy.ops.wm.read_factory_settings(use_empty=True) + if ext in (".glb", ".gltf"): + bpy.ops.import_scene.gltf(filepath=src) + elif ext == ".fbx": + bpy.ops.import_scene.fbx(filepath=src) + elif ext == ".obj": + bpy.ops.wm.obj_import(filepath=src) + else: + raise SystemExit("unsupported: " + ext) + +for obj in list(bpy.data.objects): + if obj.type not in ("MESH", "EMPTY"): + bpy.data.objects.remove(obj, do_unlink=True) + +meshes = [o for o in bpy.data.objects if o.type == "MESH"] +assert meshes, "no meshes found" + +root = bpy.data.objects.new("body", None) +bpy.context.collection.objects.link(root) +for obj in bpy.data.objects: + if obj is not root and obj.parent is None: + mw = obj.matrix_world.copy() + obj.parent = root + obj.matrix_world = mw + +def bbox(): + lo = Vector((1e9, 1e9, 1e9)) + hi = Vector((-1e9, -1e9, -1e9)) + dg = bpy.context.evaluated_depsgraph_get() + for o in meshes: + for c in o.evaluated_get(dg).bound_box: + w = o.matrix_world @ Vector(c) + lo = Vector(map(min, lo, w)) + hi = Vector(map(max, hi, w)) + return lo, hi + +root.rotation_euler = (0, 0, yaw) +bpy.context.view_layer.update() +lo, hi = bbox() +size = hi - lo +scale = target_len / max(size.x, size.y) +root.scale = (scale,) * 3 +bpy.context.view_layer.update() +lo, hi = bbox() +center = (lo + hi) / 2 +root.location = Vector((-center.x, -center.y, -lo.z - 0.75)) +bpy.context.view_layer.update() + +out = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "cars", car_id) +os.makedirs(out, exist_ok=True) +for obj in bpy.data.objects: + obj.select_set(True) +path = os.path.join(out, "car.glb") +bpy.ops.export_scene.gltf(filepath=path, export_format="GLB", use_selection=True) +lo, hi = bbox() +print("imported %s -> %s | size %.2f x %.2f x %.2f" % (src, path, hi.x - lo.x, hi.y - lo.y, hi.z - lo.z))