MvtUtil: Load serialized mvt.RefVec (B64D -> BitPack -> RefVec)
ASTER::ACTION::MotionControl::MvtUtil: Decodes a Base64 string and loads the BitPack-decompressed mvt.RefVec.
MoveTowards:RefVec, one of the motion templates, utilizes the Reference Vector, which is the coordinate data that object instances selected as mvt.Pursuer refer to as target coordinates for movement.
This function restores a serialized Reference Vector back into its original data structure (C++ std::deque).
The input string used for data restoration is a Base64-encoded string.It represents a binary stream produced by converting a std::deque into binary form, compressing it with BitPack, and then encoding the result in Base64.To avoid excessive processing overhead, BitPack is used for compression, and Base64 decoding is accelerated using SIMD-based optimization techniques.
Relevant URL
- ASTER :: Expression :: MotionControl :: MvtUtil: GetStr mvt.RefVec : BitPack
-
ASTER :: Action :: MotionControl :: MoveTowards: RefVec
-
ASTER :: Action :: MotionControl :: MoveTowards: Re.Cyclic
-
ASTER :: Conditions :: MotionControl :: EvD: MvU: BEGIN moving moment
-
ASTER :: Conditions :: MotionControl :: EvD: MvU: CLOSE moving moment
-
ASTER :: Expressions :: MotionControl :: EvD: MvU: Retrieve CF25 animation dir based on movement dirs
-
ASTER :: Action :: JSON :: MvtUtil: Creat a JSON array exported from the Reference Vector
Parameter
ExStrB64RefVec( "ASTER" )Please send the serialized data as a “string value” from the Expression Editor, using “MotionControl::Expression::MvtUtil: GetStr mvt.RefVec : BitPack”.
"CQAAADwBAABWAAAAAL6+AL5Cvr4AAABCAL5CAEJCQg=="In the CF25 Expression Editor, two methods are available:
- Paste and submit a
Base64string directly. - Specify an external data reference to fetch the data.
However, the Expression Editor imposes a maximum pasteable string length, and the length of a Base64 string grows with the amount of coordinate data, which may exceed that limit. For this reason, it is recommend specifying an external data reference as a reliable way to send data without being affected by size restrictions.
When encoding the binary data of the Reference Vector to Base64, the data size increases by about +33% if no compression is applied beforehand.
With BitPack compression, numeric values are analyzed before binary conversion. For example, 4βbyte numbers can often be reduced to 1β2 bytes through type minimization and delta encoding. This achieves compression ratios of 50% or more, depending on the dataset.
After compression, Base64 encoding adds about +33% relative to the compressed size. As a result, compared to the original uncompressed binary, the final Base64 string is typically 40β60% smaller overall, while remaining efficiently decodable.
The time required for Base64 decoding is proportional to the string length and largely independent of the data contents. Therefore, even if the compression ratio varies by dataset, shortening the Base64 string consistently contributes to faster decoding.