Both sides previous revisionPrevious revisionNext revision | Previous revision |
democap:netspec [2023/05/09 14:30] – [Actor Capture Bone Layout] dragonlord | democap:netspec [2024/09/25 14:26] (current) – dragonlord |
---|
{{tag>motioncapture democap}} | {{tag>motioncapture democap network}} |
<WRAP youarehere> | <WRAP youarehere> |
[[:start|Start Page]] >> [[main|DEMoCap: Drag[en]gine Motion Capture]] >> [[democap:uipanelcapture|UI: Panel Session]] >> **Network Specification** | [[:start|Start Page]] >> [[main|DEMoCap: Drag[en]gine Motion Capture]] >> [[democap:uipanelcapture|UI: Panel Session]] >> **DEMoCap Network Specification** |
</WRAP> | </WRAP> |
| |
====== Network Specification ====== | ====== DEMoCap Network Specification ====== |
| |
The DEMoCap Networking uses the [[gamedev:dnp|Drag[en]gine Network Protocol]] as protocol and defines a set of <wrap hi>messages</wrap> and <wrap hi>linked states</wrap> supported by DEMoCap. The specification can change with upcoming DEMoCap updates but stays backwards compatible. Servers and clients are required to ignore unknown messages and linked states. | The DEMoCap Networking uses the [[gamedev:dnp|Drag[en]gine Network Protocol]] as protocol and defines a set of <wrap hi>messages</wrap> and <wrap hi>linked states</wrap> supported by DEMoCap. The specification can change with upcoming DEMoCap updates but stays backwards compatible. Servers and clients are required to ignore unknown messages and linked states. |
| [[gamedev:dnp#data_types|UInt]] | SupportedFeatures | <WRAP> | | [[gamedev:dnp#data_types|UInt]] | SupportedFeatures | <WRAP> |
Features supported by the client. Flags value with these possible values: | Features supported by the client. Flags value with these possible values: |
* ''0'': Enable //Vertex Position Set// data to be send by client and server. If enabled certain messages contain additional data elements. | * Bit ''0'': Enable //Vertex Position Set// data to be send by client and server. If enabled certain messages contain additional data elements. |
</WRAP> | | </WRAP> | |
| [[gamedev:dnp#data_types|String8]] | Name | Name describing the remote client connecting. This is a free form name of short length indicating what software is connecting. It is used only to show the user who is connected to identify the individual connections. | | | [[gamedev:dnp#data_types|String8]] | Name | Name describing the remote client connecting. This is a free form name of short length indicating what software is connecting. It is used only to show the user who is connected to identify the individual connections. | |
| - | Reserved | Reserved for future expansion. Ignore any additional bytes in the message | | | - | Reserved | Reserved for future expansion. Ignore any additional bytes in the message | |
| |
The server will then respond with a [[#server_features|Server Features]] message before sending any other messages. | The server will then respond with a [[#connect_accepted|Connect Accepted]] message or disconnect the client if rejected. |
| |
===== Connect Accepted ===== | ===== Connect Accepted ===== |
| [[gamedev:dnp#data_types|Quaternion]] | Orientation | Origin orientation in rig or parent bone. | | | [[gamedev:dnp#data_types|Quaternion]] | Orientation | Origin orientation in rig or parent bone. | |
| |
//VertexPositionData// has this format: | //VertexPositionData// has this format (all weights are 0): |
^ Type ^ Name ^ Description ^ | ^ Type ^ Name ^ Description ^ |
| [[gamedev:dnp#data_types|String8]] | Name | Name of vertex positionset. | | | [[gamedev:dnp#data_types|String8]] | Name | Name of vertex positionset. | |
| [[gamedev:dnp#data_types|float]] | Weight | Weight. | | |
| |
===== Actor Capture Frame ===== | ===== Actor Capture Frame ===== |
Send by the server for each motion capture frame. Motion capture data is in bone local space. The root bones are relative to either the actor position relative to the scene or the selected capture object. Capture frames match a specific bone layout revision. The client has to use the latest received bone layout. Capture frames belonging to different bone layouts have to be discarded. This avoids clients trying to read capture frames using the wrong layout. The message is send unreliable and has this format: | Send by the server for each motion capture frame. Motion capture data is in bone local space. The root bones are relative to either the actor position relative to the scene or the selected capture object. Capture frames match a specific bone layout revision. The client has to use the latest received bone layout. Capture frames belonging to different bone layouts have to be discarded. This avoids clients trying to read capture frames using the wrong layout. The message is send unreliable and has this format: |
| |
^ Type ^ Name ^ Description ^ | ^ Type ^ Name ^ Description ^ |
| [[gamedev:dnp#data_types|Byte]] | Code | Message code. Is value ''4'' | | | [[gamedev:dnp#data_types|Byte]] | Code | Message code. Is value ''4'' | |
| [[gamedev:dnp#data_types|UShort]] | [[#frame_number|FrameNumber]] | Frame number of capture frame. Used to avoid delayed old frames interfering with new frames. | | | [[gamedev:dnp#data_types|UShort]] | [[#frame_number|FrameNumber]] | Frame number of capture frame. Used to avoid delayed old frames interfering with new frames. | |
| [[gamedev:dnp#data_types|Byte]] | BoneLayoutRevision | Bone layout revision matching this capture frame. | | | [[gamedev:dnp#data_types|Byte]] | BoneLayoutRevision | Bone layout revision matching this capture frame. | |
| [[gamedev:dnp#data_types|Vector]] | Position | Position of actor. This is either the actor position relative to the scene or the selected capture object. | | | [[gamedev:dnp#data_types|Vector]] | Position | Position of actor. This is either the actor position relative to the scene or the selected capture object. | |
| [[gamedev:dnp#data_types|Quaternion]] | Orientation | Orientation of actor. This is either the actor position relative to the scene or the selected capture object. | | | [[gamedev:dnp#data_types|Quaternion]] | Orientation | Orientation of actor. This is either the actor position relative to the scene or the selected capture object. | |
| [[gamedev:dnp#data_types|Float]] | Scale | Scale of actor. | | | [[gamedev:dnp#data_types|Float]] | Scale | Scale of actor. | |
| BoneState[BoneCount] | Bones | //BoneCount// bone states as described below. //BoneCount// matches //BoneCount// from the bone layout with //Revision// matching //BoneLayoutRevision//. | | | BoneState[BoneCount] | Bones | //BoneCount// bone states as described below. //BoneCount// matches //BoneCount// from the bone layout with //Revision// matching //BoneLayoutRevision//. | |
| - | Reserved | Reserved for future expansion. Ignore any additional bytes in the message | | | VertexPositionSetState[VertexPositionSetCount] | VertexPositionSets | Only present if feature bit ''0'' has been enabled while connecting. \\ //VertexPositionSetCount// vertex position set states as described below. //VertexPositionSetCount// matches //VertexPositionSetCount// from the bone layout with //Revision// matching //BoneLayoutRevision//. | |
| | - | Reserved | Reserved for future expansion. Ignore any additional bytes in the message | |
| |
//BoneState// has this format: | //BoneState// has this format: |
| [[gamedev:dnp#data_types|Vector]] | Position | Position of the bone in bone local space. | | | [[gamedev:dnp#data_types|Vector]] | Position | Position of the bone in bone local space. | |
| [[gamedev:dnp#data_types|Quaternion]] | Orientation | Orientation of the bone in bone local space. | | | [[gamedev:dnp#data_types|Quaternion]] | Orientation | Orientation of the bone in bone local space. | |
| |
| //VertexPositionSetState// has this format: |
| ^ Type ^ Name ^ Description ^ |
| | [[gamedev:dnp#data_types|float]] | Weight | Weight of vertex position set. | |
| |
====== Linked States ====== | ====== Linked States ====== |
| ''4'' | [[gamedev:dnp#state_value_data_types|Float32]] | PlayTime | Playback time in seconds. | | | ''4'' | [[gamedev:dnp#state_value_data_types|Float32]] | PlayTime | Playback time in seconds. | |
| ''5'' | [[gamedev:dnp#state_value_data_types|Float32]] | PlayPosition | Playback position in seconds. | | | ''5'' | [[gamedev:dnp#state_value_data_types|Float32]] | PlayPosition | Playback position in seconds. | |
| |
| ===== Revision ===== |
| |
| ^ Date | Changes | |
| | 9.5.2023 | <WRAP> |
| * Added support for Vertex Position Sets (Feature Bit ''0'') |
| </WRAP> | |
| |