GhostWriter is a game based on the corruption of nursery rhymes. By rewriting the nursery rhyme book, the crooked man has turned what was once good to evil. It is now up to the player to right this wrong and change the nursery rhymes back to their original state. The player must do this by taking control of a new character that has been written into the nursery book. The player will travel through nursery rhymes, meeting the now deceptive characters and it is up to them to bring peace to the nursery rhyme world.

Post tutorial Report RSS Importing Videos into Unreal

A tutorial looking at converting video files so that they work within the Unreal 3 engine.

Posted by on - Intermediate Mapping/Technical

This tutorial will show you how to import video files into the Unreal 3 engine (not all file formats are supported). First you will need your video file (obviously) and the RAD Video Tools available from: Radgametools.com

For this tutorial I’m going to show you how I imported the Foyer text from GhostWriter. Here is a movie rendered from 3DSMax.


I want this video to be placed into Unreal so we have to convert it into a .bik file using the RAD Video Tools.

Open up the RAD Video Tools from under ‘Bink and Smacker’ in the start menu. Next select your video file from it’s location and click on the ‘Bink it’ button.

I usually leave the settings as they are as I haven’t had a good look at what each setting does. The outcome however is fine though. So next click the Bink button.

Once it has finished compressing, click on ‘done’ and close RAD Video Tools. Next open the Unreal Editor and your map that you want to import the video into. This map is the Foyer for GhostWriter and the video I have just compressed needs to go here.

To import the video we go to the generic browser() and select file – import. Your video/bik file should now be selectable. Select it and click open. Name your package appropriately and click on OK.


Now it should be viewable in the generic browser under your package name. Don’t forget to save! To actually use it in the level, we need to make a material. So right click in the generic browser and select ‘New Material’.

Name the material appropriately.


This should open a new window. With the video selected in the generic browser, click and drag ‘texture sample’ onto the grey area in the new window.

Your video should now appear.

If you connect the video material to the diffuse channel (through the black boxes) you’re video can now be used in game (by applying the material to a mesh/brush). Example:

The material is applied to a plane mesh. Obviously I don’t want the text to look like this (it should look like the text is on the paper floor). So now I have to give the material opacity properties.

I’ve imported a black 128x128 texture. I’ve added this to the diffuse channel and changed the video texture to the opacity channel. Finally I need to change the blend mode to ‘BLEND_Translucent’. The material is now ready (after saving the changes of course). The material should up date in the game itself.

Obviously, you may not need to add an opacity map depending on the video you are using. Here is the final outcome in game.



Controlling when the video is played.
If you are using a video that you want to start at a certain time (by the activation of a trigger) you can use Kismet to control it.

Say I want the movie to start only when this trigger is touched, I would select the trigger, open Kismet () - right click in the grey area and select 'NewEvent Using Trigger-1' - touch.

Next, right click again and select, new action - cinematic - control movie texture.

Select the 'Control Movie Texture' box and click the small arrow next to 'Movie Texture' (make sure the movie is selected in the generic browser first). Your video name should now appear in the box.

Next, link the 'touched' channel of the trigger box to the 'play' channel of the movie box. We also need to set the instigator. So, right click - new variable - object - player. Connect the instigator channel to the player variable that is now shown.

Finally, we need to tell Kismet not to play the movie when the level starts, so right click again - new event - level startup. Link the 'out' channel to the stop channel of the movie box.


And that's it! The movie should not start until the player touches the trigger.

Sound

What's that I here you say, 'What if I have sound in my video!'. Well then, when the trigger is touched, you would also have to add a play sound function to the Kismet.



Link the channels to their required locations, add the sound to the sound box and that should be it. You could also set up cameras so that the video is full screen. They could then act as cutscenes. You would have to lock the player controls during this. If anyone would like to be shown how to do this please feel free to contact me.

And that concludes this tutorial. Thank you for taking the time to read this and hopefully you will have learned something from it :)
I have simply posted this tutorial to share my knowledge of the Unreal Editor and so that the modding community have a resource in this certain area. There may be a million different ways of carrying out the task but this is the way I do it, and it works!

© 2008 - Matt Barry

Post comment Comments
Dremth
Dremth

kewl. i didnt know you could even do this. thanks for posting this

Reply Good karma Bad karma+1 vote
matt_barry Author
matt_barry

No problem, thanks for checking it out!

Reply Good karma+1 vote
Mclogenog
Mclogenog

Wouldn't it be easier to create the texture, and then add a rotation function in the material editor? Same could be done with the moving "flying" text, but in that case it would be quite tricky to get such an elaborate motion. Well, you have it done as is, so no reason to check otherwise. Very creative method though

Reply Good karma Bad karma+1 vote
matt_barry Author
matt_barry

Yeah I have seen the rotator function but I thought it may take longer doing it that way. I was pretty confident it would work the way I did it, so I just went for it.

But hey, there may be a ton of different/easier ways to do things in my tutorial. I just want to show people how I do things and hopefully it will help :)

Reply Good karma+1 vote
Sythen
Sythen

Awesome Matt! Your doin' good.

Sythen.

Reply Good karma Bad karma+1 vote
hushpuppy
hushpuppy

awsome :D had no idea this was possible

Reply Good karma Bad karma+1 vote
DeineLtan
DeineLtan

Simple and important tutorial, thanks a lot!

Unfortunately, it doesn't seem to work so easy for me.
The movie gets totally dis-scaled when on a surface.
Only if I fill a whole cylinder with it, the top face will show it in the middle.

Has this to do with my clip resolution 480x272 or any other cause I need to check?

Reply Good karma Bad karma+1 vote
MrBCut
MrBCut

hey matt_barry? that was some really cool ****! very nice job man!!!

Reply Good karma Bad karma+1 vote
Guest
Guest

This comment is currently awaiting admin approval, join now to view.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: