Shearing Matrices For Psychedelic Effects🤑
#RealTimeRenderingBook
#GraphicsProgramming
#GPU
#Shaders
#Math
#3D
#RealTimeRenderingBook
#GraphicsProgramming
#GPU
#Shaders
#Math
#3D
8.5.13 Advantages and Disadvantages of Quaternions (3D Math Primer Graphics and Game Development, Second Edition)
Quaternions offer a number of advantages over other methods of representing
angular displacement:
• Smooth interpolation. The interpolation provided by slerp provides
smooth interpolation between orientations. No other representation
method provides for smooth interpolation.
• Fast concatenation and inversion of angular displacements. We can
concatenate a sequence of angular displacements into a single angular
displacement by using the quaternion cross product. The same operation
using matrices involves more scalar operations, although which
one is actually faster on a given architectures is not so clean-cut:
single instruction multiple data (SIMD) vector operations can make
very quick work of matrix multiplication. The quaternion conjugate
provides a way to compute the opposite angular displacement very
efficiently. This can be done by transposing a rotation matrix, but is
not easy with Euler angles.
• Fast conversion to and from matrix form. As we see in Section 8.7,
quaternions can be converted to and from matrix form a bit faster
than Euler angles.
• Only four numbers. Since a quaternion contains four scalar values,
it is considerably more economical than a matrix, which uses nine
numbers. (However, it still is 33% larger than Euler angles.)
These advantages do come at some cost, however. Quaternions suffer
from a few of the problems that affect matrices, only to a lesser degree:
• Slightly bigger than Euler angles. That one additional number may
not seem like much, but an extra 33% can make a difference when
large amounts of angular displacements are needed, for example, when
storing animation data. And the values inside a quaternion are not
“evenly spaced” along the [−1,+1] interval; the component values do
not interpolate smoothly, even if the orientation does. This makes quaternions more difficult to pack into a fixed-point number than
Euler angles or an exponential map.
• Can become invalid. This can happen either through bad input data,
or from accumulated floating point roundoff error. (We can address
this problem by normalizing the quaternion to ensure that it has unit
magnitude.)
• Difficult for humans to work with. Of the three representation methods,
quaternions
#Math
#GraphicsProgramming
#Quaternions
Quaternions offer a number of advantages over other methods of representing
angular displacement:
• Smooth interpolation. The interpolation provided by slerp provides
smooth interpolation between orientations. No other representation
method provides for smooth interpolation.
• Fast concatenation and inversion of angular displacements. We can
concatenate a sequence of angular displacements into a single angular
displacement by using the quaternion cross product. The same operation
using matrices involves more scalar operations, although which
one is actually faster on a given architectures is not so clean-cut:
single instruction multiple data (SIMD) vector operations can make
very quick work of matrix multiplication. The quaternion conjugate
provides a way to compute the opposite angular displacement very
efficiently. This can be done by transposing a rotation matrix, but is
not easy with Euler angles.
• Fast conversion to and from matrix form. As we see in Section 8.7,
quaternions can be converted to and from matrix form a bit faster
than Euler angles.
• Only four numbers. Since a quaternion contains four scalar values,
it is considerably more economical than a matrix, which uses nine
numbers. (However, it still is 33% larger than Euler angles.)
These advantages do come at some cost, however. Quaternions suffer
from a few of the problems that affect matrices, only to a lesser degree:
• Slightly bigger than Euler angles. That one additional number may
not seem like much, but an extra 33% can make a difference when
large amounts of angular displacements are needed, for example, when
storing animation data. And the values inside a quaternion are not
“evenly spaced” along the [−1,+1] interval; the component values do
not interpolate smoothly, even if the orientation does. This makes quaternions more difficult to pack into a fixed-point number than
Euler angles or an exponential map.
• Can become invalid. This can happen either through bad input data,
or from accumulated floating point roundoff error. (We can address
this problem by normalizing the quaternion to ensure that it has unit
magnitude.)
• Difficult for humans to work with. Of the three representation methods,
quaternions
#Math
#GraphicsProgramming
#Quaternions
Ambient Occlusion is a Lighting technique in Graphics
You can see it your games settings 😊
#Settings
#Lighting
#GraphicsTechniques
#GraphicsProgramming
#AmbientOcclusion
You can see it your games settings 😊
#Settings
#Lighting
#GraphicsTechniques
#GraphicsProgramming
#AmbientOcclusion