EntropyDrop commited on
Commit
586a73f
·
1 Parent(s): ade0be5
DDJ_real2render/create_template.py CHANGED
@@ -28,7 +28,7 @@ def parse_bg_color(bg_color):
28
 
29
  def create_template(skin_path, output_path, renderer_path, size="512x1024", bg_color="black"):
30
  """
31
- Renders walk_front_both_layer_ortho and walk_back_both_layer_ortho views for a given skin
32
  using PyVista, merges them horizontally, adds background color, and saves the result to output_path.
33
 
34
  :param skin_path: Path to the input skin PNG image.
@@ -72,7 +72,7 @@ def create_template(skin_path, output_path, renderer_path, size="512x1024", bg_c
72
 
73
  views_config = get_views(target_size)
74
 
75
- view_names = ["walk_front_both_layer_ortho", "walk_back_both_layer_ortho"]
76
  rendered_images = {}
77
 
78
  for view_name in view_names:
@@ -101,8 +101,8 @@ def create_template(skin_path, output_path, renderer_path, size="512x1024", bg_c
101
  )
102
  rendered_images[view_name] = Image.fromarray(pv_render)
103
 
104
- front_img = rendered_images["walk_front_both_layer_ortho"]
105
- back_img = rendered_images["walk_back_both_layer_ortho"]
106
 
107
  if merge is not None:
108
  merged_img = merge(front_img, back_img, direction="horizontal")
 
28
 
29
  def create_template(skin_path, output_path, renderer_path, size="512x1024", bg_color="black"):
30
  """
31
+ Renders front1 and back1 views for a given skin
32
  using PyVista, merges them horizontally, adds background color, and saves the result to output_path.
33
 
34
  :param skin_path: Path to the input skin PNG image.
 
72
 
73
  views_config = get_views(target_size)
74
 
75
+ view_names = ["front1", "back1"]
76
  rendered_images = {}
77
 
78
  for view_name in view_names:
 
101
  )
102
  rendered_images[view_name] = Image.fromarray(pv_render)
103
 
104
+ front_img = rendered_images["front1"]
105
+ back_img = rendered_images["back1"]
106
 
107
  if merge is not None:
108
  merged_img = merge(front_img, back_img, direction="horizontal")
DDJ_real2render/real2render.py CHANGED
@@ -12,9 +12,9 @@ DEFAULT_TEMPLATE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)),
12
  # Default prompt for real-to-render Minecraft character generation
13
  DEFAULT_PROMPT = """生成[图1]中角色的Minecraft形象
14
 
15
- - 人物模型必须与minecraft的玩家模型相同,且为包含内层/外层贴图的双图层模型,不能有额外元素。材质不能高于Minecraft所支持的分辨率。模型参考[图2]和[图3]
16
 
17
- - 生成的minecraft角色的姿势与[图2]完全一致(不是笔直站立),且必须包含正面图与背面图,并排放置。
18
 
19
  - 使用容易区分前景的纯色背景。
20
 
 
12
  # Default prompt for real-to-render Minecraft character generation
13
  DEFAULT_PROMPT = """生成[图1]中角色的Minecraft形象
14
 
15
+ - 人物模型必须与minecraft的玩家模型相同,且为包含内层/外层贴图的双图层模型,不能有额外元素。texture不能高于Minecraft所支持的分辨率。模型参考[图2]和[图3]
16
 
17
+ - 生成的minecraft角色的尺寸、朝向、姿势与[图2]完全一致,且必须包含正面图与背面图,并排放置。
18
 
19
  - 使用容易区分前景的纯色背景。
20
 
DDJ_real2render/template/template17.png ADDED

Git LFS Details

  • SHA256: 4c1cc5031416baa90c50b7be8a34060591f66a6583bcfd7b7cfb6015b8d4857d
  • Pointer size: 130 Bytes
  • Size of remote file: 76.9 kB
DDJ_real2render/test_batch.sh CHANGED
@@ -1,7 +1,7 @@
1
- template_x=${template_x:-template6}
2
  template_y=${template_y:-template16}
3
 
4
- for i in {2..17}; do
5
  if [ -f "test_input/img${i}.png" ]; then
6
  img_file="test_input/img${i}.png"
7
  elif [ -f "test_input/img${i}.jpg" ]; then
 
1
+ template_x=${template_x:-template14}
2
  template_y=${template_y:-template16}
3
 
4
+ for i in {15..17}; do
5
  if [ -f "test_input/img${i}.png" ]; then
6
  img_file="test_input/img${i}.png"
7
  elif [ -f "test_input/img${i}.jpg" ]; then
DDJ_real2render/test_output/img15_template14_template16.png ADDED

Git LFS Details

  • SHA256: ae46d7fd04a786b1d39685a99addbaa5bdb1e77aa957e2ca25e3d43fb8e8827f
  • Pointer size: 131 Bytes
  • Size of remote file: 984 kB
DDJ_real2render/test_output/img15_template17.png ADDED

Git LFS Details

  • SHA256: 16c0e75f89f6eb0fa51ec8cdc3f1fab43903119f9af2bd5531625bc147af5ff4
  • Pointer size: 131 Bytes
  • Size of remote file: 576 kB
DDJ_real2render/test_output/img16_template14_template16.png ADDED

Git LFS Details

  • SHA256: 9b592f0ed30b765e9c44da0de75b2d77383910228ab06ef431fd8fee200661b9
  • Pointer size: 131 Bytes
  • Size of remote file: 973 kB
DDJ_real2render/test_output/img16_template17.png ADDED

Git LFS Details

  • SHA256: 8225eefbeffac9f3141850348979335fb5b071dfcb2b734f970988abaf70879d
  • Pointer size: 131 Bytes
  • Size of remote file: 992 kB
DDJ_real2render/test_output/img17_template14_template16.png ADDED

Git LFS Details

  • SHA256: 372a1cf5963d7357ff7262d491a13ccc5ab32bdc2025e05dd58c3f80b5386dcd
  • Pointer size: 131 Bytes
  • Size of remote file: 940 kB
DDJ_real2render/test_output/img17_template17.png ADDED

Git LFS Details

  • SHA256: 50d7ae134f7ad273f9812f109f9f362f9401b292388f97cdaf425f309948d448
  • Pointer size: 131 Bytes
  • Size of remote file: 328 kB