投稿記事

2020年 09月の記事 (2)

とびだせ!


こんにちは、
皆様いかがお過ごしでしょうか。
私は元気です。

最近冷凍バナナにハマってます。
アイスよりも安いですし、アイスよりも健康に良い(はず)なので罪悪感も無くて良いですね。
普通に置いとくと直ぐ熟れてしまいますが、冷凍しておけば保存が効くのもGOODです。

最近の作業状況のご報告です。

セール中です

現在、前作「はーれむ・とりがー!!」は半額セール中です!
DLsite 販売ページ

DLsiteはサマーセールということで他サークル様の作品もセール中のようです。
DLsite サマーセール

ぜひこの機会にお手にとっていただけますと幸いですー。

なんのゲームを作ってるの?

・何を作ってるの?
→江戸を舞台にした3DのFPSのゲームを作っています。
→Mな男の人むけのえっちなゲームです。
→完成は2020年~2021年あたりです(まだかなり時間がかかる見込みです)

・ブログの更新は、毎月のはじめ頃の月1回更新を予定しています。
→しばらく上旬、中旬の2回更新してみます

= This article has an English translation at the bottom. =

フォロワー以上限定無料

無料プラン限定特典を受け取ることができます

無料

この記事が良かったらチップを贈って支援しましょう!

チップを贈るにはユーザー登録が必要です。チップについてはこちら

恋だったのかもしれない


こんにちはー

皆様いかがお過ごしでしょうか。
前回の記事で胸がメッチャ痛いと書いたのですが、病院で色々検査してもらってきました。
結果、どの検査の結果も健康そのものだったので、何もわかりませんでした。しかも検査が終わったら痛みも無くなりました…
ナゾすぎる(´・ω・`)

お医者さんには「引っ越ししたならそのストレスとかじゃない?」と言われました。(´・ω・`) 思い返すと4月に引っ越しをしてから、新しい環境や昨今の社会情勢もありちょっと緊張が続いていたのかもしれません。
でも最近は元気です!

あとこちらのブログですが現在、月初めの1回更新をしていましたが、最近ちょっと頻度が低すぎるように感じているので月2回更新にしてみようかと思います。(筆が遅く、書くのにそれなりに時間がかかってしまっているので、もし1回更新に戻ってたら察してくださいませ…)

セール中です

現在、前作「はーれむ・とりがー!!」は半額セール中です!
DLsite 販売ページ

DLsiteはサマーセールということで他サークル様の作品もセール中のようです。
DLsite サマーセール

ぜひこの機会にお手にとっていただけますと幸いですー。

なんのゲームを作ってるの?

・何を作ってるの?
→江戸を舞台にした3DのFPSのゲームを作っています。
→Mな男の人むけのえっちなゲームです。
→完成は2020年~2021年あたりです(まだかなり時間がかかる見込みです)

・ブログの更新は、毎月のはじめ頃の月1回更新を予定しています。
→しばらく上旬、中旬の2回更新してみます

= This article has an English translation at the bottom. =

最近の作業内容

表情アニメーション


女の子モデルの表情が変更できるようになりました。
女の子のモデルは有償の素材を使用させていただいておりますが、ありがたいことに表情の差分が60種類くらいついてます。
その60個の表情をBlender(3DCGソフト)でアニメーションできるよう、セットアップする必要があり作業をしておりました。

画像の小さい□を動かすと女の子の表情が変わります、
なにぶん表情の種類が多いため、どう作業を進めて良いのかと手をこまねいていた分野だったのですが、結局頑張って手作業で作りました。(ツールとか作って楽しようかと思ったのですが、それもどう作って良いのかわからず…w)

