3DSmax Tuto Vehicules

26-03-2007 à 16:14:02
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è !
26-03-2007 à 16:14:02
Traduction par Arzok

Ce tutorial est traduit du travail fait par Leonard.

[url]leonardslair.com/lair10.htm[/url]



1/introduction1-1 /

Plusieurs de mes amis modeurs m'ont prévenu, fabriquer des unités est tout un process. Ce n'est pas une science exacte, mais avec une procédure répétable, l'élaboration d'une unité peut petre considérablement accéléré. A la demande de mes amis, j'ai investi plusieurs mois à tester les logiciels jusqu'à avoir le résultat voulu. Ensuite, j'ai pu écrire le "process de production".

1-2 /

90% de la connaissance sur la manière de mettre des nouvelles unités dans le jeux viens du forum CDV (sic). Veuillez chercher dans ce forum avant de poser des questions. Beaucoup de personnes ont fait du reverse engineering, et j'ai beaucoup apris en parcourrant leurs messages.

2/ Matériels et outils nécessaires2/1 Les logiciels

a) Sudden Strike II. Jeux complèteme,t installé et patché !

b) le MMS (multi mod switcher) de Sardaukar !

Vous aurez vraiment besoin de cette outil car une bonne partie du travail d'élaboration des unités nécessite tests et erreurs ! Cet outil permet d'installer la plupart des mods et d'aller directement à une carte préchargée.


c) 3Dmax. C'est un des meilleurs logiciels de design 3D. C'est la clé du tutorial.

d) Adobe Photoshop. Un des meilleurs logiciels d'édition d'image. D'autre peuvent faire l'affaire, mais celui ci marche à coup sur.

e)Total commader. Ce petit shareware est essentiel pour renommer les fichiers et les déplacer en groupe facilement.

f) Sust_units : Crée par le fameux D_Sprague. Ce freeware est nécessaire pour compiler et décompiler les fichiers images .pck de SSII.

g) Sust_HOT: Ce freeware est un des outils essentiels pour "tweaking" les fichiers .hot.

h) SUE et UNSUE : Ces deux programmes sont à la base de tout. Ils sont nécessaires pour décompiler et recompiler les fichiers programs principaux de SSII qui ont l'extention .sue.

2/2 Logiciel

3D max nécessite beuacoup de mémoire. 1Go de ram sur une machine 1.5MHz minimum.

3/ Sélection du type de modèle dans 3Dmax.a) 3ds est le type de modèle préférable. En second, .max et .dfx en dernier.

b) .3ds Cela représente le modèle proprement dit. Il faut le sauvegarder dans le répertoire mesh de 3Dmax.

c) .max C'est le fichier de scène pour 3Dmax. Habituellement, cela comprend les données sur les caméras et sur les lumières éclairant la scène.Rappelez vous que nous avons un set up de scène standard (celui de SSII). Nous avons donc besoin essentiellement du modèle. Si vous avez un modèle avec scène, vous pouvez exporter le modèle seul dans un format .3ds. Sélectionner le modèle (le tank pour ce qui nous concerne ici !) en cliquant dessus. Allez dans menu "file", puis "export selected". Ensuite sauvegarder en format .3ds. Enfin, importer le fichier .3ds dans votre scène standard.

D) .dfx Vous aurez sans doute besoin d'importer ce type de fichier. Menu "file", puis "import" ensuite changer le type de fichier en .dxf, sélectionner le fichier, faire OK. Le programme vous demandera si vous voulez fondre le fichier avec la scène existante. Cliquer OK. La boite de dialogue vous affiche les options d'import par défaut. Cliquer OK



4 Définitions & basesa) Le vide et le fon de l'image (transparent) sont à mettre en violet (pink).

Les paramètres RGB correspondant à cette couleur sont 255,0,255

b) L'ombre sera de couleur grise (128,128,128)

c) L'ombre du fond (???) est le bleu (0,255,255)

5 pré rendera) Lancer 3Dmax pour pouvoir faire la configuration de la scène.

b) Télécharger le set up (lien à venir)

c) explication :

La configuration de la scène a été trouvée après 2 mois de test et d'erreur. Certaines choses parraissent à l'encontre du bon sens, à cause du déroulement de la scène par rapport au temps, afin de générer la séquence d'image complète représentant le char suivant toutes les directions de vue.




Le principe est celui ci :

+La vue en bas à droite représente la caméra (la vue de la scène par la caméra). La caméra permet de créer les vues finales nécessaire à l'animation du modèle. Ne vous mélanger pas avec la caméra. Faites tous le travail 3D dans les 3 autres vues !

+Avec cette méthode, la caméra et la lumière bouge (en fait tourne autour de l'unité) et l'unité reste immobile. Cela permet de créer toutes les vues de l'unité sous les différents angles. La caméra et les lumières sont les mêmes pour toutes les scènes. Cela permet une mise en place rapide pour débuter un nouveau modèle. Je recommande de sauver une scène vide (.max) sans aucun modèle dedans et de l'appeler "new_scene_SSII.max". Le fichier contient ainsi la définition de l'éclairage et les positions de la caméra générant les images. Ansi lorsque vous trouvez un nouveau modèle, vous n'avez qu'à l'importer dans cette scène et vous serez sur la bonne route.

d) configuration du modèle.

i/ Echelle : La grille est votre meilleure échelle. 1 carré (1 maille) équivaut à 3x3mètres (10x10 pieds). Un char de 4.5 mètres fera donc 1.5 case de long. Pour changer l'échelle de l'unité, cliquez sur le boutton "scale" du menu du haut. Une bulle vous informede la fonction de chaque bouton. Pour changer l'échelle d'une unité, click droit sur le bouton échelle et une boite de dialogue apparait. Pour aggrandir l'unité, monter le % à plus de 100%. Essayer de changer l'échelle pour correspondre à la taille connue du char. Mais rappelez vous que vous n'avez pas besoin d'être trop précis à l'échelle de SSII.

ii/ rotation:

Tournez l'unité pour que cela corresponde à ce qui est montré sur la vue précédente. La vue arrière correspond à la vue de coté. C'est une histoire de repère et cela fonctionne comme cela. Sinon, il faut reprogrammer la caméra. Vous pouvez cliquer sur le bouton rotation pour activer l'aide. Je préfère un clic droit sur le bouton sur-éclairé et entrer la rotation. Typiquement 90° suivant l'axe Y donne la bonne orientation.

iii/ Mise en place de l'animation

Si vous regardez en haut de l'écran de 3Dmax, vous pouvez voir une barre allant de 0 à 31. Il s'agit des images individuelles de l'animation. Dans le fichier SSII .pck, il y a 32 images BMP pour chaque animation (le terme est impropre, il s'agit des images de l'unité pour chaque orientation). Les 32 images BMP sont obtenues en tournant l'unité (en fait c'est la caméra qui tourne autour de l'unité pour générer les vues). Chaque vue correspond à une rotation de 11° (voir ex forum CDV).


6 Génération des vues .BMPa) Les groupes d'images.

Vous devez identifier quel type d'unité vous voulez créer. Par exemple, un Jagdpanther est de type "stug". Les groupes d'images correspondent à :

1-32 La coque (soit 32 images tous les 11 degrés)

32-64 Les chaines ou rien

65-96 Les chaines ou rien

97-128 La coque endomagée

129-160 Les chaines endomagées

161-192 L'ombre

Cela fait bien sur beaucoup d'image !

b) Comment je fais !

Je cré les chaines sur le tank. Ainsi, je laisse les groupes 33-64 & 65-96 vide. Il y a beaucoup de discussions sur le forum CDV à propos des groupes d'image. Pour le cas principal, le tank, cela peut être fait de la manière suivante, qui n'est pas exactement celle de CDV.

i) 1-32 vide

ii) 33-64 coque & chaines


iii) 65-96 coque & chaines endomagées


iv) 97-128 coque & chaines détruites


v) 129-160 vide (tout de couleur violette)

vi) 161-192 ombre de la coque


vii) 193-224 Tourelle (ou vide de couleur violette)

viii) 225-256 Tourelle détruitet

ix) 257-288 ombre de la tourelle

c) Vous avez besoin de Sust_Units pour étudier les différents fichiers .pck du jeux. Chaque fois que je vois coque et chaine, je transforme en vide (blank).

d) Point critique : Le premier nombre de chaque jeux d'image est appelé "file number base" dans le panneau de création de scène.


C'est le point de départ de l'animation et la première image créee sur la série de 32.

e) Créons maintenant le premier jeu d'image. 1-32 sont vides. Maintenant, sélectionnez une unité (le modèle 3D) et click droit amène un menu. Choisir cacher la sélection. Maintenant, il devrait y avoir un écran vide.

f) Ouvrez le panneau de création de scene en cliquant sur ce bouton :<!--[endif]-->







La plus part des options seront inchangées. Recherchez le champ du formulaire appelé “File Number Base” ( à droite) et tapez 1.L'option “Active Time Segment” doit être sélectionnée. Le résultat :






g) Maintenant, il nous faut entrer le chemin de sauvegarde pour le répertoire où iront les images crées. Déplacer le panneau "render scene" pour faire apparaitre la section "render output". Elle ressemble à cela :



Avec le bouton "files", sélectionnez un répertoire temporaire. Je sauvegarde typiquement toutes les images .bmp dans un répertoire temporaire séparer de ceux du projet.

h) Important : 3D ma crée les fichiers avec une séquence de numérotation spécifique. J'utilise la lettre R comme lettre de départ et 3D max fait le reste. Nous aurons besoin de renuméroter les fichiers après leur création. Pour cela, nous utiliserons Total Commander (ou un logiciel équivalent)

i) Maintenant, cliquez sur création ("render button")

j) Vous devez voir maintenant le programme créer rapidement les 32 images toutes violettes !

Création du jeux d'images BMP pour les ombresUtilisation de 3D max

1 Mettez "Fspot01" OFF pour les lumières

2 Mettez "Shadows on Sun01" OFF

3 Mettez "Sun02" ON

4 Dé-cachez l'objet "plane02" qui est utilisé pour faire apparaitre l'ombre.

5 Déplacer le plan pour que les roues du véhicule le touchent

6 Dans le panneau de création (rendering panel), mettez "Anit-Aliasing" OFF et "Filter Maps" OFF

Using the 3D Max sample setup:

Turn Fspot01 off in lights
Turn the Shadows on Sun01 off
Turn Sun02 on.
Unhide the “Plane02” object which is used to display the shadow
Move the plane so that the wheels of the vehicle are just barely touching it.
In the Rendering panel, turn Anit-Aliasing off and Filter Maps off
In the Rendering panel, set your file base number to the 1st Shadow .bmp number (161 for example).
Hit the Render button. (31 bmp files are created)
Now you have 32 bmps with shadow showing, but here is the key part:
[Traduction en cours]

Molon Lavè !