• 한국어
  • skin의 engin성능과 기타 질문

  • Modificato
Related Discussions
...

안녕하세요, 몇 가지 질문이 있습니다.

spine 사용자 가이드와 forum을 통해 궁금한 것에 대한 정보를 얻었습니다.
그러나 아직 프로그래머가 없는 상태이기 때문에, 프로젝트를 계획하는 것에 한계를 느꼈습니다. 저의 프로그래밍 지식도 낮습니다. 🙁
그래서 도움을 받고자 질문을 합니다.

(애니메이션은 같고, 색상이나 형태가 비슷한) 베리에이션 캐릭터를 unity engin에 효율적인 성능으로 배치하고자 spine에서 제공하는 skin 기능을 사용하려고 합니다.
그런데 이것에 대해 고민하고 있습니다. 'skin을 사용하는 것이 unity 성능에 효율적인가?' (용량, 성능....)

-성능에 대한 질문-
예를 들어,
A - skeleton 1개, skin 5개 = atlas 10241024 .png 1장
B - skeleton 5개, skin 0개 = atlas 256
256 .png 5장
skin을 사용한 A-skeleton과 skin을 사용하지 않은 B-skeleton이 있습니다.

(1) A-skeleton을 unity에 10개 배치했을 때,
atlas .png는 1개만 불러오나요?
아니면 10개 모두 불러오나요?

(2) 그러면 'A-skeleton의 skin1' 만 배치했을 때에도
skin15를 포함하는 full size의 1024*1024atlas png를 불러오나요?
(나중엔 skin15를 모두 사용하지만, 당장 필요하지 않은 큰 이미지를 불러오는 것을 우려하고 있습니다.)

(3) 만약에 베리에이션 이미지가 더 추가되어
A의 atlas가 40964096size 커지고 (or 10241024 size 4개)
B의 skeleton이 20개로 많아진다면
둘의 성능은 많이 차이 날까요?

-spine과 photoshop에 대한 질문- (to be sure)
(4) http://esotericsoftware.com/spine-texture-packer#Regions
이 가이드의 [Strip whitespace X/Y] 설명은
Strip whitespace X/Y을 사용하여 export 했을 때,
untiy에 배치하고 skin을 바꿔도 흐트러지지 않고, spine편집기처럼 보인다는 말이 맞나요?

(5) Photoshop to Spine scripts.
photoshop layer에 vector mask를 적용하여 scripts로 내보내면
원하는대로 png의 공백을 재단할 수 있습니다. 이것은 의도된 것인가요?
https://github.com/EsotericSoftware/spine-scripts/tree/master/photoshop#photoshop-to-spine
이 링크에선 찾아볼 수 없었어요.
이 기능을 계속 사용하고 싶은데, 나중에 없어질까봐 걱정됩니다.

긴 질문 읽어주셔서 감사합니다 🙂

(1) A-skeleton을 unity에 10개 배치했을 때,
atlas .png는 1개만 불러오나요?
아니면 10개 모두 불러오나요?


(1) When 10 A-skeletons are placed in unity,
Only one atlas .png is loaded?
Or do you load all 10?

각 자산은 한 번만 로드됩니다.

API 참조 페이지에서:
"인스턴스 데이터는 각 스켈레톤 인스턴스에 대해 생성되고 스켈레톤의 포즈 및 기타 상태를 저장합니다. 설정 포즈 데이터는 상태가 없으며 스켈레톤 인스턴스 간에 공유됩니다. 여기에는 설정 포즈, 첨부 파일 및 애니메이션이 포함됩니다."


Each asset is loaded only once.

From the API reference page:
"The instance data is created for each skeleton instance and stores the skeleton's pose and other state. The setup pose data is stateless and shared across skeleton instances. It contains the setup pose, attachments, and animations."

(2) 그러면 'A-skeleton의 skin1' 만 배치했을 때에도
skin15를 포함하는 full size의 1024*1024atlas png를 불러오나요?
(나중엔 skin15를 모두 사용하지만, 당장 필요하지 않은 큰 이미지를 불러오는 것을 우려하고 있습니다.)


(2) Then, even when only 'A-skeleton skin1' is placed
Load full size 1024*1024atlas png including skin1-5?
(I will use all skin15 later, but I am concerned about loading large images that are not needed right now.)

텍스처의 일부만 로드하는 방법은 없습니다. 항상 전체 텍스처가 한 번에 로드됩니다. 1024x1024는 실제로 큰 것으로 간주되지 않으며 문제를 일으키지 않습니다.


There is no way to load only parts of a texture. Always the full texture will be loaded at once. Please note that 1024x1024 is not really considered large and will not pose any problem.

(3) 만약에 베리에이션 이미지가 더 추가되어
A의 atlas가 40964096size 커지고 (or 10241024 size 4개)
B의 skeleton이 20개로 많아진다면
둘의 성능은 많이 차이 날까요?