大変でしたが、結果的には手作業で頑張って作って正解でした!ちゃんと動きました。
(´・ω・`)b

女の子アニメーション

表情アニメーションが作れるようになり、長かった女の子のモデルのセットアップが一通り完了となりましたので、アニメーションの作成に着手しました。


走るアニメーションやら


チラチラそわそわしてるアニメーションやら



あんなのや、こんなのを作りました。

表情が豊かなのでイイ感じです
(´・ω・`)b 自分で作りつつ作品として出来上がっていくのが楽しみですねー

生じた問題

作品を生み出すのに、万事スムーズとは行かないもので問題も生じておりました。
前作でもあったようなプレイヤーが女の子に捕まった時のアニメーションのテストをしていました。(捕まるモーションはCQCと呼んでいます。「ちょっと急に近いよ!」の略ですww)

Blender(3DCGソフト)で作ったアニメーションをUnity(ゲームエンジン)で使えるように変換を行うのですが、その変換がめちゃくちゃ遅いんです…!
前作では3DCGソフトにMayaLTを使っていたのですが、MayaLTでは遅くても5分程度で終わっていたアニメーション変換処理が、Blenderでは40分かかります…

アニメーション変換作業はBlenderで作ったあと変換してUnityで確認して、修正箇所があればBlenderに戻って修正して変換してUnityで確認というのを何回も繰り返すので、変換するたびに40分待ちでは作業になりません…

40分かかる事に気付いた時は少し寝込みました…w
Blenderでずっと勉強してセットアップしてきたのは何だったのか…となりましたし、MayaLTをまた買ってきて1ヶ月くらいかけてセットアップしなおす…のか…?
(´・ω・`) やべーよ

と思っていたのですが。自作ツールでゴチャゴチャやった結果、40分掛かっていたのが80秒まで短縮ができました!!!!!
流石に自分でも驚きました。前作での MayaLTでの変換よりも早くなるとは…!コレはアニメーション作るの楽になるで
(´・ω・`)b

高速化のために何をしたのかちょっと専門的になるので書くか悩んだのですが、同じような事で悩んでいる方がいらっしゃるかもと思い書かせていただきました。
Blenderを使ってる人にしかわからない内容なので、わからなければスルーしてくださいませ
m(_ _ )m
===== ここから =====

私の環境では、Blenderからのアニメーション出力はFBX形式でエクスポートしています。ネット上で調べる限りでは同じようにBlenderでの3Dモデルのインポート・エクスポートの処理が遅いと書かれている情報を見ることができました。Pythonというインタプリタ言語でインポート・エクスポート処理が書かれている以上、速度的にコンパイラ言語に遠く及ばないという課題があるようです。残念ながらネット上ではこれといった対策を見つけることはできませんでした。
アニメーションを作るのに少し特殊な使い方をしているので対策も限定的ですが、アニメーション出力時の時間を短縮する方法をいくつか見つけましたので記載します。(詳細な実装については公開できるような整理ができておりませんので割愛させていただきます。)

私の環境では、1つのブレンダーファイルで4人のキャラクターが同時にアニメーションをするアニメーションを作っています、この4人のキャラクターを1人づつFBXに変換しUnity上で同時に再生することで4人同時にアニメーションするよう実装しています。
100秒のアニメーションの出力に10分x4人で40分の処理時間が掛かってしまっていました。

1個目の対策は、Blenderをバッチモードで起動し4人のキャラクターを同時に変換処理するというものです。
WindowsバッチファイルとBlenderPytnonを使用しBlenderの1プロセスが1キャラクターを変換する処理が4つ同時に走るよう実装しました。
これにより4キャラクターの変換処理は合計10分で完了するようになりました。
BlenderのPythonはおそらくマルチコアに対応するような実装にはなっていないだろうという推測により試作しましたが、4つ同時に処理しても時間が変わらないという、予測よりも大きな成果が得られました。

