EntropyDrop commited on
Commit
eff1ea7
·
1 Parent(s): 0d6b007
DDJ_real2render/real2render.py CHANGED
@@ -20,6 +20,45 @@ DEFAULT_PROMPT = """生成[图1]中角色的Minecraft形象
20
 
21
  - 在上述约束下,尽可能完美、准确的还原[图1]中的角色,包括外貌特征、全身所有服装、各种饰品等(不包括手持物品和披风)"""
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  def real2render(
24
  image_path,
25
  template_path=None,
 
20
 
21
  - 在上述约束下,尽可能完美、准确的还原[图1]中的角色,包括外貌特征、全身所有服装、各种饰品等(不包括手持物品和披风)"""
22
 
23
+ DEFAULT_PROMPT= """You are a Minecraft skin creator. You receive 3 input images:
24
+ INPUTS (3 images): [A] Character reference: same anime character with FRONT + BACK views (side-by-side or top/bottom).
25
+ [B] Layout reference: target Minecraft dual-panel framing and camera. [C] Pose-anchor reference: strict limb-position
26
+ guide.
27
+ OUTPUT: Generate exactly ONE final image only. - Pure white background #FFFFFF. - Two panels only, side-by-side: - Left =
28
+ FRONT - Right = BACK - Never swap. - No extra views, no extra images, no text, no watermark, no UI, no props, no scene.
29
+ VIEW PARSING (HARD): - If [A] is side-by-side: default left=front, right=back (unless explicit text labels say otherwise).
30
+ - If [A] is top/bottom: rearrange to left=front, right=back. - Left panel uses front-view info only. - Right panel uses
31
+ back-view info only. - Do not copy front-only details to back or back-only details to front.
32
+ CAMERA / ORIENTATION (LOCKED): - Near-orthographic look (very weak perspective). - Front panel: +24° yaw (front-right),
33
+ +30° downward tilt. - Back panel: 180°+24° yaw (back-right), same +30° downward tilt. - Front/back orientation
34
+ relationship must remain parallel in 3D space. - Match framing style of [B].
35
+ POSE LOCK (ULTRA STRICT): - Minecraft default standing pose only. - Head, torso, arms, legs are clean cuboids with
36
+ straight vertical sides. - Arms: - Start at shoulder line, hang straight down. - No bend, no forward/back swing, no
37
+ outward spread. - Left/right symmetry required. - Legs: - Start at hip line, go straight down. - Parallel, no crossing,
38
+ no toe-in/toe-out, no bend. - Feet bottoms must share the same baseline. - Limb-position tolerance: - Vertical drift of
39
+ each arm centerline from shoulder to hand <= 1 px. - Vertical drift of each leg centerline from hip to foot <= 1 px. -
40
+ Left/right symmetry error <= 2 px. - Foot baseline mismatch <= 1 px. - If any tolerance fails, regenerate.
41
+ PROPORTION LOCK (CLASSIC): - Approx height ratio head:torso:legs = 8:12:12. - Arm height about 12, arm width about 4; leg
42
+ width about 4 (relative block proportions). - Same scale and body proportions in both panels. - Full body visible (head
43
+ to feet), feet aligned, minimal empty margin, no cropping.
44
+ PIXEL FORMAT LOCK (VERY HARD): - True pixel art only. No smooth high-precision rendering. - Build on a low-resolution
45
+ pixel grid first, then upscale by integer factor using NEAREST only. - No anti-aliasing, no blur, no feathering, no
46
+ denoise smoothing. - No sub-pixel edges, no fractional blending, no soft gradients. - Use hard square pixel blocks;
47
+ staircase edges are acceptable/preferred. - Palette limit: - Total character palette recommended <= 48 colors (excluding
48
+ white background). - Hair palette <= 6 colors. - Shading limit: max 2-3 tones per material. - No isolated 1-pixel noise
49
+ clusters.
50
+ HAIR PIXELIZATION LOCK (CRITICAL): - Hair must be converted into blocky pixel masses, not smooth strands. - No thin
51
+ strand rendering, no wispy/soft edges, no semi-transparent flyaways. - Minimum visible hair feature width: >= 2 px at the
52
+ working pixel grid. - Hairline, bangs, side locks, and back hair must be represented as square block clusters. - If hair
53
+ appears too smooth or too detailed, re-pixelate and regenerate.
54
+ FIDELITY: - Preserve hairstyle structure, outfit structure, color-block layout, patterns, accessories. - Front details
55
+ from front reference; back details from back reference. - If back is unclear, do minimal consistent completion only; do
56
+ not invent new design elements.
57
+ FINAL SELF-CHECK (MUST PASS ALL): 1) Left=FRONT, Right=BACK correct. 2) Arms vertical, symmetric, and anchored correctly.
58
+ 3) Legs vertical, parallel, and feet aligned. 4) Same character / same outfit in both panels. 5) Pure white background,
59
+ one dual-panel image only. 6) Hair is clearly blocky pixel mass (not smooth high-precision strands). If any check fails,
60
+ regenerate before final output."""
61
+
62
  def real2render(
63
  image_path,
64
  template_path=None,
DDJ_real2render/template/template100.png ADDED

Git LFS Details

  • SHA256: 50a31c1fd68a1ed030ea4668239e2144a65fc4ea98583475a74188f22564d02f
  • Pointer size: 130 Bytes
  • Size of remote file: 41.7 kB
DDJ_real2render/template/template101.png ADDED

Git LFS Details

  • SHA256: 5b7205024b3bcd8841d2f800315613da25b04b9ee7a91080525e12cfaaeb65cd
  • Pointer size: 130 Bytes
  • Size of remote file: 53.9 kB
DDJ_real2render/test_output/img10_template100_101.png ADDED

Git LFS Details

  • SHA256: b8241ec38fab143b64f1fc3bfc37533b57a5d297266a7f495d96852e53fd9c01
  • Pointer size: 132 Bytes
  • Size of remote file: 3.07 MB