Project

General

Profile

Bug #3747

NPC lip movement differs from original engine

Added by R. D. about 1 year ago. Updated about 2 months ago.

Status:
Confirmed
Priority:
Low
Assignee:
-
Category:
Animation
Target version:
Start date:
02/12/2017
% Done:

0%

Reproducibility:
Always
Operating system:
Other
Severity:
Minor

Description

NPC lip movement differs from the original engine. I haven't looked into it in depth but I noticed the issue with the guard who walks you through the ship in the opening.

Attached photos are about at the point where the guard's mouth is at its widest. The difference may not be as noticeable with other NPCs, like the dark elf in the very beginning.

vanilla.jpg View (99.1 KB) R. D., 02/12/2017 02:50 PM

openmw.jpg View (95.4 KB) R. D., 02/12/2017 02:50 PM

History

#1 Updated by Alexei Dobrohotov 6 months ago

  • Status changed from New to Confirmed
  • Operating system changed from Windows to Other

#2 Updated by Alexei Dobrohotov 5 months ago

  • Target version set to openmw-1.0

#3 Updated by Andrei Kortunov 3 months ago

You can play with the talk formula. Looks like the "2" multiplier is arbitrary, so you can look for a better multiplier.
As for me, 2.5-3.0 multipliers look better.

#4 Updated by Chris Robinson 3 months ago

Might also want to look in [url=https://github.com/OpenMW/openmw/blob/master/apps/openmw/mwsound/loudness.cpp#L12]this function[/url] which calculates the "loudness values" used to open the mouth. We currently take the root mean square of a chunk of audio samples to produce the loudness value, but this may not be the optimal way of calculating how open the mouth should be.

#5 Updated by Will Herrmann about 2 months ago

@Chris Robinson Can you explain the output of the function you pointed to? I'm not sure how the range of [-1, 1] translates to "loudness". Is -1 silent, 0 medium, and 1 loud? And is it linear or logarithmic (like the decibel scale)?

#6 Updated by Chris Robinson about 2 months ago

Can you explain the output of the function you pointed to? I'm not sure how the range of [-1, 1] translates to "loudness". Is -1 silent, 0 medium, and 1 loud? And is it linear or logarithmic (like the decibel scale)?

The function results in linear loudness values between 0 and 1. 0 is silent (mouth completely closed) and 1 is full volume (mouth completely open). It's the root mean square (RMS) of a number of samples. Given an array of input samples[] that range from -1 to +1, it's calculated as:

rms = sqrt((samples[0]*samples[0] + samples[1]*samples[1] + ... + samples[n-1]*samples[n-1]) / n);

This is the standard way to get the perceptual loudness of a series of audio samples. Every 'n' samples produces another rms value, and these series of values are used as the loudness over time (at a rate of 20 loudness values per second, currently).

Also available in: Atom PDF