A declarative coordinate and transformation convention and local world harmonization method

By registering queryable coordinate and transformation convention entries in the 3D game engine, the problem of ambiguity between local and world coordinates is resolved, local world reconciliation is achieved, teleportation/drift is eliminated, and the correctness and consistency of the configuration are ensured.

CN123181734APending Publication Date: 2026-11-27BEIJING WAZIDA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611505445.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-24
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In a pure data configuration, ambiguity in the reference frame between local and world coordinates in a 3D game engine can cause objects to teleport or drift. Inheritance rules are uncertain, conversion depends on scripts and violates runtime zero-code constraints, orientation calculations rely on handwritten transformation mathematics, and the correctness of the coordinate reference frame cannot be determined before runtime.

Method used

Register queryable coordinate and transformation convention entries in the engine, including the reference frame bisection rule and inheritance rule. Local world reconciliation is achieved through local offset operators, chained parent references, and orientation helpers, ensuring that coordinates are uniquely determined during loading and avoiding the need to write transformation mathematics manually.

Benefits of technology

It eliminates reference frame ambiguity, prevents teleportation/drift, unifies inheritance rules, achieves local world harmony, conforms to runtime zero-code constraints, and reduces configuration error rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181734A_ABST
    Figure CN123181734A_ABST
Patent Text Reader

Abstract

The application provides a declarative coordinate and transformation convention and local world harmonization method, which is applied to a declarative engine which does not execute a newly generated instruction stream at runtime and prohibits writing of transformation mathematical scripts, and the method comprises the following steps: registering a queryable coordinate and transformation convention entry in the engine, wherein the convention entry comprises a reference system bisection rule and an inheritance rule; through cooperation of the reference system bisection rule and the inheritance rule, the declarative coordinate and the runtime coordinate are uniformly interpreted under the same convention entry, and the conversion between the local reference system and the world reference system is realized through a local offset operator, a chained parent reference and an orientation helper built in the engine, so that the local world harmonization is completed. The automatic harmonization of the local and world coordinates is realized, the instantaneous displacement / drift defect is eliminated, the orientation flip caused by the hand-written Euler angle is eliminated, and the purpose of reducing the generation configuration error rate is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of three-dimensional image technology, and in particular relates to a declarative coordinate and transformation convention and a local world reconciliation method. Background Technology

