HOW TO GET A LIGHTMAPPED STATIC PROP INTO GRAW

PAGE 5

 

10.Texture is as Texture does.

 

Right, we have come to the final stretch!

 

What do we have now? We have a

 

1.diesel file

2.model xml

3.unit xml

4...thats right, the material file!

 

But first lets actually import the texture you are gonna use for your wall, into the game!

 

Im gonna Assume that you intend to put more than texture into our fine gaming engine, am I right? Ok, then I suggest do like this:

 

Somewhere on your harddrive, wherever you choose(but someplace easy , since you will be typing the path alot would be good.. like..the C:\root)

You create a folder called someting like c:\my_textures(or whatever, but something that tells you that its textures in there is always good)

And in that folder you create two subfolders, “diffuse” and “bump”. And into those two folders you will pour your textures as you make them.

 

Ok, so lets find the texture you are gonna use, “wall_df.tga” where _df stands for Diffuse. Find the texture(psst, its in your tutorials folder) and put it in the diffuse subfolder of c:\my_textures. All your RAW textures(before atlasing) should be in TGA format as atlasgen converts them and compresses them into DDS, we dont want double compression!uuhhhg!

 

Also go to your GRAW tools folder and copy “atlasgen.exe” ,”atlasgen.bat”, “FreeImage.dll”  and “license-fi.txt” into the root of c:\my_textures

 

So now you have

 

C:\my_textures\diffuse\wall_df.tga

C:\my_textures\atlasgen.exe

C:\my_textures\atlasgen.bat

C:\my_textures\FreeImage.dll

C:\my_textures\license-fi.txt

 

 

This might sound alot but this is the stuff that you only have to do once! In the future, you just use the same folders and same exes, add all your atlas.xmls(I will teach you to write one in a minute) etc so its more of a preparation for greater things really..I really want you to keep your stuff sorted! Otherwise it will be a mess in the end!

 

Ok, in order for atlasgen to be able to make an atlas, it has to know how to do it! ( there is a very comprehensive guide to what atlasgen can do, you might want to read it first but its a bit technical for most people so this is just a short example to get you started and get the sample model into the actual game.

 

So in the c:\my_textures folder you create wall_atlas.xml and in that xml you type this

 

<texture_node name="atlas_props" file_format="dds">  we want this texture to get dumped under the “atlas_props” folder as that texture folder gets read in by every set in the game!if you want to do something special or put anything in a special set, you should set this to a diffrent folder in the the data/textures folder.

      <atlas name="wall_atlas" texel_format="AF_DXT5" width="1024" height="1024"> this tells us the name of the actual atlas that will be created “wall_atlas” and that it will use DDS format DXT5 and the height and widht of the final atlas.Also the widht and height of the atlas that will be created. As I only have one texture I want to put in the atlas I just name make it the same size as my texture, 1024x1024 pixels.

             <image name="wall_df"/> this is obviously the name of the texture atlasgen will pick up and put in the atlas. If I had for example 4 smaller textures instead that I wanted to put on this atlas I would just have copied up the <image name=”wall_df”/> tag 3 more times and put in their names aswell. But for now lets settle for 1 texture!

          

      </atlas> dont forget to close your tags!

</texture_node> dont forget to bring a towel!

 

Without my annoying comments it should look like this..

 

<texture_node name="atlas_props" file_format="dds">

      <atlas name="wall_atlas" texel_format="AF_DXT5" width="1024" height="1024">

             <image name="wall_df"/>

          

      </atlas>

</texture_node>

 

right, so save that and go to the my_textures folder where you now have

 

C:\my_textures\diffuse\wall_df.tga

C:\my_textures\atlasgen.exe

C:\my_textures\atlasgen.bat

C:\my_textures\FreeImage.dll

C:\my_textures\license-fi.txt

C:\my_textures\wall_atlas.xml

 

And doubleclick on atlasgen.bat

 

First it will ask you type in the path to the root directory in wich you have all your textures

 

Here you type in c:\my_textures   (it will search recursivly in that folder so it will find your texture in the subfolder “diffuse”) remember to give your textures UNIQE names!

 

Press enter

 

Then it asks you for the path to the “set definition file” that is the atlas.xml or “wall_atlas.xml” that you just created!

 

So there you type c:\my_textures\wall_atlas.xml

 

Press enter (hmm doesnt this remind you of the release version of the gamespy browser in graw J ??)

 

And then it will ask for the output root directy. This should always be the textures folder of your unbundeled game!

 

In my case: d:\program files\ubisoft\ghost recon advanced warfighter\data\textures\

but it all depends where you installed the game but it should always be  \data\textures

 

Press enter

 

A window will come up and like tell you what the program is doing and whatnot..when its finished go to your game directory

/data/textures/atlas_props/ and behold it has created a folder called wall_atlas complete with..an atlas!in it! PERFECT

 

                                                                                      

Previous page ------ Next page