RLPy.RIVisemeComponent
+ Inheritance diagram for RLPy.RIVisemeComponent:

Public Member Functions

def __init__ (self, args, kwargs)
 
def LoadVocal (self, pAudio, kStartTime, strClipName)
 Import voice source to generate facial/Lips expressions for avatars. More...
 
def AddVisemeOptionClip (self, kSmoothOption, kStartTime, strClipName)
 You can separately adjust the viseme animation strength/smooth for the tongue, lips, and jaw from this function. More...
 
- Public Member Functions inherited from RLPy.RIBase
def __init__ (self, args, kwargs)
 
def IsValid (self)
 Is valid or not. More...
 

Detailed Description

RIVisemeComponent.

avatar_list = RLPy.RScene.GetAvatars()
avatar = avatar_list[0]
viseme_animator = avatar.GetVisemeComponent()
#set the RVisemeSmoothOption
viseme_smooth_option = RLPy.RVisemeSmoothOption()
full_enable = True
full_value = 0.3
jaw_enable = True
jaw_value = 0.4
lips_enble = False
lips_value = 0.5
tongue_enble = True
tongue_value = 0.6
self.viseme_smooth_option.SetStrengthEnable(full_enable, jaw_enable, lips_enble, tongue_enble) #bFullEnable, bJawEnable, bLipsEnable, bTongueEnable
self.viseme_smooth_option.SetStrengthValue(full_value, jaw_value, lips_value, tongue_value) #fFull, fJaw, fLips, fTongue
# load vocal
audio_object.Load("C:\\sample.wav")
clip_name = "VisemeClip"
clip_start_time = RLPy.RTime(0)
viseme_animator.LoadVocal(audio_object, clip_start_time, clip_name)
viseme_animator.AddVisemeOptionClip(viseme_smooth_option, clip_start_time, clip_name)

Member Function Documentation

§ AddVisemeOptionClip()

def RLPy.RIVisemeComponent.AddVisemeOptionClip (   self,
  kSmoothOption,
  kStartTime,
  strClipName 
)

You can separately adjust the viseme animation strength/smooth for the tongue, lips, and jaw from this function.

Parameters
kSmoothOption[IN] Settings of Smooth/Strength - RLPy.RVisemeSmoothOption
kStartTime[IN] Specifies the start time of the clip - RLPy.RTime
strClipName[IN] The name of the clip - string
Returns
Success or Fail or InvalidParameter - RLPy.RStatus

§ LoadVocal()

def RLPy.RIVisemeComponent.LoadVocal (   self,
  pAudio,
  kStartTime,
  strClipName 
)

Import voice source to generate facial/Lips expressions for avatars.

Parameters
pAudio[IN] Input audio source - RLPy.RIAudioObject
kStartTime[IN] Specifies the start time of the clip - RLPy.RTime
strClipName[IN] The name of the clip - string
Return values
RLPy.RStatus.SuccessSuccess
RLPy.RStatus.FailureFail