Design Doc for Review (Suggestions?)

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

starfury2004

New Member
Apr 7, 2004
4
0
0
Coding Project (Small Payment) with Design Doc

Contract Details

Note: E-mail address edited

This is a revamp of a thread I posted about a month ago. My time has grown increasingly limited on my UT2K4 cinematic and so I'm interested in contracting someone to do a quick bit of custom coding for use in my (and other) cinematics. I'm not a professional business, just a hobbyist Machinima maker who needs some coding help. However, I do believe in compensating people for their work and that's why I'm posting this.

Payment for this contract will be $100.00 US, payable upon completion of the project (that is, we've got a working version of the new code). I'm hoping it won't take more than a few hours of work. You will need a Paypal account, as this is how payment will be made when the contract is completed.

I'd like to have the code written and working by July 15 (a little over 3 weeks from now). I will provide all necessary resources (a texture package with the necessary textures, as well as a small level and working xPawn complete with AIScript for testing). All you'll be responsible for is the coding. You will need some basic knowledge of how xPawns and AIScripting work to complete this project (check out udn.epicgames.com for some info on these).

If you are interested in this project or have any questions about the design doc below, send an e-mail to tebakutis (at) hotmail.com. NO ATTACHMENTS PLEASE (e-mails with attachments will be deleted). In the body of the e-mail, please include all pertinent contact information and any other UT2K3/4 coding projects you have worked on and/or completed, as well as links to those projects, if available. If I think you're a good fit for the contract I will contact you via e-mail and we will work from there.

The coding I need added to UT2K4 (texture based lipsync) is outlined in the design document below.


Design Doc (First Draft)

Overview
Add a new command to the AIScript commands available to govern UT2K4 xPawns. This command, Action_TEXLipsync, will allow the user to enter a 'Target', 'AnimationString', and 'CycleSpeed' (just as you set rotation values and animation names in various other commands) that will cycle through a variable number of textures on the target xPawn's 'head' skin, simulating lip movement.

How It Works
Action_TEXLipsync will cycle through a set of textures on the target xPawn's Head Texture (texture1) at short intervals (set by the 'CycleSpeed' variable.. examples would be 0.1 and 0.2 seconds). This will simulate mouth movement--one skin will show the mouth half open, another making an 'O' motion, etc. These textures will be stored in the same .UTX file and directory as the default texture used for the head. In addition, the Action_TEXLipsync command will parse a user entered string 'AnimationString' from UED that determines how many skins it cycles through.

Naming Conventions
A full set of textures will be required for this to work. (Note--these will be provided to you in a .UTX file). Each texture would share the name of the current texture1 on the xPawn (set in UED) with an addition. So, the default texture1 on an xPawn would be SarahHead, saved in CinTextures.utx. In addition, in that same directory in the UTX you'd have SarahHead_O, SarahHead_I, SarahHead_E, etc.

When the code executes, it would get the filenames for the textures it cycles through by adding a _O, _I, etc to the name of the texture on the xPawn's head. So, in this case, it would generate SarahHead_O, SarahHead_I, etc (these would match the textures included in the UTX in the same directory as SarahHead). This naming convention is used to allow the end-user easy customizability when using this command with custom skins. This means non-coding people (the bulk of Machinima/Matinee creators) can easily use it with their own skins/work.

The 'Target' User Entered String
This is a text string that acts upon any xPawn that has its Tag set to the string name (just like giving an xPawn an AIScript name tells it which AIScript to reference). So, an Action_TEXLipsync command with 'Target' set to 'Sarah' would act upon any xPawn with the tag 'Sarah', specifically, the texture set as that xPawn's 'head', and cycle this texture when executed.

The 'AnimationString' User Entered String
This is a text string with a termination character that will be parsed when the Action_TEXLipsync command is executed by an AIScript. So, if the user enters the string 'ooipez' in the Action_TEXLipsync's 'AnimationString', the command would parse that string and know to swap the head texture on the xPawn with the tag 'Sarah' five times, briefly displaying the O texture twice, the I once, the P once, and the E once, before returning to the default texture (SarahHead). The Z would be the termination character that lets the parser know it has found the end of the string and has finished its work, exiting the loop.

The 'CycleSpeed' User Entered String
This will set how fast the command cycles through the skins on the head. This will be useful for having people talk faster or slower (I'm not even sure what value will look good, so it has some flexibility). Basically, this numerical value will be passed to the code. If it is set to '0.2', when the Action_TEXLipsync command executes it will swap skins as set in 'AnimationString', swapping one skin every 0.2 seconds until it reaches the termination character.

Concept Notes
Why use skin-swapping instead of bones, like in the UT2K4 intro? Well, I'm thinking this is for the casual Machinima/Matinee creator, someone who isn't going to have access to custom models with the bones necessary to do phenomes. The average joe won't be able to bone a new model to use the lipsyncing process, but everybody can create a set of skins fairly easily. The end result will not look as 'nice' as bone animation, but it will be much easier to code and much easier for non-coding types (most Machinima people out there) to work with.

Why use a Target field instead of having the Action_TEXLipsync command simply act upon the actor calling it? This relates to setting up Matinee movies and xPawn scripting... if you tell an xPawn to move to a point in the map, it can't execute any other commands until it reaches that point (its AIScript pauses). That means if the script acted upon the xPawn calling it, you could only use it as long as the xPawn was standing still.

I already use a separate AIScript for playing voice files in my Matinee productions. This allows me to have a sound file start playing in the middle of an xPawn's action, e.g, as it is walking to a point, when it normally cannot handle other commands. This is regulated by WaitForEvent commands in the Matinee Scene and xPawn AIScripts to keep it from getting out of sync with the animation. By allowing the Action_TEXLipsync to target an actor other than that which calls it, I can easily do skin swaps on a targeted xPawns that is already doing something else (e.g., walking to a point, firing a weapon).


Thanks for reading this (long) doc, and please contact me at the e-mail listed above if you think this is something you could do.
 
Last edited:

starfury2004

New Member
Apr 7, 2004
4
0
0
Just edited the thread to reflect moving this to a third party (I was previously gonna try to do it myself, but time constraints have sent me another direction). If you are interested in a contract project for a small fee, please read the post below.
 

dataangel

New Member
Apr 11, 2004
184
0
0
Doesn't impersonator handle the moving of bones for talking for you? I haven't tried it but that was the impression I got.
 

starfury2004

New Member
Apr 7, 2004
4
0
0
Doesn't impersonator handle the moving of bones for talking for you? I haven't tried it but that was the impression I got.

Yeah, you got it right... only problem is you need to have a skeleton and model already rigged for facial animation. The default skeletons that came with UT2K4 do NOT have any facial bones (no lips) so don't have any options for Impersonator animations. In addition, none of the UT2K4 default player models are modeled with an opening mouth (it's just a flat face) so there's no geometry to bind to the bones even if you did have the bone structure.

So, long story short, you can use Impersonator, but you'd need a person with a good amount of 3DS or Maya experience, the original source model of the UT2K4 character you wanted to lipsync (which you'd have to edit to add the lips), a skeleton with lipsync bones attached to that model and imported in UED, and a TON of extra time. Most people (including me) don't have this, as is the case with most amateur movie makers... so, a skin swapping option is simple to prepare by comparison (just create 9 skins and you're good to go!) and all it requires is updating a texture package (which means it can be used with all the existing models and skins).