#mpm

#ゲーム開発, #自作エンジン, #流体シミュレーション, #gameengine, #MPM, #EulerianFluid これは、私の2Dゲームエンジンの開発ログの続きです。 Here's a bit more on the development of my 2D game engine. 最初は「巨大娘ゲームに必要なものにフォーカスしよう」というアイデアだったのですが、途中から「まずは汎用的なエンジンを作って、その後に巨大娘ゲームを作ってみて何が足りないか確認しよう」という方向に変わってきました。 At first, my idea was that "let's focus on all the stuff we need for a giantess game", but then it became more like "let's first create a general purpose engine and then try to create a giantess game and see what is missing". 以前にはすでに、マテリアルの異方性(anisotropy)サポートを追加しており、これによって裂けや物理的な損傷をうまくシミュレーションできるようになっています。 Previously, I already added anisotropy support for materials, allowing for more realistic simulation of tearing and physical damage. 裂けだけでなく、燃焼や加熱といった熱的な表現も実装しており(肉の表面がパリッとしたり、パンがふっくらしたりするなど)、ただ、これらはやや見た目に分かりづらく、意図的にそうした変化が分かるシナリオを用意しないと気づきにくい部分があります。 In addition to tearing, I’ve also implemented thermal effects such as burning and baking (for example, meat developing a crispy surface or bread becoming fluffy), but these are somewhat subtle visually and can be hard to notice unless they’re placed in scenarios specifically designed to highlight these effects. そこで「せっかくなら武器も物理的にモデル化してみよう」と思い、あらかじめ決められた演出シーケンスを使う代わりに、爆弾を「燃焼時に大量のガスと熱を放出する物質を気密な容器に封入したもの」として扱っています。これにより、爆発したり、(開口部を設けた場合には)自ら推進したりするようになります。 So I thought, “why not also try modeling some weapons physically?” Instead of relying on pre-defined scripted sequences, I treat bombs as materials that release large amounts of gas and heat when burning, sealed inside airtight containers. This allows them to either explode or self-propel (if an opening is introduced). さまざまな種類の武器について資料を読み込みました。例えば、HEAT(対戦車榴弾)、APFSDS(装弾筒付翼安定徹甲弾)、HESH、クレイモア、そしていくつかの推進式の兵器などです。それぞれの内部的な仕組みにできるだけ忠実になるようにしています。 I read through documentation on various types of weapons, such as HEAT (High-Explosive Anti-Tank), APFSDS (Armor-Piercing Fin-Stabilized Discarding Sabot), HESH, Claymore, and some rocket-based weapons. I tried to stay true to their internal mechanics. これらの中には、発射後に信管が作動するまでにわずかな時間が必要なものもあり、早すぎるタイミングで何かに衝突すると爆発せず、そのまま壊れてしまいます。こうした挙動は、特定の条件をハードコードしているわけではなく、すべて物理シミュレーションの結果として自然に現れるようになっています。 Some of them require a short arming time after firing, meaning that if they impact too early, they won’t detonate and will simply break. In my case, this behavior isn’t hard-coded. It emerges naturally from the physical simulation, without explicitly telling the engine when a weapon is “armed.” This matches how they behave in reality. 爆発を物理的に扱うのは思っていた以上に難しいことが分かりました。ご覧の通り、まだいくつか明らかな不具合があります。特定の場所が過度に高温になったり、熱が非常に鋭い角に達したりすると、非物理的に持続する熱気の発生源ができてしまうことがあります。おそらく、空気と固体のカップリングの扱いに問題があるように思います。 It turns out modeling the explosions physically is a much bigger challenge. As you can see, this still has some obvious glitches: when some areas get too hot or when the heat reaches some really sharp corners, this can create non-physical, permanent sources of hot air. I think there's something wrong with the way I handle air-solid coupling. 考えてみると、これも完全に的外れというわけではないかもしれません。小人側が巨大娘に対抗する手段として使えるかもしれませんし(w) Thinking about it, this might not be completely off-topic after all — the tinies could use these weapons against the giantesses xD これを修正したら、また巨大娘関連の要素に戻って、動かせる足を作って、いろいろなものとインタラクトさせてみたいと考えています。 After I fix this, I might go back to actual giantess stuff, probably make a movable foot and have it interact with things.
微分可能多様体12,017 görüntüleme • 6 ay önce
Daha fazla içerik yok.