[0002] Every 3D game has two reference frames: the world coordinate system (absolute space) and the local coordinate system (relative to the parent and rotating with the parent's orientation). Placing an object in space or orienting it requires determining which reference frame the coordinates are in. Traditional engines use two sets of literal interfaces in the script API to distinguish between these two—reading the local position calls one property, reading the world position calls another; this distinction only holds true if the author can write scripts. When the engine is converted to zero-code runtime, with all behavior described by pure data configuration, configuration field names are identical and the context is ambiguous, making the choice of reference frame no longer implied by the API literal meaning. Thus, whether the coordinates are local or world degenerates from an explicit choice in the script to an implicit guess in the pure data configuration—which is precisely where transformation-type defects are most prevalent. Artificial intelligence lacks runtime feedback when generating configurations word by word; if the reference frame is guessed incorrectly, the generated object may teleport or drift, and this only becomes apparent at runtime. Existing technologies are as follows: I. Unity's dual properties of local position and world position: Unity uses a transform component to expose both local and world positions: the local position is relative to the parent and rotates and scales with it; the world position is the absolute world coordinates. The author explicitly chooses which one to read and write in the script. Advantages: both reference frames are accessible, semantics are clear; Disadvantages: the distinction relies entirely on the literal selection of the script API. In pure data configuration, there is no equivalent dual-literal interface; both reference frames are pushed under the same field name, and the selection of the reference frame becomes implicitly guessed again; whether it inherits parent scaling is determined by the specific transformation settings, not a fixed convention visible to the author and running throughout the entire engine.

[0003] II. Relative Transformations and World Transformations in Unreal Engine: Unreal Engine uses two sets of transformations: relative transformations (relative to the parent) and world transformations (absolute), and provides conversion functions between the two. Advantages: Clear relative / world dual-track system, comprehensive conversion functions; Disadvantages: Authors must repeatedly choose between relative and world frames and explicitly call conversion functions to transform between the two reference frames—this is both script behavior and leaves the choice of reference frame to the author to decide at each point, without a single default convention of declaring local and writing world at runtime to avoid this choice; the conversion functions themselves are transformation mathematics and cannot run in an architecture that requires zero code at runtime and prohibits authors from writing transformation mathematics.

[0004] III. Existing conventions for parent-child connection in scene diagrams: Most mainstream engine scene graphs support parent-child relationships: child nodes are positioned relative to their parent nodes, changing as the parent node changes. Advantages: Parent-child hierarchy and relative positioning are mature consensuses; Disadvantages: This only establishes the underlying mechanism of parent-child relationships, without providing an explicit convention for the author, spanning declaration and runtime, to answer whether a entered value is local or global. The relationship mechanism itself doesn't distinguish between coordinates entered at declaration and coordinates entered at runtime, which should be assigned different and fixed reference frames in a declarative engine; whether rotation and scaling are inherited still varies depending on the node type and settings, and is not a unified rule that can be queried and verified.

[0005] IV. Handwritten transformation mathematical script: In schemes lacking a unified convention, authors often manually write coordinate transformations: multiplying the world increment by the inverse of the parent rotation, writing Euler angles into the rotation field, and manually assembling the orientation matrix. Advantages: infinite flexibility; Disadvantages: directly violates runtime zero-code and the architectural constraints prohibiting authors from writing transformation mathematics; manually assigning Euler angles triggers quaternion multifactorial decomposition, causing the orientation sign of objects facing away to flip, producing imperceptible misalignments; completely burdening the author with mental calculations to determine whether it's local or global, mismatches result in instantaneous teleportation.

[0006] In summary, the inventors discovered the following problems with the prior art during the implementation of this invention: 1. Ambiguity of reference frame: In pure data configuration, local and global field names are shared. The author and artificial intelligence can only guess. If they guess wrong, the system will either teleport or drift, and the error will only be exposed at runtime. 2. Indeterminate inheritance: Whether child elements rotate or scale with their parent is implicit and varies depending on the engine and node type. The same layout can produce drastically different results under different mental models. 3. Conversions rely on scripts: Conversions between two reference frames, multi-hop parent readings, and orientation offsets all require the author to call conversion functions or manually write transformation mathematics, violating the runtime zero-code constraint; 4. Orientation Script: Orientation posture needs to be constructed when facing the target, following the legal line, or facing the direction of travel. Hand-writing Euler angles will also trigger orientation flipping. 5. Lack of loading period control: The existing solution cannot determine whether the reference system of this coordinate is correctly understood before operation, and ambiguity can only be exposed in the form of instantaneous / drift during operation. Summary of the Invention

[0007] To address the aforementioned problems in the existing technology, this invention provides a declarative coordinate and transformation convention and a local world reconciliation method.

[0008] This disclosure provides a declarative coordinate and transformation convention and local world reconciliation method, applied to a declarative engine that does not execute newly generated instruction streams at runtime and prohibits writing transformation mathematical scripts. The method includes: The engine registers queryable coordinate and transformation convention entries, which include: a reference system bisection rule and an inheritance rule. The reference system bisection rule states that when a coordinate appears in the declaration position of a child layout, it is interpreted as a local coordinate relative to the parent; when a coordinate appears when the entity position is written at runtime, it is interpreted as an absolute world coordinate. The inheritance rule states that the position declared as a child inherits the rotation and scaling of the parent. These convention entries can be queried and verified at load time, ensuring that the reference system of any coordinate in the configuration is uniquely determined by the context in which the coordinate appears. Based on the aforementioned reference frame bisection rule and inheritance rule, the declaration-time coordinates and runtime coordinates are uniformly interpreted under the same convention. The conversion between the local reference frame and the world reference frame is achieved through the engine's built-in local offset operator, chained parent references, and orientation assistant, thereby completing the local world reconciliation.

[0009] Optionally, the reference frame bisection rule further includes: when the coordinates are expressed by a local offset operator or a local anchoring vector, the coordinates are converted to the local reference frame according to the orientation of the oriented entity itself; The inheritance rules are uniform explicit rules, including: when the parent is translated, the child is translated accordingly; when the parent is rotated, the child is rotated as a whole; when the parent is scaled, the child is scaled accordingly. The inheritance rules are written into the queryable convention entries and used to interpret each declaration position during loading. The agreed-upon entries also include axial definition rules, which include: the forward direction of the entity is the local positive Z-axis, the rightward direction of the entity is the positive X-axis, the upward direction of the entity is the positive Y-axis, rotation around the Y-axis is yaw, rotation around the X-axis is pitch, and rotation around the Z-axis is roll; the direction of gravity is the negative Y-axis.

[0010] Optionally, registering queryable coordinate and transformation convention entries in the engine also includes performing a preliminary check on the consistency of the reference system in the configuration based on the convention entries; Pre-verification includes: interpreting the declared location using local coordinates and interpreting the runtime write using world coordinates, so that the reference frame semantics are determined at the loading stage, and mismatched configurations are rejected at the loading stage and do not enter the runtime stage.

[0011] Optionally, the local offset operator receives the oriented entity and the world point as input and returns the three-dimensional coordinates of the world point in the entity's own local reference frame; the local offset operator is defined according to the axis and reference frame of the agreed entry and does not require writing any matrix or quaternion operations. When the entity is not rotated, the result of the local offset operator degenerates into the world difference; when the entity tilts or yaws, the world difference is rotated back into the entity's local axis.

[0012] Optionally, the mechanism of the chained parent reference is as follows: a continuous sequence of parent anchors represents a hop-by-hop upward hierarchical traversal; when the sequence is followed by an attribute name, the state of the corresponding ancestor is read or the corresponding ancestor entity is directly used as the event target; during parsing, the continuous parent anchors at the beginning are parsed into an ordered upward traversal sequence, and the list of attributes at the end is used as a field; during solving, parent anchors are applied hop-by-hop starting from itself; if any hop has no parent, it is safely parsed as null.

[0013] Optionally, the orientation assistant includes a target-aligning orientation assistant, a surface-normal-fitting orientation assistant, and a direction-of-travel orientation assistant.

[0014] Optionally, the alignment target orientation assistant is constructed by the engine and written into the entity rotation, so that the forward direction of the entity points to the target entity or world point vector; the alignment target orientation assistant supports yaw alignment around the Y-axis and supports pitch and roll to construct a three-dimensional looking attitude; the alignment target orientation assistant includes a steering rate parameter, so that the attitude approaches the target orientation frame by frame at a finite rate; the target entity and the target point are mutually exclusive, and one is selected for verification during loading.

[0015] Optionally, the surface normal orientation assistant is used to read the surface normal at the landing point when the entity is dropped onto the surface, and to align the local part of the entity upward to the normal; when there is no collision surface below the landing point, the instance remains upright as a safety degradation; the surface normal orientation and the landing function are independent of each other.

[0016] Optionally, the direction of travel is oriented toward the assistant to align the forward direction of the entity with the velocity direction; in the three-dimensional case, the forward direction of the entity changes with the pitch angle of the three-dimensional velocity, causing it to pitch up or down.

[0017] Optionally, the convention entry is registered in a command-line queryable manner, and all primitives carrying coordinates or directions point to the convention entry in a referencing manner, making the convention entry the sole source of reference truth for the entire engine; When composing the parent pose and local quantities into the scene graph pose, the five paths of declaration-time position resolution, runtime position writing, local offset operator, chained parent reference, and orientation helper share the same convention entry and are merged into a unified transformation composition to achieve local world harmony.

[0018] The declarative coordinate and transformation conventions and local world reconciliation method provided by this invention achieves automatic reconciliation of local and world coordinates in a declarative engine by registering a queryable coordinate and transformation convention entry, based on the reference frame bisection rule and inheritance rule. The declared position uses the parent's local coordinates, while the runtime write uses the world coordinates. The reference frame is uniquely determined by the context, eliminating guesswork and preventing instantaneous / drift defects at the source. Local offset operators, chained parent references, and orientation assistants are all implemented by the engine itself, handling all coordinate transformations and attitude construction. This eliminates the need for layer-by-layer relay templates and avoids orientation flipping caused by manually writing Euler angles, complying with the constraints of zero-code runtime and prohibiting mathematical transformations. The convention entries are queryable; the AI ​​only needs to read one entry to determine any coordinate reference frame, reducing the error rate of generated configurations. Attached Figure Description

[0019] The above and other objects, features and advantages of this disclosure will become more apparent from the accompanying drawings, in which like reference numerals generally denote like parts.

[0020] Figure 1 A schematic diagram illustrating the declarative coordinate and transformation conventions and the local world reconciliation method provided in the embodiments of this disclosure; Figure 2 A flowchart for determining the reference frame provided in the embodiments of this disclosure; Figure 3 This is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0021] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0022] It should be understood that the following specific examples illustrate the implementation of this disclosure, and those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0023] It should be noted that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice method. Furthermore, this device and / or practice method can be implemented using other structures and / or functionalities besides one or more of the aspects set forth herein.

