|
Modding Tutorials Information and tutorials related to modding BF2. |
|
Thread Tools | Display Modes |
2013-02-21, 17:56 | #1 | |
PR:BF2 Lead Designer
Join Date: Jan 2012
Posts: 8,514
Belgium
|
Using Custom Texture Suffix In Editor and bf2meshviewer
I'm writing this down because quite a few people have asked me this already If it's in the wrong place or a duplicate of an old one please remove!
BF2 has the handy feature that it can load a different set of textures for certain objects if the mappers chooses too. For example quite a few vehicles, statics and other objects have a woodland texture next to their normal one. For example this US m1a2 tank: This happens because of this specific object there are existing 'woodland' textures. When you look at it's main color texture called: 'A2partc_c.dds' you can see there is also a copy of that called 'A2parts_c_Woodland.dds' So if a mapper chooses his map is a woodland map, he can choose this in his editor settings and then all objects that have textures with a woodland texture suffix will be loaded. By standard the editor and bf2meshviewer already have the option to load these, i'll show you. BF2MESHVIEWER In bf2meshviewer, after loading your object go to Options->Texture Suffix--> and then choose the one you want. Since you are still at default settings you will only see None and woodland. So now your meshviewer will load up the woodland textures (if they exist of your object). Now maybe you have made a costum texture and gave it it's own suffix( _snow,_syria,_desert,...) and you want to see them in meshviewer, this is how you do it. Open the config.ini file in the directory you installed bf2meshviewer in. Open it with a text editor and in there you will find the following piece of code: Code:
[Texture Paths] texpath=1,C:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr_edit suffix=woodland Code:
[Texture Paths] texpath=1,C:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr_edit suffix=woodland suffix=snow BF2EDITOR Now you can do the same for working in the editor. When mapping if you select a certain suffix and you save your map, it will save this in your init.con so if you then load the map ingame it will also load up the correct suffix if you selected one. When in the editor, go to Render-> Object Costum Texture Mode and select the suffix of your choosing. Quote:
Code:
ResourceHandler.AddCustomTextureSuffix "Woodland" Code:
ResourceHandler.AddCustomTextureSuffix "Woodland" ResourceHandler.AddCustomTextureSuffix "Snow" Code:
if v_arg1 == BF2Editor LevelSettings.CustomTextureSuffix "" else texturemanager.customTextureSuffix "" endIf Code:
if v_arg1 == BF2Editor LevelSettings.CustomTextureSuffix "Snow" else texturemanager.customTextureSuffix "Snow" endIf | |
|
||
2013-05-25, 22:46 | #2 |
|
Re: [Tutorial] using (costum)texture prefix in editor and bf2meshviewer
So I added it all as said, it shows up in game, and the name shows up in the suffix, but it doesn't actually load in the bf2 editor.
|
2013-05-26, 15:18 | #3 |
PR:BF2 Lead Designer
Join Date: Jan 2012
Posts: 8,514
Belgium
|
Re: [Tutorial] using (costum)texture prefix in editor and bf2meshviewer
did you extract all textures in your pr_edit? Remember that each time you load your map you need to reselect the suffix in the render options.
Or do you mean that the suffix is not showing in the render options? Cause it should if you follow my instructions. If you still have trouble hit me on xfire rabbit or send a PM |
|
|
2013-05-26, 16:26 | #4 |
Retired PR Developer
|
re: [Tutorial] using custom texture suffix in editor and bf2meshviewer
Well I made a custom suffix, but he wants woodlands, not desert which is the default, easy fix. I'll just rename them
|
|
|
2013-05-28, 12:24 | #5 |
|
re: [Tutorial] using custom texture suffix in editor and bf2meshviewer
|
Tags |
bf2, bf2meshviewer, costumtexture, custom, editor, prefix, suffix, texture, tutorial |
|
|