The MDT tools have a function that allows generating billboard images for a treeMesh. But it's not perfect and many times doesn't make something usable. So I've discovered how to make one manually since I recently figured out how they actually work. (They aren't too complicated, just haven't really paid any attention to the billboard system until now since I had recently thought to using the treeMesh system for the kit geometry)
Battlefield 1942 uses 8 segments for Billboards (as evidenced by the fact that all billboard images have a horizontal resolution 8x greater then the vertical resolution). Each segment represents one view angle of the mesh. With that in mind, this translates in each view being a 45 degree increment from the last. Starting from 0 we rotate the mesh by 45 degrees and then render each view out using the "Render" menu in Max/GMax. The size of the image will of coarse be square. Keep in mind the width of your billboard will be 8x the vertical resolution, so keep that in mind when deciding on what resolution you are outputing each render at. The size and scale of the billboard is determined by the host treeMesh it self. It uses the trunk, branches, and any sprites that may be present to determine the size (or bounding radius, though the TM files do not store a bbox like SM files do, so the game determines this entirely on an automatic basis). So keep this in mind when designing your billboard texture.
Here's a XCF file that is editable with a image app called "Gimp"
BF42BillBoardAngles.xcf
This has the layers set up in a manner that would allow pasting in your individual angle shots without much hassle, just clear out the existing text layers and background images and paste in your resulting renders. Then merge all the layers to one. If you need your billboard to be in a different resolution, simply rescale the image from the image drop down menu and the layers will be scaled correctly and retain their proper positions. You can save the resulting images you render out from Max/GMAX as PNG or other format that supports alpha.
Here are the rotation angles for rendering a billboard manually from "Front" view in 3DS Max/Gmax. For BF1942 we rotate the mesh to the left as that is the direction the game goes starts at when deciding what each segment corresponds to which angle it happens to be viewed at ingame. Thus first segment in billboard texture is at 0 degrees, and the next one goes to the left and thus becomes 45 degrees. (If you view the mesh from the top while rotating, it should be rotated counter clock wise by 45 degrees for each view render from the "Front" view in Gmax. Billboards do not appear to use "perspective". At least that's how the MDT renders each angle at. Thus the "Front" view is the recommended viewport to render billboard angles from.
(In 3DS Max/GMax typing in rotation values greater then 180, results in 3DS Max translating them to negative values)
1 -> 0
2 -> 45
3 -> 90
4 -> 135
5 -> 180
6 -> -135
7 -> -90
8 -> -45
You can throw in lights and/or skylights to produce lighting for your billboard. Though in most instances you will keep shadows turned off. You can zoom in/out to alter the size of the mesh in the billboard view, but keep in mind the maximum size it can be ingame is determined the size of the mesh it's used on.
Once you produce each angle and rendered it to individual texture files, you can use my GIMP example XCF file with each segment as it's own layer. Thus if you scale the image up or down, the layers will scale propertionatly without screwing up the position and size they need to be at to line up with the correct view angles ingame.
Once you've assembled the image from all your individual segments into one, then merge all the layers to one and export as DDS to the Billboards folder in the treeMesh RFA. Note that the geometry name of the host mesh determines what name the Billboard file needs to be for the game to find it and use it on your mesh.
So for example your mesh is titled "TreeExampleMesh_m1", thus your billboard should be named "TreeEXampleMesh_m1.dds" and placed in the Billboards folder in the treeMesh RFA (don't place it in the textures RFA, the game doesn't look there for billboards!)
The game appears to use DXT5 as the compression format for DDS files judging from the format the vanilla billboards are using.
How to manually create Billboard textures...
- Apache Thunder
- Posts: 1210
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
How to manually create Billboard textures...
![Image](http://www.battlefieldsingleplayer.com/apachethunder/Images/other/MeowsticFemaleOptimized.gif)
![Image](http://www.battlefieldsingleplayer.com/apachethunder/Images/other/DivaMikuDance.gif)
![Image](http://www.battlefieldsingleplayer.com/apachethunder/Images/other/MeowsticOptimized.gif)
I have cameras in your head!
Re: How to manually create Billboard textures...
Any idea as to why my billboard keeps showing a stretched version? seems like it is showing the entire width of the .dds but only with the 1 correct "layer"...
![Image](https://i.imgur.com/IWEfP0I.jpg)
![Image](https://i.imgur.com/IWEfP0I.jpg)
![Image](http://img.photobucket.com/albums/v219/reegad/sigs/superreegadosig.png?t=1284935459)