2023.9 有关nikke解包问题

检查一下spine sdk版本

大佬


我在出现了这种白边有没有什么解决方法,换了另一个着色器没有用。

我用的是EX工作室(Live2DViewer)


没问题呀

好奇怪啊,我用EX工作室为啥都是这种情况换另一个着色器成这个样子了

按理说换着色器是没问题的

很难受,换了着色器就这个样子了。
image
但是有的图片就很好,不换着色器照样好看


【这个连着色器都没换,效果很好】不知道什么情况

因为有的皮的分辨率是对的上的,出问题的基本上都是缩放过的,按理说通道一开没问题的,我现在去ex里面看看你出问题的皮

哎呀,换了着色器后atlas alpha就关闭了,这个真的就涉及我的知识盲区了

大概是应为premultiplied alpha的插值算法中最后计算不同图片叠加部分的时候的alpha通道值会在resize过程中被改变,所以原本为512 x 512 大小的图片被resize到原本的4倍大小后 边缘的alpha值可能被改变所以在premultiplied alpha后产生边缘的白值(大概率是alpha被稀释为0了或者高一点的值)

解决了,直接提取pc版本中的资源文件。可以看到里面的贴图大小和从手机版本里面提取出来的不一样。


【手机版本里面提取出来的是512 或者1024大小的】
最后的效果也很好

gan感觉没有明显白边。

因为我电脑上没法装nikke,所以我一直用的手机版资源,见谅
我晚点去改进一下脚本试试,看看能不能解决白边问题 :persevere:

2 个赞

python脚本弄像素差距过大确实会有问题,不能用pc资源的话,有两个解决办法,1、用ps的邻近(硬边缘)缩放,就没问题,2、在nikke游戏里设置高画质(材质品质跟模型品质)。。最后还是建议用pc资源

1 个赞

电脑版里只有一大堆文件夹,没有bundle文件,我尝试把他们扔进as里面,解出来的东西没有立绘文件,这要咋整,大佬求助

请问怎么加密呢 想换到游戏内使用

大佬,请问能分享一下nikketools吗,找了一个旧,用不了

脚本改好了,换成了 NEAREST 插值,效果不错,但是确实用电脑版的资源更好(

这是我自己用的一键处理脚本,因为container path乱码,所以直接用的source name导出的,png缩放的python脚本也在里面

#!/bin/bash

# 设置output_spine目录路径
output_spine_dir="output"

# 查找以export结尾的子文件夹
export_dirs=($(find "$output_spine_dir" -type d -name "*_export"))

# 遍历每个以export结尾的文件夹并执行操作
for export_dir in "${export_dirs[@]}"; do
    # 获取当前export文件夹的名称
    export_dir_name=$(basename "$export_dir")

    # 找到以CAB开头的子目录
    cab_dirs=($(find "$export_dir" -type d -name "CAB-*"))

    # 如果找到CAB开头的子目录,将其移动到output目录下
    for cab_dir in "${cab_dirs[@]}"; do
        if [ -d "$cab_dir" ]; then
            mv "$cab_dir" "$output_spine_dir/"
        fi
    done

    # 删除原始export文件夹
    rm -r "$export_dir"
done

# 处理含有特殊后缀的文件
find "$output_spine_dir" -type f \( -name "*.atlas*" -o -name "*.skel*" \) | while read -r file; do
    # 获取文件名和后缀
    filename=$(basename "$file")
    base=${filename%.*}
    extension=${filename##*.}

    if [[ $extension != "skel" ]] && [[ $extension != "atlas" ]]; then
        new_filename="${base}.${extension}"
        mv "$file" "$(dirname "$file")/$new_filename"
    fi
done

# 执行未找到以export结尾的文件夹的操作
cab_dirs=($(find "$output_spine_dir" -type d -name "CAB-*"))

for cab_dir in "${cab_dirs[@]}"; do
    # 检测是否同时存在 .skel, .atlas, 和 .png 文件
    skel_file=$(find "$cab_dir" -type f -name "*.skel")
    atlas_file=$(find "$cab_dir" -type f -name "*.atlas")
    png_file=$(find "$cab_dir" -type f -name "*.png")

    if [ -n "$skel_file" ] && [ -n "$atlas_file" ] && [ -n "$png_file" ]; then
        # 如果同时存在 .skel, .atlas, 和 .png 文件,则提取文件名并移动文件
        file_name=$(find "$cab_dir" -type f | head -n 1 | xargs basename)
        base_name=${file_name%.*}

        # 创建新的目录并移动文件
        mkdir -p "$output_spine_dir/$base_name"
        mv "$cab_dir"/* "$output_spine_dir/$base_name/"

        # 删除原始的CAB文件夹
        rm -r "$cab_dir"
    else
        # 如果不同时存在这些文件,则删除CAB文件夹
        rm -r "$cab_dir"
    fi
done

python <<EOF

import os
import re
from PIL import Image

def resize_image_nearest(image_path, new_size, output_path):
    image = Image.open(image_path)
    resized_image = image.resize(new_size, Image.NEAREST)  # NEAREST插值
    resized_image.save(output_path)

# 路径
spine_folder = "output"
atlas_files = []

for root, dirs, files in os.walk(spine_folder):
    for file in files:
        if file.endswith(".atlas"):
            atlas_files.append(os.path.join(root, file))

for atlas_file in atlas_files:
    with open(atlas_file, "r") as file:
        lines = file.readlines()

    current_image = None
    correct_size = None

    image_pattern = re.compile(r'([^#]+)\.png')
    size_pattern = re.compile(r'size:\s*(\d+),\s*(\d+)')

    for line in lines:
        image_match = image_pattern.search(line)
        size_match = size_pattern.search(line)

        if image_match:
            current_image = image_match.group(1) + ".png"
        elif size_match:
            width, height = map(int, size_match.groups())
            correct_size = (width, height)
            if current_image and correct_size:
                image_path = os.path.join(os.path.dirname(atlas_file), current_image)
                if os.path.exists(image_path) and Image.open(image_path).size != correct_size:
                    print(f"缩放 {image_path} 到 {correct_size} ...")
                    resize_image_nearest(image_path, correct_size, image_path)
                current_image = None
                correct_size = None

print("处理完成。")

EOF
1 个赞

2023 12 24项目好像炸了

我记得年初时候NTool还在更新,到现在DMAC下架就没有再发布了
而英文社群卖改图的人还在更新
等于是工具借机转成付费私下发布了吧
当时只下了个客户端没有看源码有点遗憾 虽然水平有限 大概率也看不懂

240206更新以后老文件的编码也换了
听说新文档又多了一种4