[0024] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The illustrations only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0025] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.

[0026] The technical problems to be solved in this embodiment include: This embodiment is based on the constraint that the game's complete behavior is described solely by pure data configuration, with no newly generated instruction streams executed at runtime, and the author is prohibited from writing any transformation mathematical scripts. Whenever it involves placing an object in space or orienting it towards a certain location, both the author and the AI ​​generating the configuration must first answer one question: Is the written coordinate a local coordinate relative to the parent, or an absolute world coordinate? In traditional engines, this question is implicitly determined by the script context. However, in a declarative engine with zero runtime code, it must be answered by a fixed, explicit, load-checkable convention; otherwise, the object will teleport or drift. This embodiment addresses the fundamental problem of how to eliminate the ambiguity between local and world coordinates in a declarative engine that does not execute runtime code and does not allow the author to write transformation mathematics, using a unified explicit coordinate and transformation convention, and ensuring that offsets, chained parent references, and orientation assistants all follow the same convention. It solves the following four technical sub-problems: Problem 1: The ambiguity between local and world coordinates is the number one source of defects in transformation-based systems. Authors (and AI configured with word-by-word meta-output) often cannot determine which reference frame a declared or runtime-written coordinate is in. The same number, interpreted as local coordinates, causes the object to fit onto its parent; interpreted as world coordinates, it causes the object to teleport to another location near the world origin. In traditional engines, this ambiguity is addressed by the literal distinctions in the script APIs (two sets of interfaces, one for local coordinates and the other for world coordinates). However, in pure data configurations, with identical field names and ambiguous contexts, authors can only guess. Incorrect guesses result in teleportation or drift, often only discovered at runtime.

[0027] Question 2: Whether child elements inherit rotation and scaling from their parent is implicit and inconsistent across different engines. It's generally agreed that a child entity attached to a parent moves its declared position with the parent; however, whether the child rotates and scales with the parent varies across different engines and node types, and is rarely explicitly defined. If the author assumes that children only follow translation and not rotation, they might attach a turret to a tank but find that the turret doesn't rotate when the tank turns; the reverse is also true. This implicit and inconsistent inheritance rules cause the same layout configuration to produce completely different results under different mental models.

[0028] Question 3: Chained parent references and local offsets are temporary constructs. Requirements like reading the state of a grandparent, placing it relative to the grandparent, and offsetting it along its own orientation typically rely on either manually forwarding state templates layer by layer or writing a coordinate transformation code manually. There's neither a unified multi-hop parent reference notation nor a local offset operator that follows the same coordinate convention. When faced with visual skeletons of three or more layers (logical entities → directional pivots → animated leaves), the author can only relay the information layer by layer, increasing the number of templates with each layer.

