Fr: frame rate
Ss: user defined as the square size for the user particular movie
Wd: width
Ln: lenth
Cs: cube size--the size of the cube in a texture in pixles-- smallest 8x8
Px: pixel--one square of one color in a picture
Mts: Max texture size--the largest size that cube can import-- set at 4096 or 2^12.
Cell: defined as one piece (as a square) that displays part of the movie-- this will be later converted into a texture.
Grid: defined as a set of cells (squares) that define one overall movie
Pixelated: the effect when you see little boxes of color. Like a low quality pic or mov
Pic: picture
Mov: Moive, Video, or other movie like multimedia
Multi piece texture movie: a movie divided with a grid creating cells which are imported into cube and pieced back together
Min: Minutes
st8-^2: a term which means a number greater than 8 and is a power of 2 (ie 8,16,32,64 ect)
Note: all cubes are 8x8 px and incress by *2 or st8-^2.
Note: Quick interpretation assumes that you have flash 8 or greater. If you do not have flash read below
See example: CFE's Movie Map
This was set by Chris, using my article (and my help) :)
☻ When making the first texture, use the align functions (window-align). Lay down all the horizonals then use the distribute command. Then group each row and distribute vertically. Note: make sure that the top and bottoms are perfectly aligned before you distribute or you will have gaps.
☺ Before exporting each image piece (or cell) of the movie change the stage size to the size you need this way you dont make to much or to little.
☻ Use the properties window to change the x y wd ln (this will make it more accurate.
☺ Export as jpg sequence not gif sequence (gif has a lower color depth--which means less colors to choose from-- it will make it look pixelated).
☻ Dont export at a fps lower then 12 or higher then 30.
Start at step number 14.
Note: this is a graph that you need to look at.
First find the length of your movie in min.
ln px x px 140 min 8 x 8 9 min 32 x 32 34 sec 128 x 128 2 sec 512 x 512
Now you need to figure out how much space you want your animation to take in cube. Take a grid size according to the cart and plot out the space you want the movie to cover in cube.
Ss ingame grid size number
8 1
32 2
128 3
512 4
♪ The easiest way to find your grid size is to scroll down your grid size to the bottom (g + downscroll) thats 1. 1 g + upscroll is 2 and one more 3 etc.
♫ Now count how many wd you want. Count the number of cells in game. These will translate to the same grid cells when doing the process.
Figure out the ratio of your movie 16:9 (rectangle) or 5:4 (square). Note it is best to use something that 9 or 4 can fit in. You need to figure out how many height that is. So simply divide your in game cell count by the width ratio and multiply by the hieght ratio---
ht = wd N gc
Note N is the ht count and gc is the ingame count.
If you do not know how to do this simply cross multiply here
If your in game count is 8 cells and you are working with 5:4 ratio. If i 8/4*5 i get 10. Now i need to put a 10x8 grid over my video and then render each cell separately.
If now your in game count is 18 cells and you are working with 16:9 ratio. If i 18/9*16 i get 32. Now i need to put a 32x18 grid over my video and then render each cell separately.
Note: YOU MUST come out with an even number-- you can not half a cell-- it would be a pain in the @$$ :)
We need to take a picture and convert it to a movie. To do this we must trick the mind by flashing images by the eyes at such a rate that it looks like it is moving. Cube does not allow us to use any file type but image files. So we must use some type of code to solve the problem.
To solve the problem we must use a combination of code and texture format. Baby Rabbit came up with the code. Now we must apply the code to the texture.
To understand how to make a format for the code we must understand the code. The code takes an image scales it to a section (starting in the top left corner) of the texture and displays this area. Then it moves one cell over (cell means a distance of x value). When it reaches the end of the row it down one cell and back to the left side. Thus sliding thru the texture. If we can do this fast enough then we can trick the mind to think that it is a movie.
So what we need to do is to make our movies frames line up with the frame that the code displays. So we simply line frame 1 next to frame 2 etc until we get to the end of the texture and then we drop down and go to the left side and continue. We do this until the image is done.
Cube has a make size of 4096px. This does not seem like a problem until you have to display 30 images a second. To solve this we are going to cut our video into pieces. We will call these cells or pieces. These cells get exported as separate textures so that we do not reach above are make texture space. The smaller each cell the longer the image can go on. The cap is around 1hr 1/2 at about 30 fps. But if we divide it up too much we will run into the problem that we have too many textures to lay out which becomes a nightmare. It is best advised to keep your movies less then 9 min, because a game is only 10 or 15 min long and if you use 9 you can stay in the 2 grid size which will make it easier.
Ok so to explain the tables and how they work and how i got the numbers.
First chart:
ln px x px 140 min 8 x 8 9 min 32 x 32 34 sec 128 x 128 2 sec 512 x 512
The formula is:
(((Ms/Ss)^2)/Fr)/60
Note:
Ss: squ size
Ms: max size
Fr: frame rate
60: because there are 60 seconds in a min
---------------------------------------------
The formula takes the Ms which is a const set at 4096 and divides by a Ss. Ss is a set of the following: Ss[8,32,128,512]. These are st8-^2. This gives you how many Ss's you can fit in a strait row down your texture, but a square has two sides. So we square the sides because the sides of a square are equal. Thus more or less we found the area of the cube as the Ss was the unit of measurement. Then we divide by the fr. This is because we need to know how many images we need to display in one second. Now we have the amount of seconds that we can run our video, we divide by 60, cuz there are 60 sec in a min. Note: to find hours divide by 60 again.
Second chart:
Ss ingame grid size number 8 1 32 2 128 3 512 4
This comes from the cube code. This is simply the amount of px that each texture takes when a particular grid size is used.
---------------------------------------------------------------------------------------------------------------------
The above should give you a complete understanding of the medthod in which you create movies. If you have any question post them, if you have any areas of the explaination you would like me to expond opon leave a comment. If you have question about programs (other than flash) to use for this process, leave a comment. :0 And if you have any ways to improve the process please comment.
Thanx
Your Humble Master
chasester
Attachment | Size |
---|---|
MovieShader.txt | 590 bytes |