(3) If more variation images are added
A's atlas grows by 40964096size (or 10241024 size 4 pieces)
If B's ​​skeleton increases to 20
Will there be much difference in performance between the two?

일반적으로 대상 장치의 성능을 항상 측정해야 합니다(디버그 빌드가 아닌 릴리스 빌드 사용). 일반적으로 4096x4096 아틀라스 텍스처가 있는 단일 스켈레톤의 비용은 128x128 스켈레톤 20개보다 낮을 것으로 예상합니다. 그러나 설정 및 대상 하드웨어에 따라 크게 다릅니다.

하나의 4096x4096 텍스처와 4개의 작은 텍스처에 관하여: 4개의 1024x1024 텍스처가 아니라 16개이므로 4개의 2048x2048 텍스처를 의미한다고 가정합니다. 여기에서 단일 4K 텍스처는 4개의 더 작은 텍스처가 훨씬 더 많은 드로우 콜로 이어지기 때문에 성능 면에서 더 나은 것 같습니다. 다시 말하지만 대상 장치에 따라 다르며 성능을 테스트하고 둘 다 비교한 후 결정해야 합니다.

추가 참고 사항: 설명된 대로 텍스처 A,B,A,B,A,B,A,etc 간에 항상 번갈아 가며 그리기 순서로 인해 불필요한 텍스처 전환(추가 그리기 호출)을 피하는 것이 좋습니다. 여기:
spine-unity Runtime Documentation: Material Switching and Draw Calls


In general you always need to measure performance on the target device (using a release-build, not a debug build). I would in general estimate that the cost of a single skeleton with a 4096x4096 atlas texture will be lower than 20 128x128 skeletons. It heavily depends on your setup and your target hardware however.

Regarding one 4096x4096 texture vs 4 smaller textures: You will not have 4 1024x1024 textures but 16, so I assume you meant 4 2048x2048 textures instead. Here a single 4K texture is likely better performance wise, since 4 smaller textures will lead to a lot more draw calls. Again, it depends on your target device and you should test the performance and decide after comparing both.

An additional note: It is much recommended to avoid unnecessary texture switches (which are additional draw calls) due to draw order alternating between texture A,B,A,B,A,B,A,etc all the time, as described here:
spine-unity Runtime Documentation: Material Switching and Draw Calls

-spine과 photoshop에 대한 질문- (to be sure)
(4) Texture packing - Spine User Guide: Regions
이 가이드의 [Strip whitespace X/Y] 설명은
Strip whitespace X/Y을 사용하여 export 했을 때,
untiy에 배치하고 skin을 바꿔도 흐트러지지 않고, spine편집기처럼 보인다는 말이 맞나요?

유감스럽게도 기계 번역이 적절한 번역을 제공하지 못했습니다. 불행히도 이 질문을 이해하지 못합니다. 다르게 설명해 주시겠습니까?
I'm afraid machine translation failed to provide a proper translation, I don't understand this question unfortunately. Could you please describe it differently?

(5) Photoshop to Spine scripts.
photoshop layer에 vector mask를 적용하여 scripts로 내보내면
원하는대로 png의 공백을 재단할 수 있습니다. 이것은 의도된 것인가요?
https://github.com/EsotericSoftware/spine-scripts/tree/master/photoshop#photoshop-to-spine
이 링크에선 찾아볼 수 없었어요.
이 기능을 계속 사용하고 싶은데, 나중에 없어질까봐 걱정됩니다.

긴 질문 읽어주셔서 감사합니다 🙂


(5) Photoshop to Spine scripts.
If you apply a vector mask to the photoshop layer and export it as scripts,
You can trim the whitespace in the png as you like. Is this intentional?
https://github.com/EsotericSoftware/spine-scripts/tree/master/photoshop#photoshop-to-spine
I couldn't find it on this link.
I'd like to keep using this feature, but I'm worried it'll be gone in the future.

저는 프로그래머일 뿐이므로 질문을 아티스트에게 전달할 것입니다. 나중에 답장을 받아야 합니다.
As I'm only a programmer, I will forward the question to our artists. You should receive a reply later.

안녕하세요 5번문제 자동번역도 잘 안되는것같아서 죄송합니다. 가능하면 명확히 해주십시오.
Hi, I'm afraid that the automatic translation of question number 5 also isn't great. Please clarify if possible.

스크립트는 공백 제거 시 벡터 마스크를 고려하지 않습니다. 이 작업을 수행해야 합니까?
The script does not take vector masks into account when white space stripping, are you requesting that it should do this?

(4)에 관해서입니다만, 파파고로 번역을 해보니 무슨 말인지 이해가 갑니다. Strip whitespace X/Y와 함께 내보낸 골격은 Spine 편집기에서 보는 것과 동일한 모양으로 Unity로 가져올 수 있습니다.

Regarding (4), as far as I tried to translate with Papago, I can understand what you are asking. Skeletons which are exported with Strip whitespace X/Y can be imported into Unity with the same look as it looks on the Spine editor.

