3D Unit tutorial

Level

Prince
Joined
May 17, 2002
Messages
438
Location
Utah, USA
3D Unit tutorial 1
3D Studio Max
By Level

First create the unit model (this tutorial will not tell how to make the unit, I used one I made for fun)

Prepare the scene
Set the environment background to a unused color (usually magenta)
Create a floor object with the same color and about 50% self-illumination (the floor will not have shadows but will receive them)
Set the civ-specific color to a less used or unused color (usually blue)
Add two default lights to the scene
Set the upper light to cast shadows
Add a targeted camera at an angle of about 45 degrees
Add a dummy centered below the unit and link the camera and lights to it (this allows you to rotate the camera and lights easily)
Set the lights to cast shadows at the right place
Turn on show safe frame in the camera view port and adjust the camera position and render size to what is appropriate for the unit (check other units)
Save

Animate
Make the animation for one FLC (Default, Run, ect.)
Tip: if you want to have a better walking animation, make it walk then link the dummy and floor to the unit with sliding joints only in the direction it is moving
Turn off the animate button
Select the dummy and lock selection

Rendering
Set which frames and how many to render
Name the file something like “Unit_Run_SW_”
Save as .BMP with 8 bit optimized palette (256 colors)
Render each direction then roatate the dummy 45% and change the direction in the name
When done make animation for the other FLCs either as other files or as a sequence in the same file
Render the unit_32.pcx (usually a default SE view) with a size of 32x32
You can also make the UnitLarge.pcx 128x128 and the UnitSmall.pcx 32x32 pose the unit any way you want (it does not need civ-specific colors and is best without the magenta background, not sure about size) you can also use a real picture or anything else you want
 
3D Unit tutorial 2
BMP to FLC
By Level

This tutorial is also useful for non 3D units

Extract
Make a folder with the name you want your unit to be called in the game
In FLICster extract a unit with similar colors to storyboard PCX or BMP if available
Changing the size and frame numbers as necessary
Open it in a program that can change palettes (PhotoShop, Paint Shop Pro, etc.)
Change the last color to the background color of the unit you made (in PhotoShop the palette is reversed)
Change the colors just before the last to the same color fading to a darker color (the farther back the darker the shadows and the more colors you use the smother they are, not sure how far back the shadows go)
Make sure the civ-specific colors are the same
Change any other colors needed
Save as 256 color BMP

Compose
In a program that pastes with nearest color not palette number (MS Paint, Paint Shop Pro, etc.) open the storyboard and the first frame
Note: in some versions of windows MS Paint can open PCXs but it flips the palette, it is also best not to edit in MS Paint as it can mess up the palette.
Cut and paste from the frame to the story board
Repeat until done
You can edit any thing you want
You may have to save as PCX
In FLICster extract the FXM to Civ3 Unit FLC
Tip: if the unit is not at the right place in the game extract to multiple FLCs then change the offset in the INI that FLICster made to a lower number to move it up or a higher number to move it down, then open the INI (All Files [*.*]) in FLICster and export it back to a FLC
Copy an Unit.INI (not the FLICster INI) from another unit and rename it to what you named the folder
In the Unit.INI change to or add the FLCs that you made
Add to the game and have fun

Suggested Programs:
3D Studio Max
FLICster (I used v1.0.1 (build 18))
Paint Shop Pro (free trial available)

If there is any thing you want me to add, I did not explain good enough, or if you have any questions just tell me

Edited to clarify some steps

Level
 
Thank you for the lesson however I still keep having my units apear as static. I created the unit and using flicster devided a similar unit into PCX files. Then I copyed in my images changed the color to index as well as the palette to custom were I changed the first colors to match the background and still it came out like static. :confused: Please help me fix my colors.

PS: Im using photoshop 5
 
As far as I Know photoshop does not work for cut and paste.
What I do is save the Storyboard PCX as BMP and open it in MS Paint
Zoom to about the size of the frame
Drag each frame from Explorer to second Instace of Paint
Click on it then select all (press Ctrl+A), copy (Ctrl+C), click on the Storyboard's Instace and paste (Ctrl+V)
Scroll over and repeat
Just don't draw in Paint
It's The easiest way I Know of.
 
Fist, I wanna thank you for this tutorial. It's very useful... but without knowing how to do certain things in 3D studio Max, I'm afraid it's of no use for me :(

"Add a targeted camera at an angle of about 45 degrees"
How do I do this? Do I need to be exact?

"Add a dummy centered below the unit and link the camera and lights to it (this allows you to rotate the camera and lights easily)"
I know how to add a Dummy, but how do I link the lights and camera to it?


Hope you can answer my questions.
 
Originally posted by Grey Fox Fist, I wanna thank you for this tutorial. It's very useful... but without knowing how to do certain things in 3D studio Max, I'm afraid it's of no use for me :(

You’re welcome, it has also helped me a lot.

Most of what I say here will apply directly to 3D Studio Max but can be adapted to other programs.

