• Àâòîðèçàöèÿ


Áåç çàãîëîâêà 01-02-2006 08:49 ê êîììåíòàðèÿì - ê ïîëíîé âåðñèè - ïîíðàâèëîñü!


SHIP PRODUCTION PIPELINE DOCUMENTATION

SHIP PRODUCTION PIPELINE DOCUMENTATION....................................................................1
1 INTRODUCTION....................................................................................................................5
1.1 Software and Plugins.........................................................................................................5
Installing Maya Plugins.............................................................................................................5
Installing Photoshop Export Macro.........................................................................................5
1.2 Process...............................................................................................................................5
2 MODELING............................................................................................................................7
2.1 Poly Budgets.......................................................................................................................7
2.2 General Topography...........................................................................................................8
2.3 Maya Modeling Tools.........................................................................................................9
X-Ray Toggle.............................................................................................................................9
Count Polys...............................................................................................................................9
2.4 Hierarchies.........................................................................................................................9
2.5 LODs and Weapon Effects Collision Meshes..................................................................9
3 WEAPONS...........................................................................................................................10
3.1 Ships and SubSystems....................................................................................................10
3.2 Joints...............................................................................................................................10
3.3 Two barreled guns............................................................................................................11
3.4 Ships................................................................................................................................11
3.5 SubSystems.....................................................................................................................11
3.6 Ship and Subsystem Tuning files...................................................................................12
3.7 WeaponTuning.xls............................................................................................................12
4 SUBSYSTEMS.....................................................................................................................13
4.1 File Structure.....................................................................................................................13
DataSrc....................................................................................................................................13
4.2 Data..................................................................................................................................13
Subsystems.............................................................................................................................13
SubSystemTuning.xls.............................................................................................................13
Weapons.................................................................................................................................13
4.3 Ships................................................................................................................................13
4.4 Summary of important files.............................................................................................14
4.5 Creating and Exporting the Maya File............................................................................14
Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM

Setting up directories..............................................................................................................14
Modeling your subsystem.......................................................................................................14
4.6 Exporting Your Subsystem..............................................................................................14
4.7 Getting the game to find and load your subsystem......................................................15
Adding your subsystem to SubSystemTuning.xls...............................................................15
Exporting your subsystem from SubSystemTuning.xls......................................................15
4.8 Defining Hardpoints on Ships.........................................................................................15
Maya........................................................................................................................................15
4.9 ShipTuning.xls..................................................................................................................16
4.10 Creating Production SubSystems...............................................................................16
4.11 Creating System SubSystems.....................................................................................17
General....................................................................................................................................17
MultiplierType..........................................................................................................................18
InfluenceType..........................................................................................................................18
4.12 Creating Weapon SubSystems....................................................................................18
4.13 Extra Variables in SubSystems...................................................................................19
4.14 Adding Animation.........................................................................................................19
5 INNATE SUBSYSTEMS........................................................................................................20
5.1 What are Innate Subsystems?.........................................................................................20
5.2 Maya.................................................................................................................................20
5.3 ShipTuning.xls, .ship , SubsystemTuning, and .subs Files.........................................20
5.4 File Extensions and Directories (Folders)......................................................................21
5.5 How To Add Innate Subsystems.....................................................................................22
Creating the Glow Mesh..........................................................................................................22
Hooking Up the Glow Mesh....................................................................................................25
Finishing the Innate Subsystem Mesh – Weapons Effect Collision Mesh.........................26
Adding Values to SubsystemTuning.xls...............................................................................27
Adding Values to ShipTuning.xls...........................................................................................27
6 CAPTURE & REPAIR POINTS AND NAVLIGHTS...............................................................29
6.1 Maya.................................................................................................................................29
6.2 Shiptuning.xls and .ship Files.........................................................................................29
6.3 File Extensions and Directories (Folders)......................................................................29
6.4 Tutorials............................................................................................................................30
Capture Points.........................................................................................................................30
Repair Points...........................................................................................................................32
Adding Navlights in Maya.......................................................................................................32
Summary.................................................................................................................................34
7 FX.........................................................................................................................................35

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 2 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM

8 TEXTURING.........................................................................................................................36
8.1 Installing Photoshop Export Macro................................................................................36
8.2 Texture Budgets...............................................................................................................36
8.3 Naming Conventions........................................................................................................37
8.4 Assigning Shaders in Maya.............................................................................................37
8.5 Working In Maya...............................................................................................................37
8.6 Layers...............................................................................................................................38
8.7 Texturing Considerations................................................................................................38
8.8 U/V coordinate considerations........................................................................................38
8.9 Badges..............................................................................................................................40
8.10 LOD Texturing...............................................................................................................42
8.11 Glow Lighting................................................................................................................42
8.12 Goblin Specifications...................................................................................................43
8.13 Goblin UVing.................................................................................................................43
8.14 Maya Texturing Tools...................................................................................................44
NUDGR....................................................................................................................................44
Refresh Textures......................................................................................................................44
Attribute Editor.........................................................................................................................44
8.15 Megalith Texture Reuse File Pathname Considerations...........................................44
9 SHIP AND SUBSYSTEM ICONS..........................................................................................44
9.1 LUA Files..........................................................................................................................44
9.2 MRES Files........................................................................................................................45
9.3 Image Files and Their Locations.....................................................................................46
10 LOD (LEVEL OF DETAIL) AND WEAPON EFFECTS COLLISION MESH PIPELINE.......47
10.1 File Extensions and Directories (Folders)..................................................................47
10.2 Tutorial of the LOD and Weapons Effect Collision Mesh Process..........................47
Getting Started........................................................................................................................47
The LOD Process.....................................................................................................................48
10.3 Making Weapons Effect Collision Meshes.................................................................56
10.4 Exporting......................................................................................................................57
10.5 Adding LOD Values to Shiptuning.xls........................................................................57
10.6 Summary........................................................................................................................58
10.7 General LOD Poly Count Guidelines...........................................................................59
11 DOCKING PATHS.................................................................................................................60

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 3 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM

11.1 Maya..............................................................................................................................60
11.2 File Extensions and Directories (Folders)..................................................................60
11.3 Explanation of the Differences Between Types of Paths..........................................60
11.4 Tutorial on Paths...........................................................................................................61
How to Make Launch Paths – A Fighter Launch Path Example..........................................61
How to Make Docking Paths – A Fighter Docking Path Example.......................................64
How to Make Latch Paths – Sample Resource Collector Latch Path.................................65
11.5 Path Sharing..................................................................................................................67
11.6 Exporting It All...............................................................................................................68
11.7 Summary - Tips.............................................................................................................68
11.8 Appendix – General Dock/Launch/Latch Path Information......................................69
Definitions of Path Parameters...............................................................................................69
Shape Parameters....................................................................................................................69
Node Parameters.....................................................................................................................70
Animating points in Maya.......................................................................................................71
Avoidance, Collision, Paths, and You!..................................................................................72
12 OPTIMIZING.........................................................................................................................73
12.1 Optimization Techniques.............................................................................................73
13 EXPORTING........................................................................................................................74
14 SHIP TUNING........................................................................................................................76
14.1 Getting a Ship Into the Game.......................................................................................76
14.2 Art Related Items Changeable in Shiptuning.............................................................76
15 APPENDICES......................................................................................................................78
15.1 Bugfix/Troubleshooting FAQ.......................................................................................78
My ship won’t export...............................................................................................................78
Maya crashes when I attempt to refresh a PSD texture file.................................................78
My ship’s Weapons/Subsystems/Capture & Repair Points/FX are not firing/spawning/working/triggering........................................................................................78
15.2 Ship Rescaling..............................................................................................................78
15.3 New User Interface Document.....................................................................................80
Interface Elements...................................................................................................................80
Dependencies..........................................................................................................................81
The UIScreen...........................................................................................................................82
Regions...................................................................................................................................82
Events & Event Handling........................................................................................................83
UIScreenManager (SINGLETON)............................................................................................84
Signals and Slots.....................................................................................................................84
LUAConfig and Loading UIScreens.......................................................................................85
Stylesheets..............................................................................................................................85

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 4 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM

Multi-Res Textures...................................................................................................................87
LUAUserInterface Lib..............................................................................................................87
Sound Hookup.........................................................................................................................87
Diagrams/Reference................................................................................................................89
1 Introduction

This document is intended to provide a comprehensive guide to Homeworld2’s ship production pipeline. It assumes that the reader has a basic understanding of modeling and animation within Maya and texture creation with Photoshop. The term ‘ship’ broadly encompasses all textured 3D meshes that are ultimately exported as .hod data (see: Exporting), this includes resources (asteroids and containers), megaliths as well as ship units, their turreted weapons and their subsystems. There will be some redundancies in the document, but this is more for the user’s convenience, as it will ease the need to flip back and forth in the document for information… Modifications can get confusing, especially when different processes share similar procedures. It’s best to describe them within their own context, like semi-self contained documents.
1.1 Software and Plugins

All HW2 art is created with Maya Builder v3 and Photoshop v5.5. Before embarking on ship creation be sure that all necessary Maya plugins and Photoshop macros are installed in their proper locations.
Installing Maya Plugins
Copy all necessary files into you’re the plugins folder in your Maya directory.
Installing Photoshop Export Macro
1. Start up Photoshop
2. Go to the Actions window
3. Clear Actions.... (if there are unnecessary actions in the Actions window)
4. Load Actions...
5. Select Relic.atn from %HW2_ROOT%\tools\Photoshop\Actions directory (where %HW2_ROOT% is where Homeworld2 is installed)
1.2 Process

The steps towards completion of a particular ship are as follows:
1. Modeling
2. Joints and Hierarchies
3. Texturing
4. LODs (Level of Detail)
5. Collision Mesh
6. Ship Animation
7. Exporting

Due to the vagaries of ship production, certain steps may preempt others or may require iterative revisiting. For example, for the purposes of stubbing out game assets, Exporting can occur anytime after Modeling and Hierarchy/Joint Setup are correctly completed. Furthermore, depending on the requirements of a particular ship, additional Hierarchy/Joint Setup (like Subsystem Hardpoints or Navlights) tasks may come after the Texturing process when the ultimate function and form of the ship solidifies.

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 5 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
Depending on the art requirements, the most complex ship file can be comprised of the following elements:
Joints Meshes Textures Animation
Root Weapon Navlights FX Spawn Points Latch Points Repair Points Ship Mesh Weapon(s) Docking Shaders Layered PSDs ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ Specular Glow Label Stripe Team Tex Ship Animation Docking Paths


HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 6 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
2 Modeling

Although ideally we should strive for maintaining the most detail one can muster for one’s ship while modeling, it is crucial to keep certain parameters in mind that will allow the game engine to run as optimally as possible. Meshes should be modeled with the following considerations in mind to maintain this balance between aesthetic requirements and efficiency.
2.1 Poly Budgets

Considering we have 11,000 polygons dedicated to rendering static geometry, we can assume about 30% of this (3,300 polygons) is available for the highest detail of a ship, including goblins. This is because there will usually be only one top-LOD ship visible on-screen at a given time. If there are multiple ships at the same LOD on screen at a given time, they won’t be close enough to render at maximum LOD.
This number should be undercut for smaller ships and can be exceeded for large ships. Be careful exceeding this number, however, as it will affect the global LOD of the game and on lower-end systems, the ship may never be rendered at its maximum LOD.
Assuming a base ship poly count of 3300, here are some guidelines of how the polygons should be allocated on ships of different sizes:
Ship class % base budget Poly Budget Base Mesh Goblins % Goblins
Fighter 25% 825 660 165 20%
Corvette 50% 1650 825 825 50%
Frigate 100% 3300 1320 1980 60%
Cruiser/Carrier 120% 3960 1346 2614 66%
Mothership* 175% 5776 1964 3812 66%
Subsystems 2% 74 50 24 32%
Recources 9% 300 300 0 0%
Megaliths* 175% 5776 1964 3812 66%

•Motherships and Megaliths might require a special LOD scheme that allows such high poly counts, but do not currently.

For the various LOD levels, we scaled down from the poly counts listed above. For example, if we wanted the polycount of LOD0 without goblins (ie. the base mesh), we just have to look at the Base Mesh value taken from the chart above. There is a minimum number of polygons below which the setup cost is greater than the cost of rendering the polygons. This is about 100, and this will be the minimum number of polygons. LOD1 will be about 1/3 the poly count of LOD0 without goblins (ie. the base mesh). Therefore, we get the following chart:

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 7 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
Ship class LOD0 LOD0 w/o Goblins LOD1 LOD2 LOD3
Subsystem > 100 N/A N/A N/A N/A
Fighter 825 660 220 100 ~25
Corvette 1650 825 270 100 ~25
Frigate 3300 1320 450 150 N/A
Cruiser/Carrier 3960 1346 470 200 N/A
Mothership 5775 1964 650 500 N/A
Recources 300 300 0 0 N/A
Megaliths 5775 1964 650 500 N/A

2.2 General Topography

Depth buffer precision depicts certain ideal ship topography considerations. In general, ships should be kept roughly convex, not too thin and have limited internal geometry at lower LODs. The reasons for this will be illustrated in the following diagram:
In this diagram, the red thick lines may be drawn in front of the black lines. This usually happens at great camera distances where depth buffer precision is reduced. This can be very unsightly.

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 8 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
Problems with non-convex and internal geometry could be mitigated by manually creating the lower LODs instead of letting the progressive mesh system handle lower LODs.
2.3 Maya Modeling Tools

As previously noted, this document assumes modeling experience in Maya. However, there are certain tools and tricks specific to the process of creating ships for Homeworld2 that must be noted.
X-Ray Toggle
For easy toggling of a mesh to X-Ray mode in order to inspect one’s topology in more detail, the Relic Tools shelf includes an X-Ray Toggle button.
Count Polys
In order to maintain optimal poly counts on one’s ship, be sure to check your Poly Count status by selecting the ship and clicking on the Count Polys button in the Relic Tools shelf.
2.4 Hierarchies

In order for proper exporting, all ships (including subsystems, resources, and megaliths) require a joint named Root under which all objects within the ship file are parented. This joint defines the center-point of a ship.
2.5 LODs and Weapon Effects Collision Meshes

LOD and Collision mesh creation is technically part of the modeling process but is more properly discussed after the Joint and Hierarchy application and Texturing, after ship meshes and textures are final (see: LOD (Level of Detail) and Weapon Effects Collision Mesh Pipeline).

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 9 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
3 Weapons

This chapter is meant to be a guide on how to setup a weapon on a ship and on a subsystem. It describes all the rules to follow to ensure you get what you want.
3.1 Ships and SubSystems

The setup of weapons on ships and subsystems is very similar. Is basically follows this pattern:
In this figure you can see that weapons can be fitted on ships and on subsystems. The way they are fitted is very similar.
3.2 Joints

Weapons on ships and subsystems need to be modeled and need to have certain joints connected to them. This works the same way as it did before.
Every gun needs a _Position, _Direction, _Rest, and _Muzzle joint. In case of a turret, the gun also needs a _Latitude joint. The joints need to be named exactly like this, as the game searches for these joints. In the diagram below you can see how one of the guns in the Hiigaran Assault Corvette is set up.

Hardpoint

Weapon

SubSystem

Weapon

Ship

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 10 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
1. _Position is the general rotation point of the gun
2. _Direction is the up vector for a turret
3. _Rest is the forward vector for a turret
4. _Latitude is the swivel point for a barrel
5. _Muzzle is the end of the barrel.
3.3 Two barreled guns

Guns with two barrels are defined by having one master barrel and one slave barrel. Basically you copy the joint hierarchy and add ‘Slave’ before the _Position, _Rest, etc. So in the example figure above, the name of the slave barrel would be Weapon_TurretTopSlave. The game automatically searches for weapon names with ‘Slave’ attached to it, so you only need to define them in Maya. Have a look at the Hgn_AssaultCorvette to see how two barreled guns are set up.
3.4 Ships

On ships, multiple weapons can be defined. The weapons defined on ships are part of the ship, so they cannot be targeted or destroyed.
3.5 SubSystems

The mesh for subsystems that are weapons is generally only the gun connected to a root joint.

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 11 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
3.6 Ship and Subsystem Tuning files

Before the guns will work, you’ll have to hook up the weapons in the Tuning files (Data\Ship\Shiptuning.xls and Data\SubSystem\SubSystemTuning.xls). In these files there is a ‘Weapons’ row. In this weapons-row there are the following fields to fill in per weapon:
Name of the weapon type Quoted weaponName Name of the weapon to use. Look in the Data\Weapon directory for valid weapon names.
JointName Quoted jointName Name of the main joint of a gun. In the example above this would be ‘Weapon_TurretTop’

If you fill these in, the game will look for all the joints it needs. The game also looks for slave-guns, so you don’t have to define them separately anymore.
3.7 WeaponTuning.xls

The biggest change in the weapon system is that the angles of the gun are removed from ShipTuning.xls. They are now in the WeaponTuning.xls file. This means that, for example, the Hgn_KineticBurstCannon has predefined angles. If you need the same sort of weapon but with different angles, you will have to copy the column in the .xls file to a new column and change the angles. You need to create a directory for the new weapon type in the Data\Weapon directory.
All other variables are the same as they were before. As you can see in the weapontuning.xls file, there are a number of guns specially made for the destroyer. This is a result of the angles being different on different ships.

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 12 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
4 Subsystems

This section is meant to be a step-by-step tutorial on how to create and how to hook up subsystems. It will present the user with a complete path from creating a Maya file to getting it in the game.
4.1 File Structure

This section is meant to explain where all the important files are, and where new files should go. The explanation on how to create new files will be described in the following chapters.
All directories described below are directories under the Homeworld2 main directory (usually something like c:\Projects\Homeworld2\).
DataSrc
The DataSrc directory is where all the source files for the data are stored. This is also where the models for subsystems go. Subsystems are in the directory called SubSystem\. In this directory there are a number of directories for each subsystem. Each subsystem needs a unique Subdirectory. Like ships, all files for the Hiigaran are prefixed with Hgn_ and all files for the Vaygr are prefixed with Vgr_.
Files that should be present in a SubSystem\* directory should be a .ma file (Maya ASCII), and possibly some textures.
4.2 Data

Subsystems
The Data directory is the directory where the game gets all its data. The subdirectories in Data\ resemble the DataSrc directory structure. There is also a SubSystem\ directory. In this directory there are a number of subdirectories again, one for each Subsystem. In each directory there should be a .hod file and a .subs file.
Note that the names of the .hod file and the .subs file are identical to the subdirectory name. This is important. If you give a different name to these files, the game will crash.
SubSystemTuning.xls
Also in the Data directory is the SubSystemTuning.xls. This file is used for tuning all the subsystems in the game. More on how to tune subsystems can be found in the following chapters.
Weapons
There is also a Weapon\ directory in the Data dir. It consists of a number of subdirectories with all the different weapon types described in .wepn files, and a WeaponTuning.xls. This file is used for tuning the weapons on ships and subsystems. More on this topic will be discussed later.
4.3 Ships

When hooking up subsystems to ships you will need the ShipTuning.xls file. This file is in Data\Ship\ShipTuning.xls.

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 13 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
4.4 Summary of important files

Tuning SubSytems: Data\SubSystem\SubSystemTuning.xls
SubSystems (example): Data\SubSystem\Hgn_FighterProduction\ .hod and .subs
SubSystems (maya example): DataSrc\SubSystem\Hgn_FighterProduction\ .ma
Tuning Weapons: Data\Weapon\WeaponTuning.xls
Weapons (example): Data\Weapon\Hgn_IonCannon\ .wepn
Tuning Ships: Data\Ship\ShipTuning.xls
4.5 Creating and Exporting the Maya File

Setting up directories
The first thing to do is make a subdirectory for your subsystem in the DataSrc\SubSystem directory. For example, make a directory called Hgn_TestSubSystem. This is the place we will save the Maya file you’re about to make for this subsystem.
Also, create a directory in Data\SubSystem\ called Hgn_TestSubSystem.
Modeling your subsystem
Now, start up Maya. You can have a look at how the existing subsystems are modeled by loading the files in DataSrc\SubSystem\. Model the subsystem like you would when modeling a ship.
For now let’s create a simple sphere. Every subsystem needs a Root node (a joint named ‘Root’), just like a ship, so create one and hook it up so that it’s actually a root node (set the parent of the sphere to be the Root-joint). Also, don’t forget to scale the subsystem according to the ship it’s going to be on.
Save the file you just created in the directory DataSrc\SubSystem\Hgn_TestSubSystem as Hgn_TestSubSystem.ma.
4.6 Exporting Your Subsystem

Export the subsystem in the Data\SubSystem\Hgn_TestSubSystem directory. When exporting, select the little box besides the ‘export all’ menu item. This comes up with a little selection box on how to export the subsystem. Select the ‘HOD’ file format. You’ll notice there is no specific radio-button for subsystem. This is because subsystems export in the same way as ships, so just select ‘ship’. Also select the texture format you want to use (default value is good). Then press ‘Apply.’
Export the file to the Data\SubSystem\Hgn_TestSubSystem directory, and make sure you name the file Hgn_TestSubSystem.hod. Remember that the name of the subsystem and the name of the directory need to be exactly the same, or the game will not be able to find the file, and crash.
That’s it! You’ve just exported the subsystem. Now it’s time to hook it up so the game can load it.

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 14 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
4.7 Getting the game to find and load your subsystem

Adding your subsystem to SubSystemTuning.xls
The .Hod file is in place now, but there still is no .subs file in the Data\SubSystem\Hgn_TestSubSystem directory. This file is created by using the Data\SubSystems\SubSystemsTuning.xls file. Open this file in Excel to see how it’s done. When Excel is asking if it should enable macros press the ‘enable’ button.
For now, just copy the ‘Hiigaran FighterProduction’ column to the right, next to the last subsystem, and call it Hiigaran TestSubSystem. It’s important to spell out ‘Hiigaran’ and to add the space between Hiigaran and TestSubSystem. The excel macros will transform this into Hgn_TestSubSystem automatically.
When you’ve copied the column, change the Ship Name and Sob Description to ‘TestSubSystem’.
If you look further down the column, there is an item that governs Type. You have to fill this one in to let the game know what type of subsystem it is. There are 2 valid types: System, and Weapon. Type anything else, and the game will crash and let you know that you typed something wrong. For now, just type ‘System’.
Exporting your subsystem from SubSystemTuning.xls
Now that you’ve filled in the column, let’s export that column. Select the whole column by pressing on the corresponding button above it labeled by letters. This selects the whole column. Now press one of the ‘Create/Update/Export SubSystem Data’ buttons. It comes up with a little dialog asking you what you want to send to file. Select ‘Send Hiigaran TestSubSystem to file’ and press ok. This should have exported it.
Now check if the file was exported correctly by checking if it was created in the Data\SubSystem\Hgn_TestSubSystem\ directory. There should be a Hgn_TestSubSystem.subs file. If it is not there, you have misspelled one of the names somewhere.
That’s it! This is all you need to tell the game how to load your subsystem. But you will not see them yet though. Why not? Because you still have to tell the game how to attach the subsystems to the ships. This is done by creating hardpoints on the ship. The next section tells you how to do this.
4.8 Defining Hardpoints on Ships

