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.

]]>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 🙂

]]>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

]]>The small exercises to reinforce the concepts are a big win.

Consider doing something like this on Udemy.

Cheers

b

Good point. I’ve added the explicit units. Thanks.

]]>One small comment, for whatever reason I was confused for a while by “You can see that the cosine curve basically is the sine curve shifted to the left by 90^\circ, or \frac{\pi}{2}.”. It might be slightly more clear for dotards such as myself if you explicitly state that this is in radians, even if you did earlier state that omitting degrees implies this.

]]>Thanks for the feedback! I will keep this in mind when writing future tutorials.

]]>