"Add a targeted camera at an angle of about 45 degrees"
How do I do this? Do I need to be exact?

It does not have to be exact, but smoking mirror has recently said that it should be about 60 degrees and not 45 but this may not be for all units, compare with the orginals
The reason I have a targeted camera is so you can easily set the focus/center point
You can set it to an exact angle by changing the type to free in the modify panel and type in the angle in the transform type in box (right click the move/rotate/scale button).

"Add a dummy centered below the unit and link the camera and lights to it (this allows you to rotate the camera and lights easily)"
I know how to add a Dummy, but how do I link the lights and camera to it?

Select all the objects you want to link and click the link button (two cubes with a chain between them) then drag from one of the selected objects to the object you want to link to.

Hope you can answer my questions. [/B]

Hope this helps.
 
Are you using the 3D program to make the unit FLC's or the Civ large and small PCX?

I am wondering how to create an FLC from scratch, I use an old Corel Draw 7 Program...seems to be ok, it reads .PAL and PCX files + it's got a 3D program to make 3D objects.
 
Originally posted by Gringo
Are you using the 3D program to make the unit FLC's or the Civ large and small PCX?
Both.

I am wondering how to create an FLC from scratch, I use an old Corel Draw 7 Program...seems to be ok, it reads .PAL and PCX files + it's got a 3D program to make 3D objects.
Most of this should work, you may need to adapt a little.
I think in Dream 3D you have to move the unit and render manualy for each frame, you would have to ask Smoking miror for specifics on that program.
 
"I think in Dream 3D you have to move the unit and render manualy for each frame"

Thanx Level.

I figured so. I have created a 3D model and rendered as PCX, once in each run position.

Problem is, I don't know how to make those PCX into an flc.

I'll try to pm Smoking Mirror.
 
Excuse me, but it seems like I didn't understand something:
In your tutorial2 ---------->
You may have to save as PCX
In FLICster extract the FXM to Civ3 Unit FLC
In MS Paint I cut and pasted everything necessary, but I have some problems doing the next step - it is impossible to open in FLICster bmp or pcx, so how can I open in FLICster the file I've edited?

Oh! Sorry, never mind. I tried to follow your tutorial step-by-step and understood everything, thanks anyway;) .
 
Originally posted by Level
The problem with the build queue is it starts from the bottom of the FLC and not the Offset, to fix it you have to cut off the bottom so the unit is right next to the edge and change the offsets in FLICster (the only way right now is to Export to multiple FLCs and change it in the INI).
Originally posted by Rhye
It's a common problem to many home-made units
Can you explain step-to-step how to solve it?
Sure.

This only needs to be done to the Default.flc but can make any FLC smaller.
To fix: unit to high in City screen:
In the unit\FLICster folder create two new folders.
Extract the unit to the first folder as Filmstrips with no border.
Crop each file (Change height olny) and save.
Extract a unit to the second folder with the same name, number of frames and the cropped size (it may have to have a palette, any palette).
Put the PCXs from the first folder in the second, replacing the files.
Open the cropped unit in FLICster (if it is already open you may have to close it and reopen it) and export it.
The unit will need to be standing as close to the bottom as the animation will allow, this is best done by the creator but can be done by cropping after exporting (I like to keep the sizes at 5s and 10s to make it easier.

To fix: unit standing below tile:
Export in FLICster to multiple standard FLCs.
Find the Folder you exported to (..\YourUnit\FLICster) in Explorer.
Open the INI FLICster made and change the Y offset (lower the number the higher it will be, Higher the number the Lower it will be) to about the distance between the top and the feet/base I think.
Save the INI.

In FLICster open the INI (Open, All Files *.*).
Move the FLC to the Unit folder.
Test in Game, Repeat to adjust if needed.

Edit: Added and corected infomation.
 
After I crop with Jasc Animation Shop the multiple FLCs, I save them and they became larger in space after somewhat conversion made by animation shop.
But when I open the .ini to merge to all-in-one, the result file is wrong - palette confused except for SW, bigger size in bytes, more lenght, and W longer. Something has messed up the whole thing, what should I do?
 
You have to make sure the palette stays in 256 color indexed mode (can't check how, I am passed 30 days).
You can also make a new PCX in FLICster with the cropped size and same number of frames, and replace the files with the cropped orignal ones (Flimstrips would work best).
Or get Smoking miror to render the smaller ones for you.
 
Originally posted by Level
As far as I Know photoshop does not work for cut and paste.
I didn't notice this until now.

PhotoShop works very well with cut n paste, you just have to create a new image before you paste, with Ctrl-N. Then it's just Ctrl-V like normal. Although, that creates a new layer (Which is a good thing). Next paste will be a new layer, and if you want to Flatten a Layer you just press Ctrl-E, which makes the layer you have marked be merged with the one below it.
 
Originally posted by eaze14
Wow,GreyFox is it really true that Photoshop really works?
Yeah, you just have to have something to paste to. A new image, a opened image etc.

Photoshop is a great tool, if you know how to use it.
 
Top Bottom