[0029] Question 4: Orientation calculations inherently involve mathematical scripts that transform orientation, conflicting with the runtime zero-code and prohibition of transforming mathematical frameworks. The three types of orientation requirements—facing the nearest enemy, ensuring an object aligns with the slope normal it lands on, and aligning a flying vehicle's nose with its direction of travel—essentially all involve constructing an orientation quaternion or attitude basis. If the author were to manually assign Euler angles, it would trigger the potential for quaternion refactoring, leading to orientation flipping of objects facing away, and would directly violate the prohibition against writing transformation mathematics. Orientation capabilities must be handled by engine-built-in assistants, and these assistants must be consistent with coordinate conventions, rather than introducing new reference frames independently.

[0030] The method provided in this embodiment has the following purpose: (a) Provide a fixed and explicit coordinate and transformation convention—the declared child position = the parent local and inherits the parent's rotation and scaling, and the runtime write position = world—so that the reference frame no longer needs to be selected by the author at each location. A fixed and explicit convention answers the local / world question: the declared child position is the parent's local coordinate (and inherits the parent's rotation and scaling). (b) Local offsets, chained parent references, and three orientation helpers (aligning to target, conforming to legal lines, and facing the direction of travel) all follow the same convention. A local offset operator that follows the same convention is provided to convert a world point into the self-reference frame of a certain oriented entity. The author does not write any transformation mathematics. (c) Provide a chained parent reference notation to traverse the hierarchy in one jump or more (reading the state and entities of the grandparent level and even higher levels), eliminating the need for layer-by-layer relay boilerplate; (d) Provides three orientation assistants that follow the same convention—aligning with the target, conforming to the surface normal, and facing the direction of travel—with the orientation posture constructed by the engine, eliminating the need for handwritten Euler angles and orientation flipping; (e) Enables the above conventions and assistants to be queried and verified during loading, eliminating local / world ambiguity before runtime, so that artificial intelligence will never have to guess whether a coordinate is local or world. (f) Achieve the above goals while maintaining the full expressive power of the space, and the author makes zero changes to the mathematics and the engine adds zero new code during the entire process.

[0031] In this embodiment, "author" refers to a person or artificial intelligence system that uses the declarative engine to create game content.

[0032] For ease of understanding, such as Figure 1 As shown, this embodiment discloses a declarative coordinate and transformation convention and a local world reconciliation method, applied to a declarative engine that does not execute newly generated instruction streams at runtime and prohibits writing transformation mathematical scripts. The method includes: The engine registers queryable coordinate and transformation convention entries, which include: a reference system bisection rule and an inheritance rule. The reference system bisection rule states that when a coordinate appears in the declaration position of a child layout, it is interpreted as a local coordinate relative to the parent; when a coordinate appears when the entity position is written at runtime, it is interpreted as an absolute world coordinate. The inheritance rule states that the position declared as a child inherits the rotation and scaling of the parent. These convention entries can be queried and verified at load time, ensuring that the reference system of any coordinate in the configuration is uniquely determined by the context in which the coordinate appears. The meaning of making the reference frame of any coordinate in the configuration uniquely determined by the context in which that coordinate appears is that you don't need to guess what a coordinate number is relative to; you can determine it simply by where it appears. If the coordinate appears in the declaration position of a child layout, then it is a local coordinate relative to the parent; if the coordinate appears in the runtime writing of entity positions, then it is an absolute world coordinate. Therefore, when the author or AI writes the configuration, they don't need to think about whether the coordinate is local or world; they only need to see where the coordinate is written, and the reference frame is automatically determined.

[0033] Based on the aforementioned reference frame bisection rule and inheritance rule, the declaration-time coordinates and runtime coordinates are uniformly interpreted under the same convention. The conversion between the local reference frame and the world reference frame is achieved through the engine's built-in local offset operator, chained parent references, and orientation assistant, thereby completing the local world reconciliation.

[0034] The reference frame bisection rule determines the location of coordinates, while the inheritance rule determines how local coordinates follow. The reference frame bisection rule defines the reference frame to which coordinates belong, while the inheritance rule defines the complete transformation behavior of local coordinates. If there is only a bisection rule and no inheritance rule, the semantics of local coordinates are incomplete, and the author still does not know whether the child element rotates with the parent element; if there is only an inheritance rule and no bisection rule, it is impossible to distinguish between the different semantics that should apply at declaration time and runtime. With the reference frame bisection rule and the inheritance rule working together, the semantics of any coordinate in the configuration can be completely determined at load time, eliminating the need for guesswork by the author and the AI.

[0035] like Figure 1 As shown, this embodiment includes convention registration, declaration period resolution, runtime writing, and loading period verification.

[0036] The coordinate convention is registered as a separate entry that can be queried via the command line, becoming the sole source of truth for the entire engine's reference frame; all primitives carrying coordinates or directions point to it. The five paths—declarational position resolution, runtime position writing, local offset operators, chained parent references, and orientation helpers—share the same convention, ultimately converging into a unified transformation composition and outputting to the scene graph backend.

[0037] Declarative position resolution means that when coordinates appear in the declaration position of a child layout, the coordinates are interpreted as local coordinates relative to the parent; runtime position writing means that when coordinates appear in runtime writes to the entity position, the coordinates are interpreted as absolute world coordinates.

[0038] This embodiment registers the coordinate and transformation conventions as a queryable convention entry (the author can obtain it by querying this topic via command line). The content includes at least the following: Axis: The forward direction of the entity is local positive Z, the right direction is positive X, and the upward direction is positive Y, right-handed system; Reference system bisection: World reference system (default, absolute axis, ignores entity orientation) and local reference system (positive Z = forward direction of the orientation body, offset rotates according to the orientation body's complete orientation); Rotation axis semantics: yaw around Y, pitch around X, roll around Z; Gravity direction: fixed at negative Y of the world; Screen / UI reference system: independent of the 3D reference system, origin at the upper left, Y downward.

[0039] All primitives carrying coordinates or directions (movement, impulse, orientation, rotation, anchor vector, etc.) refer to this entry by way of the convention, thus avoiding conflicting or contradictory descriptions in their respective texts. The convention is the sole source of truth; artificial intelligence only needs to read one place to determine the reference frame for any coordinates.

[0040] A child entity's declared position (pos) in a Blueprint layout is fixed as a local coordinate relative to its parent, inheriting the parent's rotation and scaling. In other words: if the parent translates, the child translates accordingly; if the parent rotates, the child rotates as a whole (the child's declared position is rotated by the parent's orientation before repositioning); if the parent scales, the child scales accordingly.

[0041] Therefore, by declaring the turret at a specific location on the tank, the turret will correctly follow the tank's movement, turning, and overall zoom without requiring any conversions from the author. This rule is a unified explicit convention, written into a queryable convention entry, which can be used to interpret each declared location during loading.

[0042] Runtime position writing equals world coordinates: When a behavior graph or rule writes the position of an entity at runtime (e.g., setting its own position to a certain location), its semantics are fixed as world coordinates. This forms a clear dual with the declaration-time semantics: coordinates given at declaration time → parent local (including inherited rotation and scaling); coordinates written at runtime → absolute world.

[0043] This duality is the core of this embodiment for eliminating ambiguity: the same `pos` field has a fixed and different reference frame in two contexts—one for the child-level layout and one for runtime writing—and is written into the queryable convention entries in both. Therefore, the author and AI never need to guess; the reference frame is fixed once the context is given. If a local semantic offset is needed at runtime, it is expressed using a local offset or an anchor vector of the local reference frame, instead of directly writing the position. The reference frame determination is as follows: Figure 2 As shown.

[0044] Local Offset (World Point → Entity's Own Reference Frame): This embodiment provides a local offset operator. It takes an oriented entity and a world point as input and returns the 3D coordinates of the world point in the entity's own local reference frame (i.e., the world point is rotated inversely into its local axis based on the entity's world position and orientation). When the entity is not rotated, the result degenerates into a simple world difference; when the entity is tilted or yawed, the difference is correctly rotated inversely into its local axis—a point directly in front of a yawing object, regardless of the object's world orientation, will read the component in the local positive Z direction.

[0045] This operator allows quantities that would otherwise be impossible to express in pure data configuration, such as the coordinates of a point relative to the self-coordinate of a tilted object, to be written in a single line (e.g., defaulting the pivot of rotation to the contact point between two objects, regardless of the tilt of the bearing surface). It follows the same coordinate convention, and the authors do not write any matrix or quaternion operations. The local offset operator, as a value function that returns a vector, falls into the value function table of the expression sublanguage, reusing its typed evaluation path.

[0046] Chained parent references: This embodiment extends single-hop parent references to chained parent references that can be traversed upwards hop by hop: parent.parent (grandparent) and even more hops. An attribute name can then be used to read the state of the ancestor, or the ancestor entity can be directly used as the event target. Resolution: The initial consecutive parent anchors are resolved into an ordered upward traversal sequence, and the last attribute name (if any) is extracted as a field. Solving: Starting from itself, parent anchors are applied hop by hop—first finding the parent of itself, then finding the parent of the result, and so on. Failure tolerance: If a hop has no parent, it is safely resolved to null, consistent with the single-hop parent failure, without crashing.

[0047] Chained parent references solve the common need for leaves to read the state of their ancestor layers in visual skeletons with three or more layers (logical entities → directional pivots → animated leaves) (e.g., reading the turret target from the elevation of a turret, or reading the blooming sign from the tilt hinge under the petal pivot of a flower head), eliminating the need for layer-by-layer relay attributes and frame-by-frame copying. It works in conjunction with declarative coordinate conventions: the same set of parent and child layers is traversed upwards, and the read state and coordinate semantics are consistent with the convention.

[0048] Orientation assistants: The three built-in orientation assistants follow the same convention. This embodiment provides three built-in orientation assistants, all of which are constructed by the engine to determine the orientation posture and write the entity rotation. The authors use zero-transformation mathematics, and all of them follow the axis and reference frame conventions of this embodiment. (a) Alignment with a target: Make the forward direction (local positive Z) of an entity point to a target entity or a world point / direction vector: the default is yaw around Y (alignment in the horizontal plane, consistent with existing entity-facing behavior); it can be extended to pitch and even roll to construct a complete 3D looking attitude (e.g., a flying object points its nose at a target at a high altitude, and then tilts up and dives as needed); the target can be an entity or a world point / direction (e.g., the direction dragged by the player) - the two types of targets are mutually exclusive, and one is chosen during loading; it can be equipped with a turning rate so that the attitude approaches the target orientation at a finite rate frame by frame rather than aligning instantaneously (avoiding perfect aiming and preserving playability).

[0049] (b) Fitting Surface Normals: When an entity (or a batch of scattered / path-placed instances) is placed on a surface, the surface normal at the landing point is read, and the local upward (positive Y) alignment of the instance is aligned to the normal, so that the object fits the slope or curved surface instead of being upright: This is independent of the existing landing (placing the Y on the collision surface), and the two are two separately switchable outputs of the same ray detection; when there is no collision surface below the landing point, the instance remains upright as a safe degradation, without generating an illegal posture.

[0050] (c) Facing the direction of travel: Align the forward direction of the entity with its velocity direction, so that the moving object faces the direction it is actually moving in; in three-dimensional cases, the nose can be raised / dive with the three-dimensional velocity, instead of always being horizontal.

[0051] The three assistants follow the same convention: they all state their intentions and the engine calculates their postures. This is consistent with the coordinate convention, and they can be combined with each other (for example, placing objects that fit the ground along the curve drawn by the player).

[0052] Loading-time verification: Since the coordinate convention is fixed and the primitives carrying coordinates / directions are closed sets, the following types of pre-verifications can be performed during loading: Reference system consistency: The declared position is interpreted locally, and the runtime write is interpreted globally. The rules are fixed, and the semantics of the configured reference system are determined during loading, leaving no runtime ambiguity; Reference reachability: Each hop of the chained parent reference corresponds to the actual parent-child hierarchy, and failure tolerance is null rather than crash; The target (entity or world point) of the orientation helper must be selected and exist; Orientation helper parameter validity: The target entity and the target point / direction of the aligning target are mutually exclusive and one of them must be true, the turning rate type is correct, etc., all of which are captured by the general parameter verification during loading.

[0053] Configurations that fail to load cannot enter the runtime, thus preventing runtime shifts / drifts caused by incorrect reference frame guesses.

[0054] In a specific application scenario, let's take a tank turret as an example: Layout (Declaration Period): A tank is the parent, and a turret is declared as its child at a specific local location. According to this embodiment, this location is a local part of the parent, and the turret inherits the tank's rotation and scaling—when the tank moves forward, turns, or zooms in as a whole, the turret's position and orientation correctly follow, requiring no conversion from the author. Below the turret is an elevation / damping section, which uses a chained parent reference to read the target status on the turret (its parent) and even the tank (its grandparent), without needing layer-by-layer relay.

[0055] Firing (Operation Period): When the turret hits the nearest enemy, the behavior graph generates a shell and writes its position—as per the convention of this embodiment, the position written here is the world coordinate, the world position of the shell landing in the world space of the turret muzzle, rather than accidentally landing near the origin of a certain parent.

[0056] Aiming (orientation assistant): The turret uses the target aiming assistant to point forward toward the nearest enemy; if the enemy is at higher elevation, the turret can be tilted up or down; turning has a finite rate, with the turret turning smoothly rather than locking on instantly. If the shell is flying along a trajectory, the projectile is tilted up / down with velocity using the direction-of-flight aiming assistant. Throughout the entire process, the author did not write a single line of transformation mathematics; all coordinate reference frames are determined by queryable convention entries.

[0057] Fit (Place): When scattering debris on a slope battlefield, use the Fit Surface Normal Assistant to make each piece of debris fit the slope it lands on, instead of clipping it upright.

[0058] In a specific application, in a declarative engine, dynamic modeling describes the behavior and state transitions of entities through pure data configuration, while the physics engine interprets and performs collision detection, pose synthesis, and spatial transformation in a unified manner based on coordinate and transformation conventions. The two work together under the constraints of zero code generation at runtime and prohibition of writing transformation mathematical scripts, so that dynamic behavior modeling and physical space calculation follow the same reference system convention without any transformation mathematical operations.

[0059] The method disclosed in this embodiment is compared with the prior art as follows: Reference frame ambiguity elimination comparisons are shown in Table 1: Table 1. Comparison of Reference Frame Ambiguity Removal:

[0060] The comparison of the explicitness of inheritance rules is shown in Table 2:

[0061] The conversion and orientation comparison are shown in Table 3: Table 3. Comparison of Conversion and Orientation Expressions:

[0062] This embodiment can also employ the following technical solutions: The axial convention can also be changed to other axes (such as positive X = forward) or left-handed systems, as long as the convention is fixed, explicit, searchable, and runs through the declaration and runtime periods, it still falls within the scope of this embodiment. This embodiment discloses a mechanism for eliminating ambiguity through a fixed explicit convention, rather than a specific axial value.

[0063] The reference frame can be binary, which can take the world view at declaration and the local view at runtime. As long as the binary view is fixed and searchable, the mechanism remains unchanged. It can also provide an explicit variant for runtime writes with local semantics, which can coexist with the default world semantics as a convenient supplement.

[0064] Inheritance rules can provide an optional switch to inherit only translation and rotation, and not scaling, as a convenient branch for special skeletons, as long as the default rules are fixed and can be queried.

[0065] Chained parent references can express the same traversal with a single hop depth integer; the chain can also be extended to other anchors (such as the parent of the other side of the event), which is a natural generalization of the same resolution hook.

[0066] The orientation assistant can implement the alignment target as an axial mask parameter of an existing orientation verb, or as an independent looking verb; the turning rate can be taken as a fixed increment per frame or an interpolation coefficient scaled by frame duration (spherical linear interpolation), with a performance / feel trade-off.

[0067] Local offset can be implemented by transposing the basis matrix and applying it to the world difference, which is mathematically equivalent; it can also be supplemented with its inverse operator (local point → world point), which can be added as needed.

[0068] The terminology for this embodiment is shown in Table 4: Table 4. Terminology Comparison Table:

[0069] This embodiment has the following effects: I. Eliminate ambiguity in the reference frame and prevent teleportation / drift-related defects: Through the aforementioned reference frame bisection rule, the reference frame of coordinates is uniquely determined by the context in which it appears. The declared position uses the parent's local coordinates, while the runtime write uses absolute world coordinates. Authors and AI no longer need to select or guess between local and world coordinates, fundamentally eliminating the reference frame mismatch problem caused by identical field names and ambiguous contexts in pure data configuration. Since agreed-upon entries can be queried and verified during loading, configurations with mismatched reference frames are rejected during loading and cannot enter the runtime, eliminating the runtime-related defects of instantaneous / drift transformations in traditional solutions before runtime.

[0070] II. Unify explicit inheritance rules to eliminate inconsistencies in behavior across engines: The inheritance rules unify the implicit behavior of whether child elements rotate and scale with their parent, which varies depending on the node type and settings, into a single, explicitly queryable convention: the position of a child element is declared to inherit the rotation and scaling of its parent. Regardless of engine type or node type, the same layout configuration produces consistent results across different mental models.

[0071] III. Local World Harmony, Zero-Transform Mathematics: Through the synergy of the reference frame binary rule and the inheritance rule, the declaration-time coordinates and runtime coordinates are uniformly interpreted under the same convention. The conversion between the local reference frame and the world reference frame is achieved by the engine's built-in local offset operator, chained parent references, and orientation helper. The local offset operator converts the world point into the reference frame of the oriented entity, so that quantities such as the coordinates of a point relative to a tilted object, which are originally impossible to express in pure data configuration, can be written in one line without writing any matrix or quaternion operations. Chained parent references allow leaf entities to directly read the state of their grandparents and even higher-level ancestors, eliminating the need for layer-by-layer relay attributes and frame-by-frame copying of boilerplates, and the amount of boilerplates no longer increases with the depth of the hierarchy. The three orientation assistants (aligning with the target, following the legal line, and facing the direction of travel) are constructed by the engine to prevent orientation flipping caused by quaternion multi-factoring triggered by handwritten Euler angles.

[0072] The entire process involves zero mathematical transformations and zero new code additions, fully complying with the architectural constraints of zero code at runtime and prohibiting mathematical transformations.

[0073] IV. Pre-loading checks, error prevention: Because the coordinate system is fixed and the primitives carrying coordinates / directions are closed sets, reference system consistency, chained reference reachability, and orientation helper parameter validity can be pre-checked during the loading phase. Configurations that fail to load will never enter the runtime, thus fundamentally preventing runtime teleportation / drift caused by incorrect reference system guesses.

[0074] V. The sole source of truth, readable and verifiable by AI: The agreed-upon entry is registered in a queryable manner, becoming the sole source of truth for the entire engine's reference frame. All primitives carrying coordinates or directions point to this entry, allowing artificial intelligence to determine the reference frame for any coordinates from a single entry, eliminating the need for repeated comparisons across multiple interfaces or documents and significantly reducing the error rate when generating configurations using AI.

[0075] The electronic device disclosed in this embodiment includes a memory and a processor. The memory is used to store non-transitory computer-readable instructions. Specifically, the memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc.

[0076] The processor may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions. In one embodiment of this disclosure, the processor is used to execute computer-readable instructions stored in the memory, causing the electronic device to perform all or part of the steps of the declarative coordinate and transformation conventions and local world reconciliation methods of the foregoing embodiments of this disclosure.

[0077] Those skilled in the art will understand that, in order to solve the technical problem of how to achieve a good user experience, this embodiment may also include well-known structures such as communication buses and interfaces, and these well-known structures should also be included within the protection scope of this disclosure.

[0078] like Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. It illustrates a structural schematic diagram suitable for implementing the electronic device in the embodiment of the present disclosure. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0079] like Figure 3 As shown, an electronic device may include a processing unit (such as a central processing unit, graphics processing unit, etc.) that can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from a storage device into random access memory (RAM). The RAM also stores various programs and data required for the operation of the electronic device. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0080] Typically, the following devices can be connected to the I / O interface: input devices, such as sensors or visual information acquisition devices; output devices, such as displays; storage devices, such as magnetic tapes or hard drives; and communication devices. Communication devices allow electronic devices to exchange data wirelessly or via wired communication with other devices, such as edge computing devices. Although Figure 3Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have instead.

[0081] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, all or part of the steps of the declarative coordinate and transformation conventions and local world reconciliation methods of embodiments of this disclosure are performed.

[0082] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.

[0083] A computer-readable storage medium according to embodiments of the present disclosure stores non-transitory computer-readable instructions. When these non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the declarative coordinate and transformation conventions and local world reconciliation methods of the foregoing embodiments of the present disclosure are performed.

[0084] The aforementioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or portable hard drive), media with built-in rewritable non-volatile memory (e.g., memory card), and media with built-in ROM (e.g., ROM cartridge).

[0085] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.

[0086] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0087] In this disclosure, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The block diagrams of devices, apparatuses, devices, and systems involved in this disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as "comprising," "including," "having," etc., are open-ended terms meaning "including but not limited to," and are used interchangeably with them. The terms "or" and "and" as used herein refer to the terms "and / or," and are used interchangeably with them unless the context clearly indicates otherwise. The term "such as" as used herein refers to the phrase "such as but not limited to," and is used interchangeably with it.

