collapse

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Is the SDK still feature incomplete?  (Read 3357 times)

Offline Another Wizard

  • Fledgling
  • *
  • Posts: 15
  • Reputation: +0/-0
Is the SDK still feature incomplete?
« on: January 12, 2017, 06:24:54 AM »
I remember first checking out the SDK back in 2011-ish when it first appeared. However I was turned off when I read that you couldn't import any models with animations or animate the faces of characters in dialogue.

I'm wondering if the SDK has gotten more involved in the years since or if it's still an impossibility?

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: Is the SDK still feature incomplete?
« Reply #1 on: January 12, 2017, 06:30:00 AM »
Are you sure you have the right idea?

Your wording doesn't tell anyone what you are really talking about.

Import what models? New models or models taken from the game? You can take existing models and modify them somewhat, reskin them etc., but you just can't take any model from anywhere and use it, no.

You always could animate the faces of characters in dialogue... That was never a limitation because the SDK isn't responsible for that. You simply make a .lip file and put in the correct syntax to make it happen?

?

Offline Another Wizard

  • Fledgling
  • *
  • Posts: 15
  • Reputation: +0/-0
Re: Is the SDK still feature incomplete?
« Reply #2 on: January 12, 2017, 06:40:39 AM »
Import what models? New models or models taken from the game? You can take existing models and modify them somewhat, reskin them etc., but you just can't take any model from anywhere and use it, no.

Which is unfortunate. Although I'm much more interested in knowing if it's possible to reanimate the characters and weapon animations. Since I always thought the default animations in VtmB weren't very good and I was wondering if it is possible to fix.

Quote
You always could animate the faces of characters in dialogue... That was never a limitation because the SDK isn't responsible for that. You simply make a .lip file and put in the correct syntax to make it happen?

Which is great since I remember the SDK's notes saying that it didn't support lipsync files. It's why I asked.

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: Is the SDK still feature incomplete?
« Reply #3 on: January 12, 2017, 07:05:13 AM »
Nobody has done that yet.

