Lip File Format: Difference between revisions

From Bohemia Interactive Community
m (Text replacement - "\[\[Category:BIS( |_)File( |_)Formats\]\]" to "Category:Real Virtuality File Formats")
(Page refresh)
Line 1: Line 1:
{{Feature|UnsupportedDoc}}
Lip is a humanly readable text file generated by [[WaveToLip]] from any wss, wav, or ogg sound file and produces lip expressions (lip sync) for the speaking character.
Lip is a humanly readable text file via bis tool [[Wave2Lip]] that analyses any wss, wav, or ogg sound file and produces lip expressions (lip sync) for the speaking character.


The source sound must be mono, 16 bit, to have any meaning in a lip file.
{{Feature|informative|
* The source sound must be mono, 16 bit, to have any meaning in a lip file
* The lip file must be named the same as the speech sound file for the engine to use it, e.g {{hl|PlayerTaunt.ogg}}, {{hl|PlayerTaunt.lip}}
}}


The data within is sampled every <frame> seconds which happens to be a fixed in concrete 40msec, but could be changed by oem, or bis.


Only changes of expression are stored in a lip file. If there's nothing stated at that <frame> interval, no change (obviously) takes place.
== Syntax ==


The expression is a filtered delta change between one sample interval and the next.
The file begins with the frame step value {{hl|1= frame = <value>}}, e.g {{hl|1= frame = 0.040}} (this value is hardcoded in WaveToLip).


<pre>
{{Feature|informative|This line is inserted by WaveToLip and is not necessary for the file to work.}}
frame = 0.040// A constant.
 
time  expression(range 0..7)
It is then followed with lines of {{hl|<timestamp>, <value>}}:
0.000, 0 //start time always 0
* {{hl|<timestamp>}} is a 3 digits precision float ranging between 0.000 (beginning of the file) and the audio file duration in seconds
* {{hl|<value>}} is an integer ranging between 0 and 7 (included) which corresponds to a <sqf inline>"CfgHeads" >> "Default_A3" >> "Grimaces" >> "Lipsync" >> "vizem"</sqf> animation index.<br><spoiler text="Show animation list">
* {{hl|A3\Characters_F\Heads\Anim\male\Neutral.rtm}}
* {{hl|A3\Characters_F\Heads\Anim\male\a.rtm}}
* {{hl|A3\Characters_F\Heads\Anim\male\e2.rtm}}
* {{hl|A3\Characters_F\Heads\Anim\male\f.rtm}}
* {{hl|A3\Characters_F\Heads\Anim\male\m.rtm}}
* {{hl|A3\Characters_F\Heads\Anim\male\y.rtm}}
* {{hl|A3\Characters_F\Heads\Anim\male\v.rtm}}
* {{hl|A3\Characters_F\Heads\Anim\male\i.rtm}}
</spoiler>
 
The first timestamp-value line is always {{hl|0.000, 0}}.<br>
The final line is {{hl|<fileDuration>, -1}}, indicating the lip movement's end.
 
<syntaxhighlight lang="cpp">
frame = 0.040
0.000, 0
0.080, 2
0.080, 2
.....
// ...
11.080, -1 //end time. which is also the length in seconds of sound file
11.080, -1
</pre>
</syntaxhighlight>




[[Category:Real Virtuality File Formats]]
[[Category:Real Virtuality File Formats]]
{{GameCategory|arma1|File Formats}}
{{GameCategory|arma1|File Formats}}

Revision as of 15:08, 8 May 2025

Lip is a humanly readable text file generated by WaveToLip from any wss, wav, or ogg sound file and produces lip expressions (lip sync) for the speaking character.

  • The source sound must be mono, 16 bit, to have any meaning in a lip file
  • The lip file must be named the same as the speech sound file for the engine to use it, e.g PlayerTaunt.ogg, PlayerTaunt.lip


Syntax

The file begins with the frame step value frame = <value>, e.g frame = 0.040 (this value is hardcoded in WaveToLip).

This line is inserted by WaveToLip and is not necessary for the file to work.

It is then followed with lines of <timestamp>, <value>:

  • <timestamp> is a 3 digits precision float ranging between 0.000 (beginning of the file) and the audio file duration in seconds
  • <value> is an integer ranging between 0 and 7 (included) which corresponds to a "CfgHeads" >> "Default_A3" >> "Grimaces" >> "Lipsync" >> "vizem" animation index.
    • A3\Characters_F\Heads\Anim\male\Neutral.rtm
    • A3\Characters_F\Heads\Anim\male\a.rtm
    • A3\Characters_F\Heads\Anim\male\e2.rtm
    • A3\Characters_F\Heads\Anim\male\f.rtm
    • A3\Characters_F\Heads\Anim\male\m.rtm
    • A3\Characters_F\Heads\Anim\male\y.rtm
    • A3\Characters_F\Heads\Anim\male\v.rtm
    • A3\Characters_F\Heads\Anim\male\i.rtm

The first timestamp-value line is always 0.000, 0.
The final line is <fileDuration>, -1, indicating the lip movement's end.

frame = 0.040
0.000, 0
0.080, 2
// ...
11.080, -1