[0088] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.

[0089] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.

[0090] Various changes, substitutions, and modifications can be made to the techniques described herein without departing from the teachings defined in this embodiment. Furthermore, the scope of this embodiment is not limited to the specific aspects of the processes, machines, manufacturing processes, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufacturing processes, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, this embodiment includes such processes, machines, manufacturing processes, events, means, methods, or actions within its scope.

[0091] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0092] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A declarative coordinate and transformation convention and a local world reconciliation method, characterized in that, The method, applied to declarative engines that do not execute newly generated instruction streams at runtime and prohibit the writing of transformation mathematical scripts, includes: The engine registers queryable coordinate and transformation convention entries, which include: a reference system bisection rule and an inheritance rule. The reference system bisection rule states that when a coordinate appears in the declaration position of a child layout, it is interpreted as a local coordinate relative to the parent; when a coordinate appears when the entity position is written at runtime, it is interpreted as an absolute world coordinate. The inheritance rule states that the position declared as a child inherits the rotation and scaling of the parent. These convention entries can be queried and verified at load time, ensuring that the reference system of any coordinate in the configuration is uniquely determined by the context in which the coordinate appears. Based on the aforementioned reference frame bisection rule and inheritance rule, the declaration-time coordinates and runtime coordinates are uniformly interpreted under the same convention. The conversion between the local reference frame and the world reference frame is achieved through the engine's built-in local offset operator, chained parent references, and orientation assistant, thereby completing the local world reconciliation.

2. The declarative coordinate and transformation conventions and local world reconciliation method according to claim 1, characterized in that, The reference system bisection rule also includes: when the coordinates are expressed by a local offset operator or a local anchoring vector, the coordinates are converted to the local reference system according to the orientation of the oriented entity itself; The inheritance rules are uniform explicit rules, including: when the parent is translated, the child is translated accordingly; when the parent is rotated, the child is rotated as a whole; when the parent is scaled, the child is scaled accordingly. The inheritance rules are written into the queryable convention entries and used to interpret each declaration position during loading. The agreed-upon entries also include axial definition rules, which include: the forward direction of the entity is the local positive Z-axis, the rightward direction of the entity is the positive X-axis, the upward direction of the entity is the positive Y-axis, rotation around the Y-axis is yaw, rotation around the X-axis is pitch, and rotation around the Z-axis is roll; the direction of gravity is the negative Y-axis.

3. The declarative coordinate and transformation conventions and local world reconciliation method according to claim 1, characterized in that, Registering queryable coordinate and transformation convention entries in the engine also includes performing a preliminary check on the consistency of the reference system in the configuration based on the convention entries; Pre-verification includes: interpreting the declared location using local coordinates and interpreting the runtime write using world coordinates, so that the reference frame semantics are determined at the loading stage, and mismatched configurations are rejected at the loading stage and do not enter the runtime stage.

4. The declarative coordinate and transformation conventions and local world reconciliation method according to claim 1, characterized in that, The local offset operator receives the oriented entity and the world point as input and returns the three-dimensional coordinates of the world point in the entity's own local reference frame. The local offset operator is defined according to the axis and reference frame of the agreed entries and does not require writing any matrix or quaternion operations. When the entity is not rotated, the result of the local offset operator degenerates into the world difference; when the entity tilts or yaws, the world difference is rotated back into the entity's local axis.

5. The declarative coordinate and transformation conventions and local world reconciliation method according to claim 1, characterized in that, The mechanism of the chained parent reference is as follows: a continuous sequence of parent anchors represents a hop-by-hop upward hierarchical traversal. When the sequence is followed by an attribute name, the state of the corresponding ancestor is read or the corresponding ancestor entity is directly used as the event target. During parsing, the continuous parent anchors at the beginning are parsed into an ordered upward traversal sequence, and the list of attributes at the end is used as a field. During solving, parent anchors are applied hop-by-hop starting from itself. If any hop has no parent, it is safely parsed as null.

6. The declarative coordinate and transformation conventions and local world reconciliation method according to claim 1, characterized in that, The orientation assistant includes a target alignment orientation assistant, a surface normal alignment orientation assistant, and a direction-of-travel orientation assistant.

