arma:texturing:custom_texture
Differences
This shows you the differences between two versions of the page.
Previous revisionLast revision | |||
— | arma:texturing:custom_texture [2015/08/22 01:44] – removed obsolete links. snakeman | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Custom Texture ====== | ||
+ | **Custom texture** by Mateck | ||
+ | |||
+ | That custom texture is a very interesting thing, pretty nice and saves quite some megabytes. | ||
+ | |||
+ | Any details on how its done? | ||
+ | |||
+ | Yes it saves megabytes as we don't need to create .p3d models for every paint scheme in our addon. | ||
+ | |||
+ | The way to do this is very simple. | ||
+ | |||
+ | 1) select all faces that are using single texture\\ | ||
+ | 2) create new selection | ||
+ | |||
+ | http:// | ||
+ | |||
+ | 3) in config.cpp under vehicle class put something like this | ||
+ | |||
+ | <code cpp> | ||
+ | hiddenSelections[] = {" | ||
+ | </ | ||
+ | |||
+ | where *_co are selections used by our T-72 | ||
+ | |||
+ | 4) now those selections will be invisible in game, to avoid this we need to use setObjectTexture command under Init EventHandlers of our addon or later in game | ||
+ | |||
+ | For our T-72 we used following code | ||
+ | <code cpp> | ||
+ | class Extended_Init_EventHandlers | ||
+ | { | ||
+ | class CH_T72 { | ||
+ | init = CH_Textures = [_this select 0, "" | ||
+ | }; | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | and here is example code for textures.sqf | ||
+ | <code cpp> | ||
+ | _tex = _this select 0; | ||
+ | |||
+ | switch (_this select 1) do | ||
+ | { | ||
+ | |||
+ | case " | ||
+ | { | ||
+ | _tex setObjectTexture [1," | ||
+ | _tex setObjectTexture [2," | ||
+ | _tex setObjectTexture [3," | ||
+ | _tex setObjectTexture [4," | ||
+ | }; | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | And that will be all. Fell free to use this code or change it whatever you like ;) | ||
+ | |||
+ | We still need to test this feature to ensure that there is no negative impact on performance and it works fine in multiplayer. | ||
+ | |||
+ | Need to say that this hole idea of custom textures is inspired by Dune Buggy addon by Sebastian Muller from OFP | ||
+ | |||
+ | **Suma** | ||
+ | |||
+ | That was really the original purpose, but with ArmA you can also change textures on " |
arma/texturing/custom_texture.txt · Last modified: 2024/08/01 14:31 by snakeman