After being asked by some people about some things for some time now I decided to start a thread that explains the most important things that can be done with the Pandemic tool or hex editing or in XSI which will make your models look more polished. Realize the full potential of your models now!!!
I'll update this thread within the coming days or weeks, so check back.
XSI
Lowres model
A low resolution model is what Battlefront displays when you see an object from a distance. If the object has no lowres model, it will become invisible. Thus you should create lowrez models for your objects especially if they are used on large maps and/or maps with many objects at once on the screen.
Creation
Hence its name, the lowres model is supposed to have less polygons than the normal model. Therefore you should create a copy of the normal model and reduce its polygons. You must not use the "Polygon Reduction" tool for this, it doesnt work on game models because it doesn't know which edge is important and which is not, it will just evenly remove them. Deleting unneeded edges will take some time but it is worth it, especially because you can use the lowres model also as base for the shadowvolume and collision.
The two things that are important on a lowres model are:
The shape, you see lowres models only from far away so you will not be able to see any details and if some surfaces are round.
The UV, every UV has cuts somewhere, make sure not to delete the edges where the uv pieces are split.
Thats basically what you need to pay attention to, all edges that dont contribute to the shape or the UV should be deleted.
There is no hard number for the polycount of the lowres model, depending on the shapes complexity and details on the normal model it could have from one to three quarters less polygons.
Integration
All you have to do is name the lowrezmodel "whatever_lowrez", if it has multiple parts, you don't need to number them, the "_lowrez" extension is enough.
Units are a special case, they use a seperate msh for the lowres model and have to be enveloped to the lowres skeleton. You can find one converted by AceMastermind in Andes XSIZETools or download it from here.
Example
Here you see the normal and lowres model of a railing:
While making this I realized that i wasted too many polys on the railings....
anyway, this is also a very good example on how very little effect rounding edges have ingame.
Shadowvolume
In Battlefront all objects receive shadows but they don't cast shadows by default. in order to make an object cast a shadow you have to include a shadowvolume in the msh. There is also a msh.option line "highresshadow" that makes btatlefront use the normal model as shadowvolume, but because shadows eat a large amount of performance in Battlefront you should only use it on very primitive models.
Creation:
The shadowvolume should be created just like the lowres model or be based on it. A shadowvolume is even less detailed than a lowres model because it doesn't need support edges for the UV and the shape can be more rough because it is ony projected on the ground which distorts it and the player pays less attention to it than something in front of him.
Integration:
To make Battlefront use a model as shadowvolume, name it "sv_whatever". if you have multiple shadowvolumes, just give them all the "sv_" prefix. that may not work all the time, if it doesn't then merge the parts together.
Example:
Here is the shadowvolume of the ACP Repeater:
Pandemic Tool
Specular map
A specular map allows to have dynamic specular highlights on the model where it is hit by light.
The highlights are generated depending on the orientation of the object to the camera and the light source.
The specular map itself is a greyscale texture that contains information about how bright the surface gets when it is hit by light. The brighter the specular map is, the brighter the surface will get ingame.
You can have no specular map at all, then the model will have bright round specular spots and look like plastic.
You can have a specular map with solid colors so that you differ the specular intensity of the different materials on a texture.
You can also have a detailed specular map which contains as much details as the diffuse texture. You can have scratches that become brighter than the surrounding surface or dirt that does not react to light all that much.
Creation:
You can create a specular map from the diffuse texture. Make it a greyscale image and increase the overall contrast through "values" or "curves" in e.g. gimp.
The brightness from the specular map will be added to the diffuse map when the light hits the model so pay attention to brighter/darker areas and make the specular map darker/brighter there (if that suits the material of course)
Ideally the diffuse texture should not contain any specular at all because it is added by the specular map dynamically. Therefore, if you create a new diffuse texture, don't include much specular highlights e.g. bright streaks on cylinders.
Integration:
You can set the specular color and decay(size of the spots) in the object's material and it will be carried over to the game.
To specular map a surface, apply the rendertype "4", you dont have to set any values or additional textures.
The specular map must be stored in the difuse texture's alpha channel. You do that by adding a mask to the diffuse texture and then copy the specular map in the mask.
You need to have your lighting at least set on medium to see the specular ingame.
In order to make the specular map show up, your map requires a directional light that has "Cast Specular" enabled.
Example:
This is an example of the specular map for the stock chaingun texture and its effect ingame:
Bump map
A bump map allows to fake plastic detail on a surface. It is a greyscale image that contains a heigth value for each pixel, if its brighter than the surrounding pixels, its moved "up" and if its darker its moved "down". Ingame the shadows on the surface are created dynamically depending on the object's orientation to the light.
Bump maps work especially well on rough surfaces like rock or can make panels or bricks look plastic.
Because their effect ingame doesn't change depending on the camera orientation, they arent really noticeable on smaller objects unless they are moving and/or have specular/gloss applied.
The first downside of bump maps is that the height information is only created by comparing directly neighbouring pixels. That means you can't fake round or sloped details with gradients! Due to this its also not really possible to have various heights, for example you wont see a height difference ingame between two moved up panels that have a different brightness on the bump map.
The second downside is that the effect gets weaker the sharper the angle is from which you look at the surface, and it only really looks plastic if you are nearly looking straight at it.
Creation:
You cannot, never ever create a bump map just from the greyscale of the diffuse texture! Please dont use Pandemics bump maps as reference for that. They did totally weird work, especially on the weapon bump maps.
Anyway, its best to start with a solid grey texture "888888" so that you can move things up as well as down.
Now look at the diffuse texture to see which surfaces should be moved up, color them brighter/white. All surfaces/grooves that should be moved down need to be colored darker/black.
After you are done with these details you can add some "low frequency" detail like scratches or damage or structures on rocks etc. You can make these by using the greyscaled diffuse texture but remember that the result of that will always be totally incorrect(that doesn't mean it will look too bad ingame) because the diffuse texture already contains shading most of the time.
If you have a small groove/ridge on the diffuse texture it often has a bright edge on one side and a dark edge on the other. If this is used for the bump map it will result in a groove one one edge and a ridge on the other edge rather than a groove/ridge in the middle.
If you create a new diffuse texture, dont include shading for the details e.g. bright edges on the borders of ridges because they will be added dynamically ingame.
Integration:
option 1:
To bump map surface, apply the rendertype "27", and enter the name of the bump map in the "texture1" slot.
option 2:
This does not require a flag, create a .msh.option file for your model with
Code: Select all
-bump
This is useful if you quickly want to bump map something, but be careful if you have any flag (rendertype/transparency) applied to a texture listed than either the bump map or the flag wont work and there may be lighting issues ingame.
Create a .tga.option for the bump map with this in it:
Code: Select all
-bumpmap -format bump
You can also modify the strength of the bump map with this command:
Code: Select all
-bumpscale value
You need to have your lighting setting on high to see the bump map.
In order to make the bump map show up, your map requires a directional light, I suppose.
Example:
This is the example of a bump map for the Clone assassin blade and its effect ingame, in combination with gloss. Without that it wouldn't be half as visible:
Normal map
A normal map is basically a better bump map. While a bump map only has one channel (pixel height), the normal map has 3: red (x-vector), blue (z-vector) and green (y-vector) and therefore contains much more information about the surface. It takes much more time to make than a bump map though because you cant just paint on the details, you have to bake them from a model that really has them modeled in.
Creation:
A normal map is usually created with a 3d application, you need the model that is going to be in the game and contains all the basic shape and the silhouette and a high resolution model that has all the details modeled in you want to have in the normal map. The highres model can either be created by a sculpting application like Sculptris or ZBrush or modeled with subdivision/hard surface modeling.
After you have finished the high resolution model you can apply a bump map if you want to have scratches or really small details or structures in the bump map.
Integration:
To normal map a surface, apply the rendertype "27".
In the "Texture 1" slot insert the name of your normal map with .tga extenstion.
Create a .tga.option file for your normal map and put this in it:
Code: Select all
-format bump
You need to have your lighting setting on high to see the normal map.
In order to make the normal map show up, your map requires a directional light.
Example:
This is a part of the Clone Commando visor for which I made a normal map:
Bump/Normal and Specularmap
Not much explanation needed, its a combination of both bump/normal and specularmap
Creation:
The specular map needs to be put in the bump map's alpha channel. To do this, open the bump map in your favourite image editing application, apply a mask to the bump map and copy the specular map in the mask.
Integration:
To normal/bump and specularmap a surface, apply the rendertype "28".
In the "texture 1" slot insert the name of the bump/normal map with .tga extension.
You need to have your lighting setting on high to see the bump map.
If you have your lighting setting on medium this flag will be interpreted as specular map flag. This means that you also have to put the specular map in the diffuse texture's alpha channel if you dont want people who play on lower settings to see your model looking all plasticy.
In order to make the specular map show up, your map requires a directional light that has "Cast Specular" enabled.
Example:
Here is the Clone Commando without and with specular and normal map, I didn't have the white Commando in the map so I had to take this one which makes the normal map not that recognizeable:
Environment map
An environment map allows the model to reflect the environment dynamically, depending on the orientation of the model and camera. envmaps look especially cool on round surfaces.
If you have no environment map, then the model will reflect the real environment.
If you have an environment map (cubemap), then battlefront will generate a textured cube from it, that surrounds the model and will project the cube's texture onto it.
Creation:
The cube map is basically an unfolded cube and each side represents one side of the "room" in which the object is located.
Because of its special purpose a cube map can't have a resolution that is power of two. The resolution is "apoweroftwo*threequartersofthepoweroftwo", for example 256px*192px
Here are two examples of cube maps:

The alpha channel of the environment map determines its opacity.
Make sure that sides aren't switched, its supposed to reflect whats behind you when you look at it.
Integration:
To environment map a surface, apply the rendertype "6".
In the "texture 3" slot insert the name of the environment map with .tga extension.
Create a .tga.option for the environment map with this in it:
Code: Select all
-cubemap
You need to have your lighting setting at least on medium to see the environment map ingame.
If you take a look at the examples ingame, you will see that the environment maps have a different effect. This is the result of different specular decay. If you dont modify the specular decay in XSI the object will be very bright and glowy and you will hardly recognize the environment map. The fountain ball on Naboo has no glow at all. These are the two extremes. The LAAT balls have a specular decay inbetween those two, to be exact they use the tantive4trooper's inserted through hexediting.
Example:
Here are the above environment maps in action:
Hexediting
All the rendertypes explained above can be done through hex editing in combination with RepSharpshooter's great meshtool
AceMastermind made a list of the hex values for every rendertype in this topic, if you scroll down, you can also see a list of all hex values for the 5th place flags.
In order to create the flags that need an input for texture1, apply a bump map with the meshtool.
Then open the msh with a hex editor like HxD.
Search for "ATRB", this marks the beginning of the section that contains the flags of a material.
After this you will see "TX0D" and a texture name, this is the diffuse texture. Your msh will most likely have several materials so make sure to select the one with the right texture.
After the diffuse texture name this material should also have "TX1D" and the name of another texture (with "_bump" at the end), this is the "texture1" slot from the Pandemic tool. You can name the texture however you want, just make sure that you dont overwrite any data if you increase the length.
Now set your cursor behind the "B" of "ATRB", the value "04" right after "42" should be selected in the hex values.
This is the first place after ATRB.
Things like transparency, glow and gloss are stored in the fifth place
The rendertypes are stored in the sixth place
Your material should have "80" in the fifth place which results in gloss, put in "00" if you dont need it or some other value.
Your material should have "1b" in the sixth place, which is rendertype 27 (bump map), now replace this value with the hex value of the rendertype you want to apply.
Save the file and you are done!
If you want to apply an environment map, just use the Meshtool. You can modify the name of the environment map texture, it can be found after "TX3D" (texture 3 slot of the Pandemic tool) in the material.
Glow
Glow allows you to have lightbloom on surfaces, it will also make them brighter. The color of the diffuse texture determines the glow color and the alpha channel determines the glow strength.
The strength of the glow depends on the size of the glowing surfaces ingame. Really small surfaces will hardly have lightbloom but this glow gives already much better results than the glow through rendertype.
Creation:
White is extreme glow and black is no glow. If you still want to be able to see the surfaces color ingame, something like white with atleast 60% black is a good place to start with. You might have to adjust the strength several times though.
When you are done with the glow map, add a mask to the diffuse texture and copy the glow map into it.
Integration:
In order to apply glow to a surface you have to hex edit the 5th place flag of the material to either "02" - glow or "03" - increased glow (glow and emissive colors to be exact).
When you make the model, surround the parts that will glow with edges to separate it from the rest of the surface and give the glowing polygons a separate material so that you can enable glow only on these. You have to do this because a polygon with glow applied, even if the glow map is black, will be brighter than other polygons and not receive any lighting.
You need to have lightbloom enabled to see the glow ingame (suprise, suprise!), with it disabled the glowing polygons will still be brighter than usual though.
Example:
Glow on console screens. The glow changes dynamically if the surface is obstructed somehow, so if you have something dark scrolling over the screen, the glow will be weaker on these spots:
Gloss
Gloss is pretty similar to specular. Its also calculated depending on the surfaces orientation to the light source and camera. The difference is that while specular generates white spots, gloss makes the model really glow when it is directly hit by light. Therefore it should be only used on small models because you will get huge glowing areas otherwise. The disavantage of gloss is that you cannot edit the intensity.
Creation:
Gloss doesn't care about the texture's alpha channel so nothing to do there.
Integration:
In order to apply gloss to a surface you have to hex edit the 5th place flag of the material to either "80 or "A0", I dont know if there is any difference between these two.
You need to have your lighting setting at least on medium to see the gloss ingame.
You need to have lightbloom enabled to see the glow ingame where the surface is directly hit by light,
in order to make the specular map show up, your map requires a directional light that has "Cast Specular" enabled.
Example:
Here are two examples of gloss. It looks pretty good on the blade in this moment but if it has a certain orientation the whole surface glows and you will hardly see the texture. On surfaces as big as on the wall it just doesnt look right.
Hardedged Transparency
The special feature of hardedged transparency is that it outputs only two transparency values ingame. Either a pixel is visible or invisible. This is especially useful for objects like fences or railings or a thin surface with holes.
The advantage of hardedged transparency is that you dont get the usual display "bug" when you see multiple transparent surfaces behind each other which displays the rear surface as if its in front of the other surface.
Creation:
No extra work on the texture needed, its handy to have the alpha channel with strong values though.
That prevents you from being surprised when pixels show up ingame that are not supposed to be displayed or vice versa and thus having to edit the alpha channel again.
Integration:
To add hardedged transparency, you have to add "1" to the first number of the fifth place. Since you will most likely have transparency enabled the fifth place will be "14" or "18", the second number (4) being single sided or "8" being doublesided transparency.
Example:
Hardedged transparency on the LAAT's missile tubes, allowing to have holes without any additional polygons:
Additive Transparency
The special feature of additive transparency is that it has a soft glow that increases when you see multiple polygons behind each other. The glow also gets more intensive the more opaque the texture is.
Additive transparency can be used really well for holograms of (force) ghosts.
Creation:
No extra work on the texture needed, you could modify the brightness though if the glow is too strong or weak.
Integration:
To add additive transparency, you have to add "4" or "6"(with emissive colors) to the first number of the fifth place. Since you will most likely have transparency enabled the fifth place will be "44", "48" or "64", "68", "4" in the second number being single sided and "8" being double sided transparency.
Example:
Additive transparency on a hologram, you can see pretty well how it gets brighter in front of the glowing screen and where the pieces intersect: