Setting up the Object Illumination Light
----------------------------------------
A simple light to case some additional illumination on only the model (the Demon).
Select under Lights; Target Spot and add it to the Top Viewport as shown; 3ds will name it Spot02.
If you are still on the Modify tab, click back to the Create tab, Lights should still be selected, and click on Target Spot to add one.
Add it as so, to the south of the model. This position is fine for what we will be using it for.
Make sure the Spot02 parameters look like this;
NO Shadows! Under Intensity/Color/Attenuation, turn the Multiplier to 0.35. Make sure the Hotspot/Beam and Falloff/Field are both large numbers (80 and 82 will do fine) so they always cover the unit during it's animations.
EDIT: Multiplier should be lower than 1.0, Make it usually between 0.25 and 0.4!
Click Exclude, and bring Box01 and Box02 from the left side to the right side and click Exclude and Illumination. This makes it so this light only illuminates the model itself, and not the Magenta Ground.
-----------------------------------
TEST YOUR HARD WORK!
Select the Perspective Viewport and zoom into your Demon! Go to Rendering Menu (on the toolbar), Select Render (or hit F10 key). The Render size should be set to 640x480 which is fine. Hit the Render button at the bottom and you should have something similar to this:
NOW is the time to go back and modify certain lighting values to get the unit looking good! You can do so by selecting an object and making sure you are on the Modify tab (not the Create tab).
Lighting values to adjust usually consist of only:
Omni Lights (only 1 needs to be selected (any of them); they are all clones):
The Multiplier under Intensity/Color/Attenuation (between 0.3 and 0.4 is usually good). This is the fill lights.
Spot01:
Under Shadow Parameters; Object Shadows; Dens... this can be around 0.4. Higher number makes shadow darker. Lower number makes them lighter.
Spot02:
The Multiplier under Intensity/Color/Attenuation (varies). We set this to 0.35. This is direct light on the model itself. If too bright, there will be too much contrast. Usually a middle or lower number works best.
-----------------------------------
Adding a Weapon.
I am making this unit for BigDog according to this picture:
(
http://www.bolterandchainsword.com/uploads/1211965236/gallery_11038_597_19415.jpg)
We will add a sword to the units hand.
Weapon Models are located in NChar3d/Item directory. In this directory are Axe, Bow, Cannon, Cap, Decoration, Guitar :rock:, Gun, Helmet, Saw, Shield, Spear, Staff, and Sword. I HAVE YET TO find the texture files for these ???? I know they have to be somewhere, but I cannot locate them. If you find them, let us all know! So in this case, I will have to make a simple texture file to use.
In the Sword Directory, there are 84 NIF models... You will need to check them out to find one you want to use.
Import the NIF's similar to the way we did earlier (USE SETTINGS SHOWN BELOW). If the item is one you wish to use, we will cover this next. If it is not, hit the delete key with the object selected to get rid of it.
When importing a weapon, Uncheck Import Animation, Uncheck Clear Animation, and Uncheck Import Skeleton.
SWORD010.nif looks like a good one, so File -> Import; Select SWORD10.nif from the NChar3d/Item/Sword directory using the settings shown above.
First, we need to align with the right hand. This weapon consists of 2 objects. Hit the H Key to see what objects they are. The ones selected are SWORD010 and EMITTER. EMITTER in this case is the blade. SWORD010 is the handle. With these objects selected, use the Move and Rotate; and Move and Rotate buttons to align the sword in the Demons right hand. Use all viewports to help you do this (Front, Top, Left, and Perspective).
You can also use Select and Uniform Scale to size the object larger or smaller.
After positioning the sword, this is what I have:
Position doesn't need to be perfect; since you won't notice it at all when unit is at Civ scale.
----------------------------------
Texturing the Weapon
I will do a quick and easy texture of the weapon; and a seperate Civ Color texture for the blade and the handle. It doesn't need to be perfect, since the weapon is fairly small still.
Hit 'H' Key and select EMITTER.
Hit 'M' Key to bring up the Material Editor.
On the 01 - Default texture, select Strauss under Shader Basic Parameters. Scroll down to the Maps rollout and next to Color hit the 'None' bar to apply a Map. The Material/Map Browser comes up. Select Bitmap.
A dialog opens for you to select the BMP you wish to use.
Download this texture:
http://j.imagehost.org/download/0675/WeaponEMITTER
and select it for the BMP to be added. The Material is ready.
Hit 'Assign Material to Selection' and press the 'Show Map in Viewport' so you can see it.
---
Hit 'H' Key and select SWORD010.
GO to the next 02-Default Blank Material spot. Leave this one as is. Scroll down to the Maps rollout and next to Diffuse Color hit the 'None' bar to apply a Map. The Material/Map Browser comes up. Select Bitmap.
A dialog opens for you to select the BMP you wish to use.
Download this texture:
http://j.imagehost.org/download/0202/Sword010
and select it for the BMP to be added. The Material is ready.
Hit 'Assign Material to Selection' and press the 'Show Map in Viewport' so you can see it. This will be the unit's Civ Color.
-----------------
Unit should look like this:
---------------------------
Attaching Weapons
Attaching the weapon to the right hand:
Usually for these models, WPNDM1 is the object that the unit uses for a weapon.
Hit 'H' Key and select WPNDM1 and you will see it is the unit's right hand.
Hit 'H' Key and select SWORD010 and EMITTER (the sword objects). To select multiple objects, use the ctrl/shift key (and you can drag the mouse to select many objects in a row).
In the perspective view, right click on the Camera01 text in the upper left corner. Select Views -> Schematic -> New.
This shows how the objects are attached to each other, and we can attach the sword objects to the WPNDM1 object.
You should locate where WPNDM1 is first. Locate EMITTER and SWORD010 also (they should be next to each other).
Here is where they are:
Zoom into the EMITTER and SWORD010 boxes. Make sure only those 2 objects are selected (you can use the mouse to select them). Right click and select Connect. Drag and drop these onto the WPNDM1 object, and they will appear under it as such:
Objects are now attached and move with the Demon's Right hand! Right click in the upper right corner of the Schematic view and select Camera01 to get back to the other view.
Move the animation slider, and the sword will move with the unit.
-----------------------------------
Masking (Can be skipped)
BigDog asked for me to erase the tail. So that is what we will do here.
Masking! Oh the fun of it! I dream about masking during my slumber!
Anyways...
The tail is contained in the texture file YAMAM1_MAP00.dds. Open this up in your graphics program (to open you must have followed the step of running the python script to make these readable... and installing the Nvidia DDS reader).
For Masks, Black colors are invisible, White colors are visible. So in the texture you can see the tail at the bottom of the image. In essence, make all portions of the image White except for the tail, which is made black. This makes the tail not appear in 3ds Max once the Mask is applied.
I saved the Mask as YAMAM1_MAP00-Mask.bmp so I know what it belongs to. You don't have to use DDs files for textures, you can use BMP's (and other image types as well). I have had problems with JPG, so best to stick with BMP.
Here is the mask:
Applying it is simple... press 'M' to open the Material Editor.
Go to 03-Default blank texture spot. Click the eyedropper 'Pick Material from Object' and in the perspective viewport click the tail to grab the YAMAM1_MAP00.dds texture.
Under Shader Basic Parameters, change the selection from Niftools Shader (or w/e it is at) to Strauss. Strauss has an opacity map (others do as well).
Go down to 'Maps'. Click the None box on Opacity to add an Opacity map. Select Bitmap on the Material/Map Browser.
Select the YAMAM1_MAP00-Mask.bmp file.
Now the Demon's Tail is gone!
This leaves a problem though, there is now a hole in the Demon's behind where the tail was. I could edit the mesh, but I will do a simple fix for right now by creating a sphere and attaching it to the Bip01 Spine1 Object and texture it like the pants are textured. Will be unnoticable at civ scale, so this is not a problem.
If you wish to do this, the same is done as we have done before:
1. Create a Sphere (instead of a box).
2. Move the Sphere into position.
3. Go to Schematic view.
4. Connect the Sphere to Bip01 Spine1 Object.
5. Add texture to the Sphere.
6. Exclude the object from Spot01 Illumination.
This is how Masks work though, so I won't go into this any further.
Here is another mask you can apply to the YAMAM1_MAP01, it cleans up some other edges.
http://j.imagehost.org/download/0363/YAMAM1_MAP01-Mask
-----------------------------------
RECOLORING TEXTURES
Pretty simple, open up the DDS texture files and recolor them any way you like. Then save your recolor as a BMP.
For this model, I recolored to these to match the demon pic that was posted.
http://j.imagehost.org/download/0363/YAMAM1_MAP00
http://j.imagehost.org/download/0438/YAMAM1_MAP01
To change the map that is used, press 'M' to open the Material Editor.
If you have one of these textures in your editor already, use that one, otherwise:
Go to a Default blank texture spot. Click the eyedropper 'Pick Material from Object' and in the perspective viewport click the model to grab the YAMAM1_MAP00.dds or YAMAM1_MAP01 texture.
Click the Maps rollout and you can see the map being used under Base (or Color). Click the 'Map'.
The brings up the Map details. Click Bitmap.
Select Bitmap from the Material/Map Browswer and load your new recolored (or the one above) texture (which would be YAMAM1_MAP00.bmp in this case).
Hit 'Show Map in Viewport' if it comes up White.
Do so for the other texture also
-----------------------------------
Setting up rendering
Once it looks good, you are finished and we can start on setting up the rendering.
Go to Rendering Menu (on the toolbar), Select Render (or hit F10 key). You will be on the Common tab. Select the Renderer tab. Under the Antialiasing section, change the Filter from 'Area' to 'Cook Variable'. Set the Filter Size to 1.0.
This ensures the unit still stays crisp and not overly blurry after rendered.
Now you need to determine the correct size you want your unit to be rendered at. The size we render will be the size it will show up in Civ 3; we do this to save on HDD space, render faster, and so we won't need to resize the unit later.
Usually I set the render size to 200x200 and rarely larger unless I have to, because occasionally at higher sizes (especially at 240x240) Flicster may cause pixels to be eaten on some frames.
For this unit, we will use 200x200, so on the Render menu (hit F10 if it is not still open), and under the Common tab; Output Size; make the width and Height both 200.
On the Perspective View, go ahead and use the Zoom and Pan View to move the view around to get the unit centered and to the correct size. You need to test the size to determine what it is at... so go ahead and render it.
As you can see, the Zoom and Pan View are shown at the bottom right of this screen. Hit render and the 200x200 perspective view will be rendered. Hit the small disk icon to save this render. Save it to your AtlanticaConversions\DemonBD folder under any name you choose. I saved it as SizeTest.bmp. Select RGB 24bit option when saving the BMP.
Now, in your AtlanticaConversions\DemonBD folder, open the SizeTest.bmp, and open the OffsetsTemplate (jpg or psd file if you have Photoshop). The OffsetsTemplate image is 240x240 (the max size a Civ 3 unit can be), and the circle is shown in the middle where the unit will be. Line up the unit in the circle and then you can determine if the unit is the size you want it. This is also used to easily determine what the offsets should be later on.
Keep changing the zoom and pan, and saving the render until you get the unit precisely how you want it to be in the OffsetsTemplate image file. I copy and paste the rendered SizeTest.bmp into the OffsetsTemplate file and change the opacity of the SizeTest.bmp to 70% so I can see both images.
I am happy with the size of mine, it is approx the same size as the archer shown next to it.
NOTE: Sometimes the animations are all over the place, so you may need to check various animations to ensure they all fit with the size you want!
Once you are happy with the position of the perspective view, go to Views -> Save Active Perspective View; then Views -> Create Camera from View. When you create a Camera, the Zoom icon changes to a Dolly Camera icon
, but they both do the same thing.
You create a camera so when you import another KF animation, it keeps the exact same perspective view. If you pan or dolly the camera, it stays as is, so don't do that if you are happy with the view. Go ahead and save the max file again so you don't lose any of this. Also save a backup copy. I saved it as SetupBAK.max.
--------------------------------
Organizing animations and frames to render
Now in your AtlanticaConversions\DemonBD folder, open up the text file called Animations.txt. Here we will record how many frames each animation has. We already know that Attack1 has 51 frames (shows 50, but there is a Zero frame which counts as 1 extra).
So next to Attack1, record there are 51 frames. The max number of frames possible in Civ3 is 64.
To find out the rest, go to File -> Import, and select YAMAM1_ROOT_NBSATTACK2.kf. Under Import Options, always keep Clear Animation checked and the other options unchecked. This animation has frames 0-51 (52 frames).
Do this for all the KF files. Also check the animations because some are occasionally the exact same things. Ones that I don't use any longer are Tired, and if there are BWait's and Wait animations, I tend to use only ones that are unique (some are the same).
DONT Save while getting these frame counts.
I recorded and decided which animations I will use. Here are the frame counts for these. The rest of them are either too similar or exactly the same as other animations. Death is the YAMAM1_ROOT_NBSDIE1.kf animation.
Next by looking at the number of frames, determine if you will render every frame, every other frame, every 3rd frame, etc. 3ds max can render every Nth frame, so rendering every 2nd frame on an animation with 50 frames will result in a 25 frame animation. I try to keep animations under 30 frames for size. And for Run Animations, under 20 if I can. Here is what I decided on:
I will render each animation with every other frame except for Death animation.
Keep Animations.txt open for your reference.
-------------------
REST OF TUTURIAL TO BE FINISHED STILL:
Involves:
Using Batch copy file
Set up/Modify Maxscript
Preparing folders to have renderings saved to
Using Render settings and Nth frames, setting up Batch rendering settings
-----------------------
All this should be pretty straight-forward and not require any explanation.
Use Sandris SBB on _Modified Folder (which contain the final renders).
Use graphics program to make sure Magenta is same color FF00FF for all storyboards.
Make render on white background for PCX files.
Create Palette from this and apply to storyboards.
Create Unit32, Large and Small PCX, and sounds.
Test your unit in game and release to CFC when it is finished!