답변해주셔서 감사합니다, Spine team!

홈페이지 가이드의 프로그래밍 내용을 이해할 수 없었는데, 궁금한 것에 대해 프로그래밍 자료들을 링크해주셔서 이해하는데 도움이 되었습니다. 그리고 제가 생각하지 못했던 것을 알려주셔서 고마워요. 😃

(4)번은 Misaki가 답변해주셨네요! 감사합니다.

알아볼 수 없는 질문(5)를 다르게 적어봅니다.
(5-1) 우선 vector mask를 사용하려는 이유입니다.
skin attachment의 애니메이션을 재활용하기 위해서. (mesh-animation, wight, attachment-on/off….)
(ex)애니메이션이 완성된 [스킨1]을 복사 -> 복사된 [스킨2]의 이미지 경로 변경 = 내가 조정하지 않아도 완성되어있는 [스킨2]!

이미지 경로를 바꿨을 때, 이미지가 본의 같은 위치에 있기를 원합니다. 그러러면 같은 이름의 이미지는 같은 사이즈여야 합니다.
(If I change image folder(path), want image same position of bone. Then same name of images should be same size)

(5-2) 그리고 scripts를 사용해서 자동으로 내보낼 수 있으면 작업시간이 줄어들 수 있어 좋죠.
그래서 vector mask를 사용하여 공백을 재단하려고 합니다.

그런데…… 파일을 첨부하려고 다시 실험해보니 이것은 작동하지 않았습니다. 전에는 저의 착각이었던 것 같습니다. :scared:
질문이 달라졌습니다... 위와 같은 이유로 이 기능이 있으면 좋을 것 같은데 어떻게 생각하시나요?

질문을 자세히 설명해 주셔서 감사합니다! 과거에 거의 동일한 질문이 게시되었으며, 이 스레드가 도움이 될 것이라고 생각합니다:
Thanks for elaborating on your question! Almost the same question was posted earlier, and I think you will find this thread helpful:
Issues with linked meshes + photoshop script, please help!

안타깝게도 현재는 PhotoshopToSpine을 사용하여 layer/vector 마스크로 트림 경계를 지정할 수 없습니다.
Unfortunately, it is currently not possible to specify the trim bound by layer/vector masks using PhotoshopToSpine.

위의 스레드에서 언급한 바와 같이 몇 가지 해결 방법이 있습니다.
As mentioned in the thread above, there are several workarounds.

개인적으로 가장 쉬운 것은 트림 경계를 정의하는 그룹 내에 쉐이프 레이어를 만들고 레이어 불투명도를 1%로 설정하는 것입니다.
What I personally find easiest of them is to create a shape layer within the group that defines the trim bound, and set the layer opacity to 1%.

다행히 거의 투명한 픽셀은 Strip white space X/Y를 활성화한 상태에서 Alpha threshold 값을 조정하여 Spine 편집기에서 텍스처 아틀라스로 내보낼 때 트리밍할 수 있습니다. 예를 들어 Alpha threshold3으로 설정하면 Alpha 값이 3 미만인 픽셀이 제거됩니다.
Fortunately, such nearly transparent pixels can be trimmed when exported from the Spine editor as a texture atlas by adjusting the Alpha threshold value with Strip whitespace X/Y enabled. For example, if the Alpha threshold is set to 3, pixels which have Alpha value less than 3 will be stripped.

참고가 되었으면 좋겠습니다!
I hope this will help you!

아 이미 같은 문제가 있었군요. 링크를 찾아주셔서 고마워요!

해결 방안을 봤는데 모두 손이 많이 가네요. 아무래도 당장은 이 부분에 있어서 빠르게 작업할 수 없는 것 같군요. :tear:

Misaki ha scritto

질문을 자세히 설명해 주셔서 감사합니다! 과거에 거의 동일한 질문이 게시되었으며, 이 스레드가 도움이 될 것이라고 생각합니다:
Thanks for elaborating on your question! Almost the same question was posted earlier, and I think you will find this thread helpful:
Issues with linked meshes + photoshop script, please help!

해당 thread에서 Waarten님이 스크립트를 수정하였다고 했는데, 그 스크립트는 공유되지 못했나요?

네이트에게 Waartan의 대본이 공유되었는지 물어봤는데, 결국 공유되지 않았다고 합니다.
I asked Nate about whether the Waartan’s script was shared, but he said it was not shared after all.

PhotoshopToSpine은 점차적으로 발전하고 있으니 앞으로의 업데이트를 기대해주시기 바랍니다.
PhotoshopToSpine is gradually improving, so we hope you will look forward to future updates.

아 그렇군요
언제나 당신들의 친절하고 자세한 답변 고마워요.
앞으로 PhotoshopToSpine를 기대하고 있겠습니다!
좋은 하루 보내세요

Ah, I see
Thank you for your kind and detailed replies as always.
Looking forward to PhotoshopToSpine in the future!
Have a nice day :yes: