Copie du site:
http://leonardslair.com/lair10.htm
Setup File For 3D Max 5 - Click Here
http://leonardslair.com/files/SSII%20Scene%20B.zip
1) Intro
a) As several of my modding friends warned me, building and rendering units is a process. It is not an exact science, but it is a repeatable procedure to the point that rendering a unit can be significantly sped up. I invested several months at the urging of my friends just fooling around with software until I got the results I wanted. Then I was able to start the production line so to speak.
b) Second point, 90% of the knowledge for getting new units into the game comes from the CDV forum. Please search there before hitting people up with questions. Just use the search command. Many people when into the reverse engineering process, and I learned from reading the threads.
2) Requirements
a) Software
I)
SSII You need to have the game, Sudden Strike II, fully installed and fully patched.
II)
Multi Mod Switcher (By Sardaukar): You will really want to have this installed as much of the final rendering process involves trial and error. This tool removes much of the pain from the trial and error process. It lets you install most of the mods and jump right to a preloaded map.
III)
3D MAX: Top of the line 3D Design Software. This is the key to this tutorial.
IV)
Adobe Photoshop: This is the top of the line image editor software. Others may work, but this one does for sure.
V)
Total Commander: This little shareware is critical for renaming files and moving them in bulk, easily.
VI)
Sust_units: Created by the famous D_Sprague, this freeware program is required to compile and decompile the .pck image file from SSII.
VII)
Sust_HOT: This freeware program is one of the essential tools for tweaking hot files.
VIII)
Sue and Unsue: These two programs started it all. Required to decompile and recompile the main SSII programs files that have the file extension of .sue.
b) Hardware
I) See SSII for the game.
II) As far as new units go, 3D Max is a memory pig. The more RAM memory the better. I have 1 gig of Ram memory on a 1.5 mhz machine.
3) Model Selection for use in 3D Max software
a) Type: 3ds is preferred. .max scene file is second, and .dfx is 3rd.
b) .3ds = This is called a model or mesh. Save it to your mesh subdirectory in 3dmax
c) .max = a 3D Max Scene file. Usually includes cameras and lights. Remember we’ve got a standard scene setup, so all we really want from this is the model. If you do get a scene model, we can export it into a 3ds file. Select the tank by clicking on it and the parts. Then go FILE, then EXPORT SELECTED, then save as a .3ds file. Then import the .3ds file into our standard scene.
d) .dfx = You will need to import this file time. Click FILE, then IMPORT, then change the file type to .dxf. Browse to the file, and click OK. It will ask if you want to merge with the existing scene, click OK. Next dialog box gives you the default .dfx file import settings. Just click OK again.
4) Definitions and Basics
a) Blank and Unit background = All pink (RGB Color = 255,0,255)
b) Shadow = Grey (RGB Color = 128,128,128
c) Shadow Background = Blue (RGB Color = 0,255,255)
5) Pre-Render
a) Start 3D Max to do Scene Setup
b) Sample Scene:
http://leonardslair.com/files/jagp4max.zip
c) Explanation:
6) Basically the scene setup was developed over a couple of months of trial an error. Some things seem counter intuitive only because of the evolution of the scene over time.
i) The premise is this: The lower right view is the camera. The camera is what does the rendering. DON”T MESS WITH THE CAMERA. Do all your 3D work in the other 3 views.
ii) With this method, the camera and the lights move, the unit stays still. This is done to allow rapid setup of a new model. The camera and lights are the same in every scene. I recommend saving and empty scene file (.max) with no model in it and call it something like “New Scene SSII.max” or something like that. That way when you find a new model, you just import it into the new scene and you’re well on your way.
b) Model Setup
i) Scale: The grid in the setup scene is your best scale. 1 square = 10 feet x 10 feet. So a tank that is 15 feet long should be 1.5 squares long. To scale a unit, click on the SCALE button on the top menu. You can tell what each button is by letting the mouse hover over each button. To rescale a unit uniformly, right click on the scale button and a dialog box will appear that looks the image above. To scale up, change the percent to more than 100%, to scale down, less than 100%. Keep changing the scale unit the unit length and width approximate the known actual length of the tank. Remember in the scale that SSII uses, you don’t have to be too exact.
ii) Rotation: Rotate the unit so that it matches what is shown in the sample screen shot. (NOTE: Back view is actually the side of the unit. Again, this evolved, know its wrong, but it works and I didn’t want to start over with the camera.) You click the rotation button to activate the rotation help. I prefer to right click on the button after it is high lighted and type in the rotation. Usually 90 degrees in the Y axis gets you the right orientation.
iii) Animation Setup: If you look at the bottom of the sample screen above, you will see scale going from 0 to 31. These are the individual “moves” or “frames” in the animation. In SSII .pck files, there are 32 .bmp pictures for each animation. The 32 bmps are view of a rotating unit (the camera is actually moving) where each new view is exactly –11 degrees different from the previous view. (See the CDV SSII Forum for a thread on this issue).
7) Rendering the .bmps
a) The Picture Groups: You must first identify what type of unit you are rendering. A Jagdpanther is what SSII collectively calls a STUG type. The picture groups are as follows:
i) 1-32 Hull
ii) 33-64 Tread or blank
iii) 65-96 Tread or blank
iv) 97-128 Damaged Hull
v) 129-160 Damaged Tread
vi) 161-192 Shadow
b) I render the treads on the tank, so I leave 33-64 and 65-96 blank. There are many threads on CDV about the various picture groups. The main one, a tank, can be rendered as follows (not exactly the way CDV did it, but it works)
i) 1-32 Blank
ii) 33-64 Hull and Treads
iii) 65-96 Damaged Hull and Treads
iv) 97-128 Destroyed Hull and Treads
v) 129-160 Blank (all Pink)
vi) 161-192 Hull Shadow
vii) 193-224 Turret (or blank all pink)
viii) 225-256 Destroyed Turret
ix) 257-288 Turret Shadow
c) You will need Sust_Units to study the various .pck files in the game. Where ever I see treads or wheels in the original units, I render blank.
d) Critical point: The 1st number of each set of pictures is what is called FILE NUMBER BASE in the Render Scene panel. It is the starting point of the animation and the 1st picture out each set of 32 that are rendered.
e) Let’s now render the first set of pictures. 1-32 are blank. Therefore select the entire unit, and right click which brings up a menu. Choose hide selection. You should now have a blank screen.
f) Open the Render Scene Panel by clicking a button that looks like this
(far right).
Most of the setting in this panel should stay the way they are. Look for a field in the top right of the panel called “File Number Base” and type a 1 in there. Also “Active Time Segment” should be selected. Should look like this:
g) Next lets make sure the .bmps are going to a folder where you want them when the scene is rendered. Move the Render Scene panel (click and drag on open area) down so that you see the “Render Output” section. Should look like this. Click the “Files…” button and browse to a temporary folder. I typically save all the .bmps to a temporary folder separate from the project for re-rendering needs.
h) Important: 3D Max renders in a specific numbering sequence. In my process, I use R as the starting letter and 3D Max does the rest. We will need to re-number the files after they are created. For this, Total Commander software or similar is needed.
i) Hit the Render button.
j) You should now see the program very quickly create 32 bmps of all pink.
The Shadow bmps.
Using the 3D Max sample setup:
1. Turn Fspot01 off in lights
2. Turn the Shadows on Sun01 off
3. Turn Sun02 on.
4. Unhide the “Plane02” object which is used to display the shadow
5. Move the plane so that the wheels of the vehicle are just barely touching it.
6. In the Rendering panel, turn Anit-Aliasing off and Filter Maps off
7. In the Rendering panel, set your file base number to the 1st Shadow .bmp number (161 for example).
8. Hit the Render button. (31 bmp files are created)
Now you have 32 bmps with shadow showing, but here is the key part:
Using Adobe Photoshop:
1. Set 1st color to blue (0,255,255)
2. Set 2nd color to shadow (128,128,128)
3. Go to Image, then MODE, then RGB Color
4. Use magic wand to select the shadow and hit delete (this deletes the shadow pixels but uniformly fills them with color 2, the shadow color.)
5. Then hit Ctrl+Shift+I to invert your selection, selects everything except the shadow.
6. Hit X to switch colors
7. Hit Delete to delete everything except the shadow and fill it with Blue (0,255,255)
8. Hit X to switch color back for next .bmp
9. Hit Ctrl-W to save
10. Next bmp (its a pain which is why I saved the whole procedure as a macro in Adobe)
NEW
Adding texture to a unit in 3D Max
Rule 1: Do 1 object not a group.
1. Select object - barrel or turret
2. Go to Modify dialog (looks like a little rainbow)
3. Drop down modifier list
4. Pick UVW Map - I like box when it comes up
5. Drop down modifier list
6. Pick UVW Unwrapper
7. Click "EDIT"
8. New window opens
9. Go to Mapping and hit "Flatten" set distance at 0.06. Note this is slow and takes a little while.
10. Go to mapping
11. Click "Normals". Depending on preferrence, choose Box, or Left and Right, etc. (Since you mapped it as a box, I like to unwrap it as a box). Set distance to 0.06 again.
12. Arrange objects as needed.
13. Click "Save UVW's" from menu and close
NOW you will need a pluggin called TEXPORTER. Do a google for it.
To create the .jpg to modify with Adobe Photoshop
1. Tool box in 3d Max (see button on far right that looks like hammer)
2. Select "More" to open dialog box of tools.
3. Select "Texporter"
4. Set Image size to 400 x 400 (Square in other words)
5. Click "Pick Object"
6. Click on your object
7. New window opens with a wireframe picture of your object. Save a .jpg
8. Go modify .jpg file painting inside the lines
9. Save .jpg
10. Back in 3d Max, Open materials box (4 color balls button)
11. Then open your Tools (the Hammer) again and click "Asset Browser"
12. Browse to your .jpg file.
13. Drag the .jpg file over into the materials editor and name it whatever your object is.
14. Highlight your object in the main 3D screen and apply your new material from the material editor and bingo!
Beauty here is that I have 3D set to update as the map (aka .jpg file) updates so I can edit in Adobe, switch to 3D and see the results. Pretty cool.
Molon Lavè !