Advertise with Googlier.com Comments for Ming-Lun "Allen" Chou | 周明倫 https://allenchou.net Gamedev Stuff | 遊戲開發二三事 Wed, 25 Feb 2026 21:07:50 +0000 hourly 1 Comment on Game Physics Series by Rim https://allenchou.net/game-physics-series/#comment-21612 Wed, 25 Feb 2026 21:07:50 +0000 http://allenchou.net/?page_id=2086#comment-21612 This series is a hidden gem! I’ve been dabbling in game physics on and off for decades now, but I’ve never come across such a coherent and clearly written explanation of these concepts. Came in for swing-twist, stayed for the physics 🙂

]]>
Comment on Game Physics: Collision Detection – CSO & Support Function by Allen Chou https://allenchou.net/2013/12/game-physics-collision-detection-csos-support-functions/#comment-21605 Wed, 01 Nov 2023 19:13:36 +0000 http://allenchou.net/?p=1839#comment-21605 In reply to SJ.

Yes.

]]>
Comment on Game Physics: Collision Detection – CSO & Support Function by SJ https://allenchou.net/2013/12/game-physics-collision-detection-csos-support-functions/#comment-21600 Fri, 13 Oct 2023 20:17:07 +0000 http://allenchou.net/?p=1839#comment-21600 Thank you. But I have a question.

In the last paragraph, the support function is mainly implemented in model spaces, is this just in terms of using it because many physics engines only keep model spaces in memory?

]]>
Comment on Game Physics: Resolution – Contact Constraints by Allen Chou https://allenchou.net/2013/12/game-physics-resolution-contact-constraints/#comment-21597 Tue, 20 Sep 2022 18:37:22 +0000 http://allenchou.net/?p=2004#comment-21597 In reply to Jay.

C_dot is expected to violate the constraint whenever the two objects are closing on one another. The velocity constraint JV + b >= 0 is only enforced when there’s actual penetration.

]]>
Comment on Game Physics: Resolution – Contact Constraints by Jay https://allenchou.net/2013/12/game-physics-resolution-contact-constraints/#comment-21596 Tue, 20 Sep 2022 13:09:07 +0000 http://allenchou.net/?p=2004#comment-21596 In reply to Allen Chou.

Thanks. The issue was my contact normal. I didn’t do the transformation correctly between by code and the 3d model code I’m working with (which is left handed).

I have one comment about the line C_dot : JV+b >= 0. Either I misunderstood something, or maybe there needs to be a clarification. It seems that if the contact normal always points from object A to object B then C_dot will always be less than 0 if the two objects are closing on one another (even when not making contact). There has to be something to flip the sign, like having the normal direct be scaled by the sign of the penetration depth.

]]>
Comment on Game Physics: Resolution – Contact Constraints by Allen Chou https://allenchou.net/2013/12/game-physics-resolution-contact-constraints/#comment-21595 Tue, 20 Sep 2022 05:41:01 +0000 http://allenchou.net/?p=2004#comment-21595 In reply to Jay.

Nothing immediately comes to mind. Unfortunately, I can only give the boring suggestion of stepping through the calculations to figure out where the upward velocity component comes from.

]]>
Comment on Game Physics: Resolution – Contact Constraints by Jay https://allenchou.net/2013/12/game-physics-resolution-contact-constraints/#comment-21594 Mon, 19 Sep 2022 17:48:35 +0000 http://allenchou.net/?p=2004#comment-21594 I implemented this method for multiple corners of a cube to prevent it from falling through the floor.

Most things seem to work well, however if I place the cube on an incline it will automatically slide UP the incline.

Any thoughts on where that sort of error might be?

]]>
Comment on Game Programming: Delayed Result Gathering by Allen Chou https://allenchou.net/2021/05/delayed-result-gathering/#comment-21592 Wed, 19 May 2021 06:04:43 +0000 http://allenchou.net/?p=6675#comment-21592 In reply to phalyce cheapdope.

You don’t have to update the entire exposure map all the time. And depending on the use case, there are better ways to implement and update exposure maps. The focus of this tutorial is not on exposure maps through; it’s about optimization techniques.

]]>
Comment on Game Programming: Delayed Result Gathering by phalyce cheapdope https://allenchou.net/2021/05/delayed-result-gathering/#comment-21591 Tue, 18 May 2021 15:57:41 +0000 http://allenchou.net/?p=6675#comment-21591 This is amazing, thanks so much. I’ve never heard of “Exposure Map & Exposure Avoidance” so this is blowing my mind.

one thing I’m not sure about, how would you scale that to work with a larger map? I presume it’s not going to be enough to check all “cells” in the map for distance to the player…
my best guess would be querying the map with a rectangle around the red cube ,in a similar fashion to querying a quad tree? (as in return all cells inside this rect)

thanks again 🙂

]]>
Comment on Game Math: Swing-Twist Interpolation (…Sterp?) by Martin https://allenchou.net/2018/05/game-math-swing-twist-interpolation-sterp/#comment-21589 Sat, 27 Feb 2021 20:41:11 +0000 http://allenchou.net/?p=4409#comment-21589 Interesting! Great with some example code because the papers on this are a bit tricky to read.

Can you elaborate some more on the singularity condition? I tried to implement something myself with the help of this and some other sources and I try to understand some more.

It depends on the software library you use, but provided it is Unity it seems that first you check the squared norm of the imaginary part? A square norm of zero on the imaginary part would imply an identity quaternion, or a N*360 degree rotation, which the “meat” of the algorithm already would handle implicitly by returning two identity quaternions, at least analytically speaking. Is this then for coping with numerical issues when being very close to identity perhaps?

If q is an identity quaternion, “Vector3 rotatedTwistAxis = q * twistAxis” should be a no-op. Then “Vector3 swingAxis = Vector3.Cross(twistAxis, rotatedTwistAxis);” will always be a zero vector.

That implies that swing will be returned as an identity quaternion, but twist on the other hand will be “// always twist 180 degree on singularity
twist = Quaternion.AngleAxis(180.0f, twistAxis); ”
a rotation of 180 degrees. But, it is there, so I guess it solves some problem?

Here is a thread wich a discussion on the subject: https://math.stackexchange.com/questions/4031687/singularity-of-swing-twist-decomposition

]]>