mad_cheese 593 Posted April 9, 2015 Apologies if this has been covered before, I searched all over and just can't get it to work. I made a custom helper object and managed to get it in game fine. I'd like to be able to change it's color (and if possible also it's opacity), which I can't get to work. The object just stays white in game if i use ie _object setObjectTextureGlobal[0,'#(argb,8,8,3)color(0,1,0,1)']; This is my config setup right now: config.cpp: class CfgPatches { class MCSS_ASM_INDICATOR { units[] = {""}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Data_F"}; }; }; class CfgAddons { class MCSS_ASM_INDICATOR { list[] = { "MCSS_ASM_INDICATOR_F" }; }; }; class CfgVehicleClasses { class MCSS_ASM_INDICATOR { //name in the editor displayName = "2C Indicator"; }; }; class CfgVehicles { class NonStrategic; class MCSS_Helper_Base_F: NonStrategic { displayName = ""; vehicleClass = "Helpers"; mapSize = 0.1; destrType = "destructNo"; hiddenSelections[] = {"camo"}; hiddenSelectionsTextures[] = {"#(argb,8,8,3)color(1,0,0,0.75,ca)"}; }; class MCSS_ASM_INDICATOR_F: MCSS_Helper_Base_F { mapSize = 1; author = ""; _generalMacro = "MCSS_ASM_INDICATOR_F"; scope = 2; displayName = "C2 3D INDICATOR"; model = "MCSS_INDICATOR\INDICATOR21.p3d"; icon = "\A3\Misc_F\Helpers\data\ui\icons\Sign_Sphere100cm_F"; accuracy = 1000; }; }; As you may realize, I set it up exactly the way as the Helpers are set up in the Misc_F addon, since I was testing with the helpers and was able to change the color. Is it possible that I just screwed something up in Blender or Oxygen2? In Blender, I gave it a white texture and I didn't set up any extra LOD's in Oxygen. Sorry I'm totally new to modelling and absolutely lost. Share this post Link to post Share on other sites
da12thMonkey 1943 Posted April 9, 2015 Is it possible that I just screwed something up in Blender or Oxygen2? Yes. You have to actually name the parts of your model that you want to be able to retexture in the 'Selections' window in O2 (Go to \Window\Named Selections\ in the toolbar and you'll see the window toggle off and on if you need help locating it). The names in the hiddenSelections[] array in your config are supposed to correspond with those defined selections on your 3D model. So for convenience just select your whole model in O2 and make a new selection called "camo", since that's the name you already have in your config. If memory serves me correct you also need to write a small model.cfg file with a class cfgModels to define the hiddenSelections within the model. You enter the same selection name as you're using in the config, under the sections[] part of the model.cfg For example: class CfgModels { class Default { sectionsInherit=""; sections[] = {}; skeletonName = ""; }; class INDICATOR21 : Default { sections[] = { "camo" }; }; }; Notice the classname in the model.cfg is INDICATOR21, which is the name your .p3d file, not the name of the class in your config.cpp. This is to indicate which .p3d file the data from the model.cfg gets compiled into when you create the .pbo. Share this post Link to post Share on other sites
mad_cheese 593 Posted April 9, 2015 (edited) thanks da12thMonkey! That did work :D Apologies for the bad etiquette, but now I have another minor issue.. First of all I was suprised when the object happened to be all red when I put it in game, which was off course because of this line: hiddenSelectionsTextures[] = {"#(argb,8,8,3)color(1,0,0,0.75,ca)"}; In a perfect world, I would love the object to be semi transparent and also visible in the dark, like the A3 helper objects. I set the alpha to about 0.4 in Blender (not even sure if that's what is needed) but when i use setobjectTexture like ie.. _object setObjectTexture [0,'#(argb,8,8,3)color(0,1,0,0.1)']; .. it will paint the object in a very dark green because the lower the opacity value gets, the more it seems to be mixed with black. what am i missing? sorry if this is too much, I really appreciate you helping me out with the texture! Edited April 9, 2015 by Mad_Cheese Share this post Link to post Share on other sites
da12thMonkey 1943 Posted April 9, 2015 I think you need a basic .rvmat file for that Create in in notepad like your model.cfg and config.cpp, save as a .rvmat and apply as a material on the model in O2. Try something like this: Ambient[]={1,1,1,1}; Diffuse[]={1,1,1,1}; forcedDiffuse[] = {0, 0, 0, 1}; emmisive[] = {R, G, B, A}; specular[] = {0, 0, 0, 0}; specularPower = 1; PixelShaderID = "Normal"; VertexShaderID = "Basic"; IIRC that's the most basic shader and doesn't require things like stages for normal map, specular map etc. Replace the RGBA values for the emissive[] array until it shines as much as you need it to. IIRC in Arma 3 you now need to use fairly large values in the RGB channels for it to actually glow brightly. e.g. emmisive[] = {1000, 1000, 1000, 1}; Might also be worth looking at what effect the forceddiffuse[] array values have on how the object is affected by shadows ingame. Ideally, if you can find them it's worth looking at what .rvmat data BIS' helper objects you want to emulate, actually use to make them glow. Share this post Link to post Share on other sites
mad_cheese 593 Posted April 10, 2015 THANK YOU! i did have to go for some pretty dramatic emissive settings, but it works perfectly now Tweaking the other settings seems a bit tricky, but I found a setting that sort of works for me and also managed to change the alpha in Oxygen, so now the objects are transparent too. thanks again! Share this post Link to post Share on other sites