7. The declarative coordinate and transformation conventions and local world reconciliation method according to claim 6, characterized in that, The target orientation assistant is constructed by the engine and written into the entity rotation, so that the forward direction of the entity points to the target entity or world point vector; the target orientation assistant supports yaw alignment around the Y-axis and supports pitch and roll to construct a three-dimensional looking attitude; the target orientation assistant includes a steering rate parameter, so that the attitude approaches the target orientation frame by frame at a finite rate; the target entity and the target point are mutually exclusive, and one is selected for verification during loading.

8. The declarative coordinate and transformation conventions and local world reconciliation method according to claim 6, characterized in that, The surface normal orientation of the fitting assistant is used to read the surface normal at the landing point when the entity is placed on the surface, and to align the local part of the entity upward to the normal. When there is no collision surface below the landing point, the instance remains upright as a safety degradation; the surface normal and the landing function are independent of each other.

9. The declarative coordinate and transformation conventions and local world reconciliation method according to claim 6, characterized in that, The direction of travel is oriented toward the assistant to align the forward direction of the entity with the velocity direction; in three dimensions, the forward direction of the entity changes with the pitch angle of the three-dimensional velocity, causing it to either tilt up or tilt down.

10. The declarative coordinate and transformation conventions and local world reconciliation method according to claim 6, characterized in that, The convention entry is registered in a command-line queryable manner, and all primitives carrying coordinates or directions point to the convention entry in a referencing manner, making the convention entry the sole source of truth for the entire engine's reference frame; When composing the parent pose and local quantities into the scene graph pose, the five paths of declaration-time position resolution, runtime position writing, local offset operator, chained parent reference, and orientation helper share the same convention entry and are merged into a unified transformation composition to achieve local world harmony.