Maya
Hardpoints need to be defined in somewhat the same way as weapons. They have to be defined in Maya. Open up Maya, and the file of the ship you want to add a hardpoint to. Now create a joint that’s linked to the root, and give it the name Hardpoint_Position. Now create two extra joints called Hardpoint_Direction and Hardpoint_Rest, where Hardpoint_Direction points straight up (in hardpoint space) and Hardpoint_Rest points forward (also in hardpoint space). Then export the ship in the usual way (to a .hod file).

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 15 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
4.9 ShipTuning.xls

Once you’ve exported the ships you need to define the hardpoints in the shiptuning file in much the same way as weapons. Open up the shiptuning file and search for the column of the ship you just added a hardpoint to.
Now search for the columns called ‘Hardpoint’. In these columns you’ll find the following members:
Name Of the Hardpoint Quoted hardPointName Name of the hardpoint as it may show up in the game
JointName Quoted jointName Name of the _Position joint without the _Position part (so in our example it would be ‘Hardpoint’)
Type Quoted type The type of the hardpoint. This can be three things: ‘Production’, ‘System’ or ‘Weapon’
HealthType Quoted healthType The healthtype of the hardpoint. This can be three things: ‘Indestructable’, ‘Damageable’ and ‘Destroyable’. Indestructable means that nothing can hit or damage it (nor select it). ‘Damageable’ means that you can damage it and disable it, but never totally destroy it. ‘Destroyable’ means you can kill the target, so that the enemy has to rebuild the subsystem from scratch.
DefaultSubSystem Quoted defaultSubSystem Name of the default subsystem. This must be exactly the same as the name of one of the directories in the Data\SubSystem dir.
Family Quoted Family The subsystem family, this drives where the subsystem appears in the taskbar UI, some AI logic and the logic for replacing a subsystem with a new one in the build menu. The valid options: Production, Innate, Sensors, Generic
FittingSubSystem# Quoted FittingSubSystem# Name of the potential subsystems that can be placed on this hardpoint. These must be exactly the same as the name of one of the directories in the Data\SubSystem dir.

So for our subsystem to show up, type ‘Hardpoint’ in the jointname box, ‘Production’ in the Type box, ‘Indestructable’ in the Healthtype box en ‘Hgn_TestSubSystem’ in the DefaultSubSystem box. Now if you load the ship in the game, the subsystem should show up. That’s all there is to it! Below are some specific pointers on how to define the specific variables of Production, System and Weapon subsystems.
4.10 Creating Production SubSystems

Production subsystems are subsystems that enable you to build something. This is linked to the build system. There is nothing you have to do really, just create the subsystem and give it a reasonable name. The buildsystem searches for the name and acts accordingly. If you want the production subsystem to do some extra stuff (like speeding up the build process) then you should

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 16 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
have a look at the Systems Subsystem. The extra attributes that you add to that subsystem can be applied to all subsystems, so you can also add some variables to production or weapon subsystems.
4.11 Creating System SubSystems

General
System Subsystems can have multipliers. Multipliers can modify certain parameters of ships like the speed, repair-rate, buildspeed, etc. If more multipliers are needed but are not available at the moment, just let us know, and we’ll add them to the game. These multipliers can be edited in the Data\SubSystem\SubSystemTuning.xls file. Just look for the rows called ‘Multipliers’, where there are a number of predefined slots of multipliers that look like this:
MultiplierType Quoted MultiplierType The type of variable that is multiplied. Look in the list below on what types are available at the moment.
InfluenceType Quoted InfluenceType Influence area. This tells the system what multipliers to modify, look below for different choices for this variable.
ActivityRelation Quoted ActivityRelation Currently there are two choices: ‘None’ and ‘Linear’. None means there is no relation between the activity and the multiplier. Linear means there is a linear relation between the activity and the multiplier, linking the multiplier to the subsystem’s health.
MultiplierHigh MultiplierHigh Multiplier for when the activity is 100%, or in case of a ‘None’-ActivityRelation, the value of the multiplier
MultiplierLow MultiplierLow Multiplier for when the activity is 0%. In case of ‘None’-ActivityRelation this variable is ignored
Radius Radius Radius for the spheres defined in the InfluenceType. Look below for different choices for the influence type.

Multipliers are multiplied with the variable. This means that if you want a multiplier to be ineffective, you need to set it to 1.0. The multiplier high and low values can be used when the activity relation is linear. The reason there is a high and a low value is more flexibility. For example, let’s say you build a speed-enhancer-subsystem. But when the speed enhancer is damaged, it actually has a negative effect on your speed, essentially lowering the speed of your ships below their original speed. In this case you would set the activity relation to linear, the high to 1.2, and the low to 0.8 for example. This causes your ships to speed up when the activity (and therefore health) is 100%, and when the activity is 0% (heavily damaged) the speed is 0.8 times the original speed.

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 17 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
MultiplierType
At the moment the following multipliers are available:
MaxHealth Maximum health multiplier
Speed Maximum speed multiplier
BuildSpeed Buildspeed of ships multiplier

InfluenceType
There are a number of influence types available:
ThisShipOnly Act only on the ship that this subsystem is deployed on
AllShipsWithinRadius Act on all ship in the given radius (including the ship this subsystem is deployed on)
OwnShipsWithinRadius Act on all ships owned by the player within the given radius (including the ship this subsystem is deployed on)
EnemyShipsWithinRadius Act on all enemy ships within the given radius
AllShipsWithinRadiusExcludingThisShip Act on all ships within the given radius (excluding the ship this subsystem is deployed on)
OwnShipsWithinRadiusExcludingThisShip Act on all ships owned by the player within the given radius (excluding the ship this subsystem is deployed on)

4.12 Creating Weapon SubSystems

Creating weapons as subsystems is a bit more complicated, but follows the same pattern as creating a weapon for a ship.
The mesh for a subsystem that is a weapon is basically the weapon itself with maybe a little base attached to it. It needs to have a root and a _Position, _Rest, _Direction, and _Muzzle joint. Also, if the weapon is a turret, it needs a _Latitude joint. The exporting is the same as a general subsystem.
Hooking them up in the Data\SubSystem\SubSystem.xls file is the same as how it works in the Data\Ship\ShipTuning.xls file. Find the ‘Weapons’ row. The only two things you have to fill in are:
Name of the weapon type Quoted weaponName Name of the weapon used. Look in Data\Weapon\* for the names to use in this field
jointName Quoted jointName Name of the _Position joint of the weapon, without the _Position part.

This should hook up the weapons. If you want to create a weapon subsystem, be sure to set the subsystem type to Weapon and be sure to deploy it on a weapon-hardpoint. Slave guns are automatically found and hooked up. Look in HW2_WeaponsHowTo.doc for a detailed explanation on how to create and hook up weapons.

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 18 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
4.13 Extra Variables in SubSystems

Self Repair Rate selfRepairRate Rate of repair. The given number is the number of health units repaired every second
Collateral Damage collateralDamage The damage the ship takes when this subsystem explodes. The given number is the number of health units the ship loses when this subsystem explodes.
Inactive Time After Damage inactiveTimeAfterDamage Only used in ‘Damageable’ Subsystems. This is the time the subsystem remains inactive after being heavily damaged.
Activate Health Factor (0-1) ActivateHealthPercentage The amount of health this subsystem is given after it has been inactive for inactiveTimeAfterDamage seconds. The given number is multiplied with the maxhealth of the subsystem to set the health.
Build cost in RU CostToBuild Total cost of the subsystem in RU’s.
Build time in seconds timeToBuild The total time to build this subsystem
Is Research system isResearch Must be set to 1 if it is a research unit, else it must be set to 0.

4.14 Adding Animation

When subsystems are built, and are deployed on the ship, it's a lot nicer if they don't 'pop' on the ship, but are nicely animated to come out of the ship. This is possible now. All you have to do is animate the subsystem in Maya, and create two animations. One needs to be called 'Deploy', and one needs to be called 'Recycle' (they need to be titled exactly like this). Obviously, 'Deploy' is played when the subsystem is just built, and being deployed on the ship. The 'Recycle' animation is played when the subsystem is decommissioned/recycled/sold.
Remember that you cannot animate the root node! If you want the whole subsystem to move up or down in the animation, you'll need to create a new joint to facilitate this. Look in the Hgn_Research subsystem on how to implement the animation.

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 19 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
5 Innate Subsystems
5.1 What are Innate Subsystems?

As you may know, Homeworld2 has support for regular subsystems like ability modules (cloak generators, hyperspace modules, etc.), sensors subsystems, and certain weapons systems (like the Hiigaran Battlecruiser’s Ion Turrets). These all use separate, distinct meshes that are considered independent of the hull, for our purposes.
However, Innate Subsystems are slightly different. By necessity, these are subsystems that use part of the parent ship’s mesh to represent themselves. Examples of Innate Subsystems include things like the Vaygr Battlecruiser’s Heavy Fusion Missile Battery, all of the engines for ships in the game that are destroyer sized and up, and resource drop off points on motherships, shipyards, and carriers. Therefore, they always exist on a ship. They cannot be built or destroyed, either.
Making these Innate Subsystems isn’t as simple as just making a subsystem mesh and hooking it up to a joint as it is in the case of regular subsystems. The creation process is a bit more convoluted, although the result is the same. This is by necessity due to their nature:
1. Because they use part of the parent ship’s mesh to visually ‘represent’ it, it is invisible.
2. Furthermore, regular subsystems automatically glow green when you mouse over them. Innate subsystems, because they are not visible (as they are ‘represented’ by the parent ship’s mesh), require ‘glow meshes’ that are not normally visible but when moused over, their shapes glow like a regular subsystem.
3. Simple weapons effect collision meshes are required so that the innate subsystem can get hit and damaged.
5.2 Maya

Many things are done in Maya with the help of various custom Maya plugins. These are designed to enable a developer to add additional content to the base Homeworld2 ship meshes. In this case, Maya is used in the creation of innate subsystems, specifically their glow meshes and their weapons effect collision meshes. Furthermore, Maya is used in the placement of joints that determine where the innate subsystem gets hooked up.
5.3 ShipTuning.xls, .ship , SubsystemTuning, and .subs Files

ShipTuning.xls is a critical file that gives Homeworld 2 ships their properties and abilities. In the case of all subsystems, the ability to have them is defined as desired per ship within ShipTuning.xls and then exported to a .ship file. The actual properties of the subsystems themselves are defined within SubsystemTuning.xls and exported to a .subs file. The .xls files are opened in Excel.

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 20 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
5.4 File Extensions and Directories (Folders)

There are a few general things that you must keep in mind regarding file extensions and directories before you begin adding innate subsystems (or any other customization process).
Ships in Homeworld 2 begin as meshes saved as Maya ASCII files (.ma extension). These .ma files are stored in Homeworld2/Datasrc/Ship/, along with any associated textures (such as hull textures, badges, LOD textures, etc.). Exported files are exported into a file with a .hod extension, stored in Homeworld2/Data/Ship/.
With regards to adding innate subsystems to a ship, they must be defined in the appropriate places in ShipTuning.xls for the ship in question (found in Homeworld2/Data/Ship) and an appropriate .ship file (placed in Homeworld2/Data/Ship/) must be generated.
Furthermore, subsystem meshes are saved as Maya ASCII files (.ma) as well. These are stored in Homeworld2/DataSrc/Subsystem/, along with any associated textures. In the case of innate subsystems, a 1x1 pixel .tga is needed in this directory too. Exported files are exported into a file with a .hod extension, and stored in Homeworld2/Data/Subsystem/.
Subsystems have their own version of ShipTuning, and in this case it is not surprisingly called SubsystemTuning.xls, which can be found in Homeworld2/Data/Subsystem. All subsystem properties, whether for regular and innate subsystems, are found here. Like it’s counterpart, SubsystemTuning.xls generates .subs files. These are stored in Homeworld2/Data/Subsystem/.
As you can imagine, quite a few files are affected. We will go into further detail about these files and their directories as we get to them, but to summarize:
Homeworld2/Datasrc/Ship/
.ma
⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ associated textures

Homeworld2/Data/Ship
ShipTuning.xls

Homeworld2/Data/Ship/
.hod
.ship

Homeworld2/DataSrc/Subsystem/
.ma
1x1 .tga file (for glow mesh)

Homeworld2/Data/Subsystem
SubsystemTuning.xls

Homeworld2/Data/Subsystem/
.hod
HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 21 .subs

Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
5.5 How To Add Innate Subsystems

Note: This tutorial assumes that you know how to use Maya and Photoshop. If you need to, please familiarize yourself them before continuing. Furthermore, this tutorial assumes that you have the necessary plugins already installed. Also, you are warned ahead of time that this process is very complex and tedious and not for the faint of heart.
Creating the Glow Mesh
Let’s pretend that you’re the one who is making the engine of the Hiigaran Destroyer a targetable, damageable, innate subsystem. First of all, we must fire up Maya and load up Hgn_Destroyer. Make a duplicate of this to work on. Call it something other than Hgn_Destroyer - like Hgn_Destroyer_Work or something similar.
1. In the top left corner of the screen, make sure that the drop box displays ‘Modeling’. This means that you are in Modeling mode, which is what we want.
2. Examine the engine area of the Destroyer with faces in mind. We will select these faces and extract them for our use in the innate engine subystem. We might have to split up a couple of polygons to get a clean ‘cut’ so that the engine can be separated cleanly, without weird, uneven edges.
3. Shift-select all the faces (including new ones that you may have made from adding edges) that would make up the rear engine area of the Hiigaran Destroyer.
4. Select Edit Polygons -> Extract.
5. Select Edit Polygons -> Separate. This should split off your selection from the main mesh into a separate object.
6. Make sure that you have object selection turned on (press F8).
7. Select the engine object, and only the engine object, and then focus on its entry in Hypergraph.
8. Drag the object out of the root hierarchy.
9. With the object still selected, go to File -> Export Selection. Select the box beside the entry.
10. Make sure that the filetype is .ma and then click on the ‘Export Selection’ button.
11. Give a name to this extracted file - Hgn_Des_Engine.ma. Make sure it’s saved in Homeworld2/DataSrc/Subsystem/Hgn_Des_Engine. If this directory does not exist, make it.
12. Close this current duplicate of the destroyer that you are working on (i.e. Hgn_Destroyer_Work), and load up Hgn_Des_Engine.ma.
13. Go into the Camera Attribute Editor and change the far clip plane camera attribute to a high number like 10000. Your object should now show up properly after zooming in and out.

In game, the target centre of an innate subsystem is where its root joint joins onto the subsystem joint it is assigned on the target ship. Note that in our case, the root joint is far away from where the innate subsystem glow mesh is. We will change this shortly. Examine the Hypergraph. It should look something like this:

HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 22 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
14. Do you see the highlighted Hgn_Destroyer object? Drag it out. Now, drag the object labeled ‘polySurface2’ in the picture and drag it into Root. Delete the now separated ‘Hgn_Destroyer’ and its child, ‘transform1’. You’ll notice that Hypergraph should look like this:
15. ‘polysurface2’ will be our innate subsystem glow mesh. You can rename it to ‘select_Hgn_Des_Engine’.
16. You would also note that the mesh will now look transparent. No matter… Create a new HW2 shader by pressing the ‘Create HW2 Material’ button (the sphere with HW2 in it, in the Relic Tools Shelf). Open up Hypershade and call the material whatever you like.
17. Open up the new material’s Attribute Editor and assign a 1x1 .tga of a single white pixel to it via the button at the right side of the Color slider. This .tga can be named anything you want, but we called it ‘white.tga’ because we made it a white 1x1 pixel.
18. Go to HW2 Shader Attributes in the Attribute Editor for the same material, and assign it ‘innateSS.st’ from the list of shaders.


HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 23 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
19. Delete all unused shaders from Hypershade. Furthermore, go into Window -> Rendering Editors… -> Multilister… and then from there, Edit -> Delete Unused shaders. This will delete any extraneous shaders that are not used in this mesh.
20. Assign this new material to select_Hgn_Des_Engine. It should now appear as a solid color in Maya.
21. Make sure that select_Hgn_Des_Engine is selected. Activate the Move Tool.
22. Use the command ‘Center Pivot’ (we’ve assigned ALT-C as the hotkey for it, although you may have a different assignment) to center it on select_Hgn_Des_Engine.
23. We will now use the command ‘Snap to Point’ (we’ve assigned ‘v’ as the hotkey for it, although you may have a different assignment) to snap Hgn_Des_Engine onto the root node. To do this, make sure select_Hgn_Des_Engine is selected, hold down ‘v’ (or your own hotkey) and then hold down the middle mouse button at the same time. Drag the pointer over the root joint and Maya will snap the innate subsystem to where the root node is. This is what it the result should look like in wireframe display (the circle indicates the root node:

24. Click on Modify -> Freeze Transformations.
25. Simplify the mesh for the innate subsystem, while retaining as much of the overall profile as possible. Nooks and crannies can be eliminated however, because when they are rendered in game, they will be bad looking bright spots caused by overlapping, redundant faces. Since no edges will be visible, we will aim for as flat of a surface as possible without changing the shape of the engine too much. As usual, manipulating/merging vertices and deleting edges are your best bet towards this. Make sure to watch for triangular, questionable faces on your mesh or else they will not render properly in game.
26. Save your work as Homeworld2/DataSrc/Subsystem/Hgn_Des_Engine/Hgn_Des_Engine.ma!!


HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 24 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
Hooking Up the Glow Mesh
It’s time to ‘fit’ it onto the ship it’s intended for.
1. Make sure you have Hgn_Des_Engine.ma saved. Load up your duplicate of the Hiigaran Destroyer (i.e. Hgn_Destroyer_Work from Section 2.1).
2. Select File -> Import… and pick Hgn_Des_Engine.ma.
3. You’ll notice that the_Hgn_Des_Engine will appear in the scene.
4. Use the Move Tool and drag select_Hgn_Des_Engine so that it fits over the engine of the destroyer. Make a note of the XYZ coordinates in the Channel Box. These coordinates are what you will use to place the subsystem joint (to position the innate subsystem in game). The picture to the left is an example of what it should look like in Maya in wireframe display (for clarity).
5. Close the duplicate Destroyer mesh.
6. Load up Hgn_Destroyer.ma. We will now add a subsystem hookup joint for the Destroyer engine. Make sure you enable Show -> Joints in the view that you are using.
7. In the top left corner of the screen, make sure that the drop box displays ‘Animation’. This means that you are in Animation mode, which is what we want.
8. Click on Skeleton -> Joint Tool. Now click on anywhere in the display near the mesh.
9. Switch to Move Tool and select the joint. Duplicate this joint and then move it negatively along the Z-axis.
10. Duplicate the original again and move it up along the Y-axis.
11. In Hypergraph, join both of these to the original joint.
12. Rename the root of this joint ‘Hardpoint_Engine_Position’. Rename the joint placed down the Z-axis ‘Hardpoint_Engine_Direction’. Rename the joint placed along the Y-axis as ‘Hardpoint_Engine_Rest’.
13. Enter the coordinates that you copied down in Step 4. The point should move to where the center point of the innate subsystem would be in game.
14. Select Edit -> Delete All By Type -> History.
15. Save in Homeworld2/DataSrc/Ship/Hgn_Destroyer.
16. Click on the box beside File -> Export All. This will open the ‘Export All Options’ window.
17. Beside where it says ‘File Type,’ there should be a drop box. Click on it, and select ‘hod’ from the list.
18. Make sure that the ‘Ship’ radio button is selected in the ‘Export Type’ section.
19. Make sure that ‘DXT5(rgba)’ is selected in ‘Texture Options.’


HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 25 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
20. Make sure that in the ‘Optimization Options’ that Triangle List is selected and Merge is selected.
21. Once this is done, click on the ‘Export All’ button.
22. Select the directory the .hod is going into. In the case of our Hiigaran Destroyer, we will place its Hgn_Destroyer.hod in Homeworld2/Data/Ship/Hgn_Destroyer. If the directory doesn’t exist, you will have to create it.
23. Close the file.

Finishing the Innate Subsystem Mesh – Weapons Effect Collision Mesh
Now that you have your joint placed on the main ship, it’s time to finish Hgn_Des_Engine.
1. Reload Hgn_Des_Engine.ma.
2. You might want to scale up select_Hgn_Des_Engine at your discretion. It needs to be slightly bigger than the engine on the parent ship. Use your judgment as to how to go about this. You might also find that you will have to come back and adjust other parts of the mesh to make it fit better.
3. With the select_Hgn_Des_Engine mesh still selected, enter ‘90’ in Rotate X in the Channel Box. This will rotate the subsystem to its proper orientation in the game. It will align itself to the joint placed in Hgn_Destroyer.
4. Duplicate this mesh. This will be your weapons effect collision mesh. Rename it to ‘CM_Hgn_Des_Engine’. It is highly recommended that this geometry be simplified if possible. This mesh won’t be seen at all, and is only used to determine where weapons hit and their effects get spawned.
5. Select Edit -> Delete All By Type -> History.
6. Save.
7. Click on the box beside File -> Export All. This will open the ‘Export All Options’ window.
8. Beside where it says ‘File Type,’ there should be a drop box. Click on it, and select ‘hod’ from the list.
9. Make sure that the ‘Ship’ radio button is selected in the ‘Export Type’ section.
10. Make sure that ‘DXT5(rgba)’ is selected in ‘Texture Options.’
11. Make sure that in the ‘Optimization Options’ that Triangle List is selected and Merge is selected.
12. Once this is done, click on the ‘Export All’ button.
13. Select the directory the .hod is going into. In the case of our Hiigaran Destroyer Engine, we will place its Hgn_DesEngine.hod in Homeworld2/Data/Subsystem/Hgn_Des_Engine.
14. Close the file.


HOMEWORLD2 Copyright © 2003 Relic Entertainment Page 26 Homeworld 2 RDN – HW2_ArtPipeline.doc 10/27/2003 3:09 PM
Adding Values to SubsystemTuning.xls
Your destroyer engine innate subsystem won’t work unless it exists as a subsystem as defined by SubsystemTuning.xls. More on SubsystemTuning can be found elsewhere in this document.
1. Load up SubsystemTuning
ââåðõ^ ê ïîëíîé âåðñèè ïîíðàâèëîñü! â evernote


Âû ñåé÷àñ íå ìîæåòå ïðîêîììåíòèðîâàòü ýòî ñîîáùåíèå.

Äíåâíèê Áåç çàãîëîâêà | freejen - Äíåâíèê freejen | Ëåíòà äðóçåé freejen / Ïîëíàÿ âåðñèÿ Äîáàâèòü â äðóçüÿ Ñòðàíèöû: ðàíüøå»