Animations are tied directly to some of the model files, except for a shared model file that grants the same set of animations (for example dancing) to all characters that reference it. There are ways to change the order and timing of some animations yes...for example I believe Wesp fixed the animations of the Gangrel warform so that its attacks would hit (originally it wasn't set properly so the second attack would always miss or something).

There are also expression files, but these use existing animation presets, and half of these expression files are encoded or compiled so they only show up as garbage from hexadecimal in a text editor, so you would have to decipher what format they are in and how to edit it, which to my knowledge nobody has done yet. The .txt component to these file pairings contain a long series of numbers that appear to be delays in how the character goes about its expression animation.

All in all, it's a big job - a lot of work.
« Last Edit: January 12, 2017, 07:32:01 AM by Icicle »

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 6675
  • Reputation: +886/-28
  • Unofficial Patcher
Re: Is the SDK still feature incomplete?
« Reply #4 on: January 12, 2017, 08:11:40 AM »
I believe Wesp fixed the animations of the Gangrel warform so that its attacks would hit (originally it wasn't set properly so the second attack would always miss or something).

That wasn't done by me, but probably by DLLullu. Apart from Lenuska he is the best model modder for Bloodlines, so if you want to do anything there, you should ask him.

As for the lip files, what the SDK notes refer too is that there is no tool yet to automatically create a lip file from a text line. At the moment you need to make this manually...

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: Is the SDK still feature incomplete?
« Reply #5 on: January 12, 2017, 12:51:22 PM »
That wasn't done by me, but probably by DLLullu. Apart from Lenuska he is the best model modder for Bloodlines, so if you want to do anything there, you should ask him.

Where can DLLullu be contacted? I did a search - don't see that name active on any forum or ModDB etc.

I'd like to ask about this, just in case there is some possibility I don't know about...I can put what I find out in this thread

I sent a message to Lenuska.
« Last Edit: January 12, 2017, 12:57:30 PM by Icicle »

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 6675
  • Reputation: +886/-28
  • Unofficial Patcher
Re: Is the SDK still feature incomplete?
« Reply #6 on: January 12, 2017, 02:10:18 PM »
Where can DLLullu be contacted?

I think he has an account here. Lenuska can be best reached on ModDB, she isn't here often...

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: Is the SDK still feature incomplete?
« Reply #7 on: January 12, 2017, 03:19:57 PM »
Where can DLLullu be contacted?

I think he has an account here. Lenuska can be best reached on ModDB, she isn't here often...

Ok, I'll try to message him. Edit: Member search for DLLullu returned nothing. Same for a forum search.

Yes, I already have a conversation with her there. I'm just waiting for her reply.

Offline atrblizzard

  • Administratrix
  • Methuselah
  • *****
  • Posts: 263
  • Reputation: +229/-1
Re: Is the SDK still feature incomplete?
« Reply #8 on: January 12, 2017, 07:11:30 PM »
As far as I know there is no proper way to compile skinned models with animations, or animations alone. There are some hacky ways to get models compiled into the game with Blender. Lip syncing is however all possible, but only on models that have facial animations (for instance PC models don't have).

Lip syncing is just setting up the phoneme data through FacePoser but can also be hand edited (albeit painfully). Last time I checked FacePoser still crashes on launch.

There are also expression files, but these use existing animation presets, and half of these expression files are encoded or compiled so they only show up as garbage from hexadecimal in a text editor, so you would have to decipher what format they are in and how to edit it, which to my knowledge nobody has done yet. The .txt component to these file pairings contain a long series of numbers that appear to be delays in how the character goes about its expression animation.

Strange, are you sure there are encrypted files there too? If that is the case, then it is something I wasn't fully aware. Either way, I have the entire expressions folder laying around, fully decoded in plain text. Might prove useful to some of you, so here it is.

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: Is the SDK still feature incomplete?
« Reply #9 on: January 12, 2017, 08:14:50 PM »
Lip syncing is just setting up the phoneme data through FacePoser but can also be hand edited (albeit painfully). Last time I checked FacePoser still crashes on launch.

When I was new to this I quickly moved to making a new NPC in Chinatown for test purposes. I gave her spoken dialogue MP3 files, then copied a .vcd and .lip file from elsewhere.

1. Getting the words and phonemes into your .lip file:

The trick to doing this quickly and flawlessly is to use a program with grep-like features. In my case I use Notepad++. The Find in Files feature (CTRL+Shift+F) is invaluable in moding this game. Point it at the character dialogue files in /sound/character/dlg/, limit the search to *.lip, and search for the words your character speaks one by one. Double-click one from the bottom in the search results, it appears in the text editor view, copy and paste back to your new .lip file, and just keep repeating until all the words your character speaks are listed in your new .lip file. If the search results become too cluttered, right click somewhere in them and choose Clear All. If you actually come across a word that isn't found in the game, search for similar words that use the same phonemes instead and construct the word out of the basic sounds yourself.

All things considered this doesn't take that long.

2. Getting the timing of your phonemes into the .lip file:

The next step is to get the timing right for the mouthing. This part is what takes the most time, but if you know an efficient method it really isn't more work than anything else in moding this game. What you need is a free audio editor called Audacity. Load up the character's dialog MP3 in it. Now using the selection tool (F1), zoom in a bit on the audio stream timeline (CTRL + mousewheel while the mouse pointer is over the blue stream graph). When you hear a word spoken, stop the playback (spacebar), select the timeline from the beginning until the end of the word. Hit spacebar again to playback your selection and keep trimming it (move the mouse to the very left or right edge of your selection until it becomes a pointing hand, hold Shift and click within the audio stream to adjust the selection length) and capture the word's exact start and end.

Now look at the bottom of Audacity: It shows the EXACT start and end point of your selection, down to three decimal places of a second (milliseconds). This is exactly what the .lip file accepts. So for example, if the character is saying the word "Hello" from 1.532 seconds until 2.567 seconds, you change the .lip like this:

WORD Hello 1.532 2.567
{
104 hh 1.532 0.096 1.000 0
603 eh 0.096 0.160 1.000 0
108 l 0.160 0.372 1.000 0
111 ow 0.372 0.948 1.000 0
105 iy 1.060 2.567 1.000 0
}

Notice the two values after Hello are the start and end of the word in the audio stream from the file.

The first value after the first phoneme ("hh" in this case) should match this first start value, always.
The second value after the last phoneme ("iy" in this case) should match this second end value, always.

Now you know where your word begins and ends. Next you have to select the first phoneme of your word from within this timeline. It's a little tricky at first but once you get the hang of it, it's really not so time-consuming anymore. If you mis-click and screw up your selection, you can manually type in the time start into Audacity at the bottom, then click into the end point around the single digit range of the seconds, and press the down arrow key on your keyboard until it resets to the same time (skips having to type it twice); then just hold Shift and reselect/trim your selection until it captures the phoneme again.

After each phoneme, you can put the start time of the next phoneme to be identical to the end time of the last phoneme you just did. This keeps you organized instead of fumbling around for each phoneme, and also saves work. (Of course, this won't be practical if your character pauses, breathes or whatever... this is just for words that happen one after another fast in a sentence.)

The last phoneme is easiest because you can just take the end of the second-last phoneme, and pair it with the end of the word, so you don't need to measure this one in Audacity. (Once again if the last phoneme is on its own and not part of a sentence like an expletive on its own ["... Fuck!"] then you'd have to measure its start point.)

3. Adding a subtitle:

The Mod Dev guide bemoans how tedious or inconvenient this is, but once again with the right tool it's actually easy. Subtitles are good if you call npc.PlayDialogFile("character/dlg/whatever/specific dialog line file #.mp3"). If you're not engaged directly in dialog with the NPC, the subtitle will appear at the top left of the screen.

(If the dialog line is only going to be heard in direct dialog with the NPC, then adding a subtitle is a truly pointless waste of time, so don't do it.)

For example, one character I made ambushes you in an alley, and yells something at you. You're not in dialog with them, so it's helpful, and consistent with the rest of the game, to see a subtitle appear.

Code: [Select]
CLOSECAPTION
{
english
{
PHRASE unicode 496 " H e l l o ?   H e y ,   b a b y .   N o ,   I ' m   s t i l l   a t   w o r k .   I   d o n ' t   k n o w ,   w h y   W O U L D   I   w a n t   t o   r u s h   h o m e   r i g h t   a w a y ?   . . .   Y e a h ?   I   d o   l i k e   t h a t .   W h a t   e l s e ?   W i t h   a   w h a t ? !   O h h h . . .   y o u ' r e   i n   t h e   k i t c h e n ,   y e a h ,   t h e y   w e r e   o n   s a l e   s o   I   b o u g h t   s o m e .   Y o u   d o   t o o   l i k e   z u c c h i n i ! "  0.000 19.344
}
}

Take this for example. The "496" number indicates how many characters from the first quotation " until the last quotation ", including the 'spaces' (which are actually NULL characters). However, you can't enter NULL characters into most text editors by default.

Once again Notepad++ shines because there are so many plugins for it. Choose Plugins menu > Plugins manager > Show Plugin Manager, scroll through the list to HEX-Editor, and get this plugin.

Once you have HEX-Editor, all you need to do is copy and paste the character's line ("Hello? Hey baby, ...blahblahblah") after the PHRASE unicode part. Just make sure it's in quotations. Now click on the first quotation mark. Keep your right hand's finger on the right arrow key on your keyboard. Push right once, hit spacebar, and repeat until your cursor reaches the last quotation mark. Now everything has a space after it (including the original spaces from the character's line.)

Now click back to the first quotation mark. Go to menu Plugins > HEX-Editor > View in Hex. Now the text editor will change to a hex editor, with the cursor still on the quotation mark you clicked on. You will notice the next character after (one of the many spaces you added) is 20, the hex code for a space. Once again hammer the right arrow key on your keyboard. Every second character should be 20, so change it to 00 (the NULL hex code). You don't want to use the Replace feature here, because that would replace all your character's dialog spaces with NULL. It really doesn't take long. When you're done, go to menu Plugins > HEX-Editor > uncheck View in Hex. You'll see NULL characters between your quotations and every letter/space/punctuation mark of the dialog.

Then just to be sure, select the text from the first quotation mark until the last (include the quotations in the selection), and look at the bottom of Notepad++ - the status bar. One part says "Sel: <number>" The number here is exactly the number you need to put in after the words "PHRASE unicode".

The last two numbers in this line -- in this example 0.000 19.344 -- are the start and end times the subtitle applies to the character's dialog. Generally, this can be matched with the start of the first word and the end time of the last word, but you may have to fine tune it if the subtitle is lagging behind, or showing up too soon.

Done - dialog isn't hard at all, with the right method and tools.

Strange, are you sure there are encrypted files there too? If that is the case, then it is something I wasn't fully aware. Either way, I have the entire expressions folder laying around, fully decoded in plain text. Might prove useful to some of you, so here it is.

Thanks. The expressions I extracted from the VPKs were paired into .txt and .vfe files. The .txt is readable, but like I said earlier, the .vfe is all garbage when read in a text editor...thus compiled or encoded in some way.
« Last Edit: January 12, 2017, 09:21:25 PM by Icicle »

Offline atrblizzard

  • Administratrix
  • Methuselah
  • *****
  • Posts: 263
  • Reputation: +229/-1
Re: Is the SDK still feature incomplete?
« Reply #10 on: January 13, 2017, 09:27:59 PM »
That's a really nice detailed post on how to create lip sync, albeit it is rather painstaking. If someone like Psycho-A or anyone else could fix Faceposer, or at least get the VFE export function to work as a separate tool to convert the expression/phoneme data to .vfe which the engine could then load.

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: Is the SDK still feature incomplete?
« Reply #11 on: January 13, 2017, 09:52:32 PM »
Where can DLLullu be contacted?

I think he has an account here. Lenuska can be best reached on ModDB, she isn't here often...

Ok, I'll try to message him. Edit: Member search for DLLullu returned nothing. Same for a forum search.

Yes, I already have a conversation with her there. I'm just waiting for her reply.

Oookay so his name is actually DDLullu , not DLLullu. Found him and sent him a PM, hope he replies

Offline Psycho-A

  • Russian Board Moderator
  • Methuselah
  • *
  • Posts: 291
  • Reputation: +31/-1
  • Bloodlines SDK developer
Re: Is the SDK still feature incomplete?
« Reply #12 on: January 16, 2017, 05:06:21 AM »
That's a really nice detailed post on how to create lip sync, albeit it is rather painstaking. If someone like Psycho-A or anyone else could fix Faceposer, or at least get the VFE export function to work as a separate tool to convert the expression/phoneme data to .vfe which the engine could then load.
Good news: The next SDK version 1.6.0 will include full-featured lip-sync and subtitle editor based on HL2's FacePoser in which writting new lipsyncs doesn't require any manual editings! The tool is ready yet and just needs testing :)

Offline atrblizzard

  • Administratrix
  • Methuselah
  • *****
  • Posts: 263
  • Reputation: +229/-1
Re: Is the SDK still feature incomplete?
« Reply #13 on: January 16, 2017, 02:14:29 PM »
Good news: The next SDK version 1.6.0 will include full-featured lip-sync and subtitle editor based on HL2's FacePoser in which writting new lipsyncs doesn't require any manual editings! The tool is ready yet and just needs testing :)
That's good news indeed! Does it support saving the phoneme data into a lip file instead embedding it into the dialog audio file like HL2 does? In any case, would be interested in giving it a spin if that's a possibility. :)

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: Is the SDK still feature incomplete?
« Reply #14 on: January 16, 2017, 02:32:46 PM »
That's a really nice detailed post on how to create lip sync, albeit it is rather painstaking. If someone like Psycho-A or anyone else could fix Faceposer, or at least get the VFE export function to work as a separate tool to convert the expression/phoneme data to .vfe which the engine could then load.
Good news: The next SDK version 1.6.0 will include full-featured lip-sync and subtitle editor based on HL2's FacePoser in which writting new lipsyncs doesn't require any manual editings! The tool is ready yet and just needs testing :)

Mind if I help you test? This could save me a pile of work...

 

SimplePortal 2.3.7 © 2008-2020, SimplePortal