2個目の対策は、不要なメッシュ、アーマチュアを削除するというものです、
4キャラクターの内の1人を出力するのに、他の3人はアニメーションに関係ないので、変換する前に削除します。
また1人のモデルの中でもアニメーションに不要なメッシュを削除します。そもそも服や髪の毛といったブレンドシェイプアニメーションを含まないメッシュはUnity上でアニメーションするのに不要ですので、アニメーション変換時の対象にしていなかったのですが、高速化に寄与したのはメッシュを出力対象にしない事ではなく削除することでした。
こちらは1個目の対策で作成したバッチ処理時にメッシュ、アーマチュアが削除されるよう実装しました。
これにより10分の処理時間が80秒まで短縮することがでできました。(なぜアニメーションに関係ないアーマチュアやメッシュが処理時間に大きな遅延を生じさせているのか正直解せない部分ではありますが…)

==== ここまで ====


まとめ

以上が、最近の作業状況でした。

記事が短めになってしまいましたが、Blenderのアニメーション変換処理の最適化に多くの時間が取られてしまった感じですね…。結果として作業環境を大きく改善することができたので将来的に時間のお釣りが来るハズ…ハズ

女の子のアニメーションなどどう感じられましたでしょうか?コメントなどで教えてね (´・ω<)-☆
========================================

いつもたくさんの 「☆いいね!」 ありがとうございます。
大変励みになっております。

楽しんで頂けましたら是非、「☆いいね!」 お願い致します。

========================================



ENGLISH=============

Maybe it was love.


How is everyone doing?
I wrote in my last post that my chest hurts like crazy, and I've been to the hospital to get some tests done.

The results showed nothing wrong with the test results.
Once the test was done, the pain was gone...
It's too riddle. (´・ω・`)

The doctor told me "If you've moved, isn't that stress or something?"
(´・ω・`) Looking back, I think I may have been a little nervous since I moved in April, due to my new environment and the current social situation. But lately I'm fine!

Also, this blog is currently being updated once a month, but
I think I'll try to update twice a month, as it feels a bit infrequent.
(My writing is slow and it's taking me quite a while to write, so consider that if I had to go back to updating once, it would have been hard...)

On Sale.

Currently, the previous work "Harem Trigger!!" is on sale for half price!
DLsite sales page

DLsite is having summer sale, so other circles' works are also on sale.
DLsite Summer Sale

I hope you'll take the opportunity to try out the work!


What game am I making?

→I'm making a 3D FPS game set in Edo (Old Japan).
→It's a naughty game for masochistic men.
→It is expected to be completed between 2020 and 2021 (it is still expected to take a long time).

I plan to update the blog once a month at the beginning of each month.
→I'll try to update twice a month for a while, early and middle of the month


The previous "Harem Trigger! is now on sale at various sales sites.
Trial versions are also available, so please try them out!

DLsite Store page
FANZA(DMM) Store page


Recent Work.

Expression Animations


I can now change the facial expressions of the girl models.
I have been using paid materials for the girl models, but thankfully, there are about 60 different expressions included.
I needed to set up the 60 facial expressions in Blender (3DCG software) so that I could animate them.


If I move the little square in the picture, the girl's face will change.
There are many kinds of facial expressions, so I had no idea how to make them, but I ended up making them manually. (I thought about making a tool to make it easier, but I didn't know how to make that either...)

It was a lot of work, but in the end, I did my best to make it manually and it turned out to be the right thing to do! It worked properly.
(´・ω・`)b

Girl Animations

I was able to create the facial expressions and now that the long girl model setup was complete, I started to create the animation.


Running Animations


And the animation of fidgeting and fidgetings.



I made such and such.

