This member has provided no bio about themself...

Report RSS Kawaii Physics Plug-in Integration

Posted by on

Physics in《Drifting》

Kawaii Physics Plug-in Integration

Physic simulation plays a critical part in fast-paced games, the outcome of the physics engine needs to be stable and efficient and more importantly, provide comparable results under different framerates.

In the past, I've been struggling with UE4's physic engine, mainly because the protagonist traverse in such a high speed (up to 4500uu per second), the UE4 physics engine simply could not provide reliable result under this circumstance (mesh stretching and/or twitching occasionally appears); to make matter worse, there are noticeable discrepancies between PIE and shipping build simulation result, which makes it harder for me to adjust physic parameters accordingly.

The only choice for me was to turn on physic-substepping and remedy the stretching issue as best as I can (Max Substep Delta Time = 0.003, Max Substeps = 3 ) and pay the price of CPU overhead. However, even then, the outcome is still not stable enough. Additionally, enable substepping causes the CPU to become the bottleneck on lower-end machines and since APEX destruction is not fully supported with substepping (random crashes occur correlated with smaller substep delta time) I have to pre-destruct all of the destructible meshes in third-party software and abandon APEX destruction altogether.

A few months ago, I accidentally found out this Kawaii Physics plug-in and the video demonstration looks solid enough for me to consider using it for my project. Although the plug-in was built for UE4.20, I was able to integrate it into UE4.16 without too much effort.

The plug-in is just as powerful as the author demonstrated, in terms of ease of use, iteration time, performance gain, the plug-in simply solves all of the issues I struggled with previously, additionally, I found no noticeable discrepancies between PIE and packaged build, which is a big relief for me.

kawaii cheer


Here is a big THANK YOU to the kawaii physics plug-in author @pafuhana1213, and I hope you enjoy this week's update! :3


Post comment Comments
gorillaknuckles
gorillaknuckles - - 2 comments

Kawaii is amazing. I'm wondering if you know of any english documentation or tutorials for it?

Reply Good karma Bad karma+2 votes
rit2040 Author
rit2040 - - 61 comments

Hello gorillaknuckles,

I apologize for the late reply.

I haven't found any tutorial videos or detail documentation for this plugin, the closest I found is the author's post on UE4 forum:

Forums.unrealengine.com

However, if you are using UE4.20~23 installing the plugin shouldn't be any more complicated than copy the plugin to the correct folder and enabled it in the project setting menu in the editor.

If you are looking to integrate the plugin via code (if your UE4 vesion is less than UE4.20 ), there is a github page:

Github.com

where the author uploads his source code for people to download and integrate it into their own project.

I hope this information could help you get started with kawaii physics!

Have a productive weekday! :)

Reply Good karma+1 vote
gorillaknuckles
gorillaknuckles - - 2 comments

Thank you, ok that is what I found so far. It is easy to implement - I was looking for more details on different settings, but I can figure it out.

Your work looks incredible, thanks for posting updates - its inspiring! It was your post that lead me to Kawaii actually - so double thanks!

I'm wondering one thing that I thought you might have discovered: does your character ragdoll? My testing has led me to believe Kawaii is disabled when enabling traditional ragdoll in UE (Set all bodies simulate). This is fine, but if we could enable Kawaii during a ragdoll it would look superior/be easier than using PHat bodies.

Reply Good karma Bad karma+2 votes
rit2040 Author
rit2040 - - 61 comments

Hello gorillaknuckles,

Thank you for your kind words. =)

Yes, I use ragdoll for my character and thank you for mentioning the issue because I didn't notice kawaii physics stop working after the physic simulation is enabled. XD

I don't know a total solution for this issue, the only two things I could come up with to remedy this issue is:

1. use physic blend weight to specify how much physic simulation with kawaii physic feature (not tested but should work in theory)

2. only enable physic simulation on bones that are children of the kawaii physic bones (not applicable to every situation)

For my project, since the protagonist only uses ragdoll physic when she dies - which took only 1 to 2 seconds before the screen turns white - players probably wouldn't notice the difference immediately.

Reply Good karma+1 vote
Guest
Guest - - 688,627 comments

Thank you for the tips! I look forward to playing Drifting when it is released!

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: