ya2 · news · projects · code · about

metal background
authorFlavio Calva <f.calva@gmail.com>
Sat, 18 Feb 2023 07:16:20 +0000 (09:16 +0200)
committerFlavio Calva <f.calva@gmail.com>
Sat, 18 Feb 2023 07:16:20 +0000 (09:16 +0200)
assets/models/blend/backgrounds/metal/ao.png [new file with mode: 0644]
assets/models/blend/backgrounds/metal/ao_roughness_metal.png [new file with mode: 0644]
assets/models/blend/backgrounds/metal/background.blend [new file with mode: 0644]
assets/models/blend/backgrounds/metal/base.png [new file with mode: 0644]
assets/models/blend/backgrounds/metal/metal.png [new file with mode: 0644]
assets/models/blend/backgrounds/metal/normal.png [new file with mode: 0644]
assets/models/blend/backgrounds/metal/roughness.png [new file with mode: 0644]
assets/scenes/basketball.json
assets/scenes/box.json
assets/scenes/teeter_tooter.json
ya2/utils/build_metal_texture.py [new file with mode: 0644]

diff --git a/assets/models/blend/backgrounds/metal/ao.png b/assets/models/blend/backgrounds/metal/ao.png
new file mode 100644 (file)
index 0000000..35388dc
Binary files /dev/null and b/assets/models/blend/backgrounds/metal/ao.png differ
diff --git a/assets/models/blend/backgrounds/metal/ao_roughness_metal.png b/assets/models/blend/backgrounds/metal/ao_roughness_metal.png
new file mode 100644 (file)
index 0000000..6f852b3
Binary files /dev/null and b/assets/models/blend/backgrounds/metal/ao_roughness_metal.png differ
diff --git a/assets/models/blend/backgrounds/metal/background.blend b/assets/models/blend/backgrounds/metal/background.blend
new file mode 100644 (file)
index 0000000..375fd9a
Binary files /dev/null and b/assets/models/blend/backgrounds/metal/background.blend differ
diff --git a/assets/models/blend/backgrounds/metal/base.png b/assets/models/blend/backgrounds/metal/base.png
new file mode 100644 (file)
index 0000000..cdd6c7e
Binary files /dev/null and b/assets/models/blend/backgrounds/metal/base.png differ
diff --git a/assets/models/blend/backgrounds/metal/metal.png b/assets/models/blend/backgrounds/metal/metal.png
new file mode 100644 (file)
index 0000000..f0f0fd0
Binary files /dev/null and b/assets/models/blend/backgrounds/metal/metal.png differ
diff --git a/assets/models/blend/backgrounds/metal/normal.png b/assets/models/blend/backgrounds/metal/normal.png
new file mode 100644 (file)
index 0000000..c533778
Binary files /dev/null and b/assets/models/blend/backgrounds/metal/normal.png differ
diff --git a/assets/models/blend/backgrounds/metal/roughness.png b/assets/models/blend/backgrounds/metal/roughness.png
new file mode 100644 (file)
index 0000000..2d325e4
Binary files /dev/null and b/assets/models/blend/backgrounds/metal/roughness.png differ
index 0e0a4c5a44db5455ce298a7ea28fa0f241c566dd..510bb1a604824215ae4556190bb3e51f827d7a49 100644 (file)
@@ -1,5 +1,5 @@
 {
-  "background": "wood",
+  "background": "metal",
   "items": [
     {
       "class": "Shelf",
index 3ac92b7125b7e9bbd4f0020e9b78502012186e7a..da44c2e9630757df3653b681487e8aee895687d5 100644 (file)
@@ -1,5 +1,5 @@
 {
-  "background": "wood",
+  "background": "metal",
   "instructions": "Goal: the left box must hit the right box\n\nkeep \\5mouse_l\\5 pressed to drag an item\n\nkeep \\5mouse_r\\5 pressed to rotate an item",
   "items": [
     {
     ]
   },
   "version": "8f6333998c31"
-}
\ No newline at end of file
+}
index 8d559f08d8669566df709e6705a51b3bc4dbd06c..dcb3c90ffd26d76d4730788cb0c73209368ec2b3 100644 (file)
@@ -1,5 +1,5 @@
 {
-  "background": "wood",
+  "background": "metal",
   "items": [
     {
       "class": "Shelf",
diff --git a/ya2/utils/build_metal_texture.py b/ya2/utils/build_metal_texture.py
new file mode 100644 (file)
index 0000000..f20ba4a
--- /dev/null
@@ -0,0 +1,16 @@
+from sys import argv
+from os.path import abspath
+from os import system
+
+ao = abspath(argv[1])
+roughness = abspath(argv[2])
+metal = abspath(argv[3])
+fout = abspath(argv[4])
+
+system('cp %s %s' % (ao, fout))
+cmd = 'convert %s %s -alpha off -compose copy_green -composite %s' % (fout, roughness, fout)
+print(cmd)
+system(cmd)
+cmd = 'convert %s %s -alpha off -compose copy_blue -composite %s' % (fout, metal, fout)
+print(cmd)
+system(cmd)