She's so expressive, it's a nice touch.
(´・ω・`)b I'm looking forward to creating my own work!

The problem that arose.

It is not always a smooth process to create a work, and problems have arisen.

I was testing the animation when the player was caught by the girl, like the previous game.
(The animation for getting caught by a girl is called CQC.) It stands for 「ちょっと急に近いよ」(CyottoQuuniChikaiyo. "It's a little close fast!")

I made an animation in Blender (3DCG software) and converted it to be able to use in Unity (game engine), but the conversion is very slow...!
I used MayaLT as my 3DCG software in my last work. In MayaLT, the conversion is done in 5 minutes at the latest.
But in Blender, it takes 40 minutes...

I created the animation conversion in Blender, converted it, checked it in Unity, and if there is a correction point, I went back to Blender, corrected it, converted it, and checked it in Unity, and repeated it many times.

I fell asleep for a bit when I realized it would take 40 minutes... w
I've been learning and setting up in Blender for a long time... and now I should get MayaLT again and set it up again for a month or so...
(´・ω・`) Oh, man, this is bad.

I thought it would be the worst. After messing around with my homemade tool, I was able to cut down the time from 40 minutes to 80 seconds!!!!
I was surprised even by myself. I didn't think it would be any faster than the conversion in MayaLT in the previous work...! It's going to be a lot easier to make an animation.

I was wondering whether I should write a countermeasure for this article or not, but I thought there might be someone who is suffering from the same problem.
It's a technical subject, so if you don't understand it, please go through it.
m(_ _ )m
~~~ From here ~~~

In my environment, the animation output from Blender is exported in FBX format. When I looked online, I found the same information about the slow import/export process of 3D models in Blender.
Since the import/export process is written in Python, an interpreter language, it seems that the issue is that it is not as fast as the compiler language. Unfortunately, I have not been able to find any specific measures on the internet.
I've found some ways to shorten the animation output time, and I'll describe them here. (I'll spare you the details of their implementation, as I'm not ready to publish them yet.)

In my environment, I'm making an animation of 4 characters animating at the same time in one blender file, and I'm implementing it by converting these 4 characters to FBX and playing them back on Unity at the same time.
The output of a 100-second animation took 10 minutes x 4 people. so 40 minutes of processing time.

The first solution was to start Blender in batch mode and convert all 4 characters at the same time.
It uses Windows Batch File and BlenderPytnon to convert one character in one process in Blender. It is implemented to run 4 of them simultaneously.
The conversion process for the four characters now takes a total of 10 minutes.
I predicted that Python probably wasn't going to be implemented in a way that would support multiple cores, so I prototyped it, and the results were greater than I had predicted, with the time remaining the same for four simultaneous operations.

The second solution is to remove unnecessary meshes and armatures
To output one of the four characters, I delete the other three before I convert them because they are not relevant to the animation.
It also removes meshes that are not needed for animation even within a single model. Meshes that don't include blendshape animations, such as clothing and hair, are not needed to animate in Unity.

I didn't include them in the animation conversion, but what helped speed up the process was removing them, not disabling them in the output.
I have implemented a mesh and armature to be removed during batch processing that is first solution.
I was able to reduce the processing time from 10 minutes to 80 seconds.
(To be honest, it's hard to understand why non-animation related armatures and meshes cause such a large delay in processing time...)

==== Up to here ====

Summary

That's what I've been working on lately.

I know this is a short article, but I feel like a lot of time has been spent on optimizing Blender's animation conversion process... As a result, I was able to improve the work environment, so it will be more than enough time to make a change in the future.

How did you feel about the girl's animation, etc.? Let me know in the comments!

========================================

Thank you for always many " Good! (★いいね!) " I am very motivated.
If you enjoy the article, please press " Good! (★いいね!) "

========================================


いつも画面下部までお越しいただきありがとうございます。いつも沢山のイイね!コメントありがとうございます。とてもモチベーションになっております。
是非軽率にイイね!コメントよろしくおねがいしますm(_ _)m
Thank you for visiting the bottom of the screen. Thank you for a lot of Good! comments! It's very motivating.Feel free to Good and comments. m(_ _)m

この記事が良かったらチップを贈って支援しましょう!

チップを贈るにはユーザー登録が必要です。チップについてはこちら

月別アーカイブ

記事を検索