Author Topic: CBANIM in FRED Tutorial  (Read 2248 times)

0 Members and 1 Guest are viewing this topic.

Offline ShadowWolf_IH

  • A Real POF Guy
  • 211
    • CoW
CBANIM in FRED Tutorial
Someone asked me in a PM how I did this

http://www.hard-light.net/forums/index.php?topic=67721.0

 in FRED so I made the Tutorial.  Quite simple, but quite time consuming.  I am including the RAR in case anyone feels the need to put it somewhere more permanent.

Quote
How to build a CBANIM in Fred by ShadowWolf_IH.

Permission is granted for reproduction and redistribution of this work.  Just give credit.

This tutorial assumes that the reader knows nothing about the programs listed.  I ask that those with experience in these programs not take offense while I explain every step as if you were new to these programs. 



Things you will need:

Fred (I use 3.6.10)

·   A decent Paint shop program.  (I use Jasc Paint Shop Pro 7, cause the trial version is free)

·   Anibuild32  (http://www.hard-light.net/forums/index.php?action=printpage;topic=54940.0)

·   aniview

·   Lots of time, and patience.

Step 1.  Getting Fred ready to roll.

Open Fred, leave your current options set, as you are only placing the ships right now.  Let’s start with one ship….An Orion.

Place him somewhere away from Alpha 1.    Notice he is lined up on the Z axis, but facing away.   Let’s fix that first.  Right click on him, and click on “Edit Position and Orientation.” 

 
Fig. 1-1

Make sure that “Point to” and  “Location” are checked, then copy the X: window in the position box to the X window under Location.  Drop down to the Z: window under Location and enter a NEGATIVE number…I usually go with –3000.


Fig. 1-2

Hit OK.

Set the view you want and set you background accordingly.  In other words move the camera until you see the ship from the angle you envision it, or until you find one you like.    Save the camera position  (view/ save camera position). 


Fig. 1-3

NOTE:  USE THE ZOOM FEATURE TO CHANGE THE CAMERA POSITION AS IF THIS IS THE ANIMATION.  DO THIS TO ENSURE THAT THE CAMERA AT NO TIME DURING THE BUILDING PASSES THROUGH THE SHIP.  OTHERWISE YOU WILL HAVE TO START OVER, OR CHANGE THE ANIMATION.

If you have a good angle, hit View / Restore Camera Position.

Now hit view again, and turn off any options that interfere with the visual effect of the animation that we are building.


Fig. 1-4

I leave 3d compass on because I am lazy.  It will be cropped out anyway, so it doesn’t interfere.  “Render full detail” something you almost definitely want checked.  “Lighting from suns” can also be very useful.  If you use “Lighting from suns”, then open the background editor and fiddle with the ambient light feature there, very useful.

For our purposes today I am just going with the standard lighting, because once again, I am Lazy.

Fred is now set up and ready to build.



Step 2:  Building the animation.

NOTE:SINCE THE USABLE CBANIM AREA CHANGES WITH DIFFERENT SCREEN RESOLUTIONS, I WILL BE GIVING THE TUTORIAL BASED ON 1024 X 768, WHICH IS THE RESOLUTION I USE.

NOTE:  STEP 2 WILL ASSUME THAT YOU ARE USING JASC PSP 7 TRIAL, IN CONJUNCTION WITH FRED.

With Fred still open, hit “prtscn”.  You are going to become very good friends with that button.

Open PSP 7.

If you haven’t already done so, hit View/Toolbars.  The options you see checked are generally all I use.  You’ll want the “Tool Palette” option checked.


Fig. 2-1

Hit “Edit/Paste As new Image.”


Fig. 2-2

You should be looking at an image of Fred.  If not, go back to Fred, hit “prtscn”, and then come back to PSP 7 and try pasting it again.


Fig. 2-3

The first thing we ant to do is crop this image.  Notice that in Fig. 2-3 the toolbar on the left has the fourth button depressed.  That is your crop button.  Double click it.  When you do the “Crop Area” window will open.


Fig. 2-4

Now get a calculator.  No I’m not kidding, we get to do math.  If you are running Freespace 2 in higher res, with 1024 x 768 screen resolution, then your usable area for CBANIMS is about 693 by 329 (see bottom of tutorial Step 2 to find usable CBANIM area for other resolutions) pixels.  Now this part is crucial, figure out where you want the LEFT side of your cropped image.  My resolution is set at 1024 x 768.  Once you have a round about, in the ball park, should be close number, input it into the window for Left:.  Now add 693 (or your width for CBANIM usable area), input the sum in the window for Right:.  Ie….250 + 693 = 943.  Next figure out where you want the top be, and input it into the window for Top:.  Now add 329 (or your height for CBANIM usable area), input the sum in the window for (you guessed it) Bottom:.  Ie…320 + 329 = 649.

Hit OK.

There should now be a white box in your image.  This will be the image after cropping.  If you are not happy with it, simply redo the crop (Double click on crop button) figures and move the area in whichever direction you need, being careful to keep the dimensions equal to your CBANIM usable area.


Fig. 2-5

The nice thing is that you only have to set it up once.

Once you are happy with where the image will be cropped, double click inside the white box, and it will crop.

Now we need to decrease color depth.  We crop it first to get rid of our windows taskbar colors, and Fred toolbar colors.  With only 256 colors to work with they are at a premium.

Hit “Colors/Decrease Color Depth/256 Colors (8bit).”  See fig 2-6.

This will open the Decrease Color Depth – 256 Colors window.  Just hit ok,


Fig. 2-6

You now need to save the color palette.  Hit “Color / Save Palette”


Fig. 2-7

Name the Palette whatever you want.

Now save the file.  Hit File / Save As.  Have a folder ready to save a million files.  Change the file format to Z soft paintbrush (*.pcx).  Name your file.  I simply go with things like CB0000.  The name is important.  Whatever you name it, follow the name with four zeroes.  So the actual name of my example file is CB1, and when we add the four zeroes, it is CB0000, which I saved it as.

First frame is done.

Now go back to Fred.

Hit “Editor / Objects” to open the Object Orientation Editor.  Subtract 10 from the Z axis.  Remember that Negative 20 minus ten equals –30.  (-20 –10 = -30)

TIP:  The larger the number that you subtract, the faster the object will move through your animation window.  This is useful if you have fighters and capital ships.  Select the wing of fighters from the wing editor, use edit object, and subtract a larger number than you are using for the capital ship, then select the capital ship from the ship editor, reopen the object editor, and use the lower number for the capital ship.  In this manner the fighters will travel faster than the capital ship if you do this in every frame.

Hit OK.

Hit “prtscn”

Go back to PSP 7.

Hit “Edit / Paste / As New Image.

Your new image will appear.

This part is nice, Double click the crop again, and this time when the crop area window appears, your numbers are still there.  Just hit OK.

Now you have a choice.  You can either load the color palette from the first frame by hitting “Color / Load Palette”, or you can go up and hit “Edit / Copy”.

 If you opt for loading the palette, once it is done, simply save as, same name but instead of 0000, it is 0001.    ie…CB0001.  Don’t forget to change the type to Zsoft Paintbrush (*.PCX). 

If you opt for hitting “Edit / Copy”, bring up frame 1 (CB0000), and hit “Edit  / Paste / As New Selection”.  If you do this, be careful not to move the mouse after the image pastes, just click again to set the image.  It will load the color palette, and when you save as CB0001, it will save it as a PCX, because the frame is already a PCX, just being edited. Save it as CB0001.

Anyway….repeat these steps for each frame, careful of the naming.  When you go to name it “10”  it will look like CB0010, not CB00010, because then we have added 5 digits instead of 4, and our anibuilder won’t recognize it.. Where CB1 is the name, and 0010 denotes frame 10.  Frame 150 would look like CB0150. 

NOTE:  TO FIND CBANIM USABLE AREA FOR OTHER RESOLUTIONS, BUILD A MISSION WITH A  CB IN IT, DURING THE CB HIT “PRTSCN”, AND THEN CLOSE THE MISSION.  IN PSP7, PASTE AS A NEW IMAGE.  ONCE PASTED, USE THE CROP TOOL TO FIND YOUR WIDTH AND HEIGHT.  IF YOU SINGLE CLICK ON THE CROP TOOL, YOU CAN DRAG THE CROP AREA BORDERS, WHICH IS EASIER FOR WHAT WE ARE DOING.  CROP THE IMAGE.  THEN HIT “IMAGE / INFORMATION”, YOUR CBANIM USABLE AREA WILL BE LISTED AS THE SIZE OF THE IMAGE.



Step 3  Compiling the animation

First thing you need to do is open anibuilder.


Fig.3-1

Anibuilder is very simple to use, which makes it very nice.

Note that in Fig. 3-1 “After creation, test the ANI in ANIBUILDER32 player” is checked.  If this isn’t checked, you have to open the aniview manually.  Leave it checked.

Hit “Select”.

This opens the “Open” window, simply navigate to the folder where you have all of your frames stored.  The only frame that will show up is the first one (0000).  Don’t panic, the rest are there.


Fig. 3-2

Click on your file and hit “Open”.


Fig. 3-3

Notice in the status window that it gives you the information about the number of frames, and about the resolution.  If  the number of your highest frame isn’t equal to Number of Frames –1 (to account for frame 0000), then you have a naming issue.  Anything wrong with your frames will appear in this window.  And need to be fixed before you can proceed.

Once there are no errors and you have the proper number of frames, hit “Start”.

It compiles the animation.  After the animation is compiled, and you close the viewer, look again in the status window.  Any degradation of frame color will be listed here, what this means is that you got forgot to change the color palette before saving.  Find the frame (it gives the frame number, so add 1 to this to find your file name, and fix the problem.  Rerun the animation builder.

As a note, play with the advanced settings to see what else the program can do, for our purposes here though, leave the default settings.

TIP:  I build my ani just about every ten or 15 frames.  Just as test builds.  This way if I make a mistake somewhere I don’t have to fix a lot of frames.  Most common mistake is naming, but it still easier to rename 9 frames than to rename 187 frames (trust me on this).

Step 4.

Lots of time.

 The frame rate is 15 frames per second.  This means that you can realistically look at spending 20 minutes per second of animation, at the very least.  It takes a while to do this, but the results can be pretty good.

And the full rar including the images:
http://mt.hard-light.net/devel/images/TutorialFredCB.rar
You can't take the sky from me.  Can't take that from me.

Casualties of War

 

Offline ReeNoiP

  • 27
  • I FRED
Re: CBANIM in FRED Tutorial
Couldn't you make a cutscene in FRED and record it ingame using something like FRAPS or Taksi instead, and then convert the video/use the screenshots?
Uncharted Territory is released. But I still need voice actors

  

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Re: CBANIM in FRED Tutorial
You need the frames in 256-color PCX format. Recorders can't do that.
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: CBANIM in FRED Tutorial
Yeah, that's going to be way slower than doing it with FRAPS. There's a freeware program called Imagegrab that'll convert the Avis produced by FRAPS to a series of images. You can then do a batch process in PSP on them to crop or resize all at once, rather than doing every image individually. You can also use batch processing to convert them to a standard palette, which is easy to generate by just making a big image, pasting a dozen or so animation frames into it (choose frames that represent the widest possible range of colours) and reducing it to 256 colours. This way you'll get all the fancy FSOpen effects as well as weapons fire, better looking BGs etc. etc. and it'll be much quicker.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: CBANIM in FRED Tutorial
Of course, there will be a code change enabling the use of .effs in place of anis coming to trunk very soon. No more dicking around with pcx.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline ShadowWolf_IH

  • A Real POF Guy
  • 211
    • CoW
Re: CBANIM in FRED Tutorial
I figured that there were easier ways.  I just didn't know any, so when someone asked me how I did it, I wrote them a tutorial and thought that someone else may benefit from it.  Now I need to find the easier way and make a new tutorial. :p

Seriously, I've never messed with cbanims, I ain't even a modeller, although I can change the colors on a texture, and and that box looked downright spiffy sitting there in truespace.  It was my first decent attempt at a cbanim, and I thought someone could use a tutorial.  In fact, since I revamped the original Casualties of war, and redid some things in CoW2, while prepping for CoW 3 (which is what the ani was made for) I've decided to retool my horrid attempts at cb anims in Cow 2.  Same ani's but better quality.
You can't take the sky from me.  Can't take that from me.

Casualties of War