bek 744 Posted May 31, 2015 Hi. I'm attempting to import some stuff into arma, currently an EOTech holosight. I've got my model (after much nonsense) into the ObjectBuilder. I've got Buldozer working (!). I've got a basic RVMAT for the model: ambient[]={1,1,1,1}; diffuse[]={1,1,1,1}; forcedDiffuse[]={0,0,0,0}; emmisive[]={0,0,0,1}; specular[]={0,0,0,1}; specularPower=3; PixelShaderID="NormalMapSpecularMap"; VertexShaderID="NormalMap"; class Stage1 { texture="D:\Documents\A3Working\XPS3-Source\XPS3_NOHQ.paa"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,1}; pos[]={0,0,0}; }; }; class Stage2 { texture="D:\Documents\A3Working\XPS3-Source\XPS3_SM.paa"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,1}; pos[]={0,0,0}; }; }; I've basically been looking at these pages. However I need more information — why is it so terribly difficult to find samples!? My biggest concern is how I can get the glass (and then the reticle) working. Where can I find some glass rvmats? I should be able to figure this out if I got get, say the ACO or RCO's rvmat. I've tried this and a cobbled together super shader RVmat to try and get transparency working but no luck yet. Ideally I want the entire frame to be transparent with a texture affecting the specular power (or specular if that's not possible). Then for the reticle I want the same, but the texture should affect transparency (acting as a mask) and emissive (or diffuse/colour output). So, how does BI do their red dots? I'm also not super clear on when to use _SM vs. _SMDI for the spec/gloss. Oh and more importantly; can I implement an environment reflection on the model driven by specular power? (So, shiny metals have the env. reflection while matte plastics have it to a much lesser extent). Any help or pointers on where to find detailed information would be great. Is there any reason I can't just get arma 3 RVmats, so I could figure this out? Share this post Link to post Share on other sites
x3kj 1247 Posted May 31, 2015 you can find quite a bunch of rvmats in data_f.pbo Also, you can use eliteness from mikero to check the rvmats of models (vanilla or modded) that you are interested in. For specular/glossyness it is also important to check out what color values are used in the texture (_SMDI) of said model, to achieve the same effect / look you want to reproduce Share this post Link to post Share on other sites
EricJ 724 Posted June 2, 2015 Hi. I'm attempting to import some stuff into arma, currently an EOTech holosight. I've got my model (after much nonsense) into the ObjectBuilder. I've got Buldozer working (!). I've got a basic RVMAT for the model: ambient[]={1,1,1,1}; diffuse[]={1,1,1,1}; forcedDiffuse[]={0,0,0,0}; emmisive[]={0,0,0,1}; specular[]={0,0,0,1}; specularPower=3; PixelShaderID="NormalMapSpecularMap"; VertexShaderID="NormalMap"; class Stage1 { texture="D:\Documents\A3Working\XPS3-Source\XPS3_NOHQ.paa"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,1}; pos[]={0,0,0}; }; }; class Stage2 { texture="D:\Documents\A3Working\XPS3-Source\XPS3_SM.paa"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,1}; pos[]={0,0,0}; }; }; I've basically been looking at these pages. However I need more information — why is it so terribly difficult to find samples!? My biggest concern is how I can get the glass (and then the reticle) working. Where can I find some glass rvmats? I should be able to figure this out if I got get, say the ACO or RCO's rvmat. I've tried this and a cobbled together super shader RVmat to try and get transparency working but no luck yet. Ideally I want the entire frame to be transparent with a texture affecting the specular power (or specular if that's not possible). Then for the reticle I want the same, but the texture should affect transparency (acting as a mask) and emissive (or diffuse/colour output). So, how does BI do their red dots? I'm also not super clear on when to use _SM vs. _SMDI for the spec/gloss. Oh and more importantly; can I implement an environment reflection on the model driven by specular power? (So, shiny metals have the env. reflection while matte plastics have it to a much lesser extent). Any help or pointers on where to find detailed information would be great. Is there any reason I can't just get arma 3 RVmats, so I could figure this out? You can ask people... or you can go to Armaholic.com and download the A2 Sample models, which have a Holosight in there (attached to the SCARs) and have un-binarized RVMAts to look at to get you in some direction. But most of it sometimes is trial and error. Share this post Link to post Share on other sites
bek 744 Posted June 2, 2015 Thanks Fennek and EricJ. I've finally made some progress with these tools (Using Eliteness to open arma 3 RVmats and figure out how stuff works). http://i.imgur.com/IfO9exI.png (466 kB) Obviously some transparency issues but I'm sure I'll figure it out. I think before I get too stuck into the materials I'd like to set this up in game, so I get an idea of the whole process. If anyone has any tutorials for that (setting up attachment points, packaging to a pbo, all that stuff) please throw them at me. Share this post Link to post Share on other sites
EricJ 724 Posted June 8, 2015 Thanks Fennek and EricJ. I've finally made some progress with these tools (Using Eliteness to open arma 3 RVmats and figure out how stuff works).http://i.imgur.com/IfO9exI.png (466 kB) Obviously some transparency issues but I'm sure I'll figure it out. I think before I get too stuck into the materials I'd like to set this up in game, so I get an idea of the whole process. If anyone has any tutorials for that (setting up attachment points, packaging to a pbo, all that stuff) please throw them at me. In your 3D model for the optic you have to have it on the crosshair, centered above the middle line (as that's where its aligned to the proxy). Also for your memory LOD make sure you have "OpticView" or "eye" (can be anything really as long as it's referenced in the config for the optic. Other than that it's pretty much it. Also with transparency issues you may need to restart the PC if you're packing it and seeing black or whatever colors in-game. Packaging the PBO is pretty easy, some use PBO Poject (which isn't updated that much) or use Addon Builder, which is updated and reliable most of the time). But there are plenty of tutorials online for setting up the bisign as well. Not hard to do really, optics for the most part are pretty easy. Share this post Link to post Share on other sites
bek 744 Posted June 10, 2015 In your 3D model for the optic you have to have it on the crosshair, centered above the middle line (as that's where its aligned to the proxy). Hi EricJ, By this do you mean where the center of my reticle appears (on the 3d model) should be at the origin (0,0,0) in x,y,z of the ObjectBuilder scene? Also, how can I import say, arma3's MXC into that same scene to check that the scale of my reticle is correct? Otherwise it would likely be ridiculously large, or clip into the railings etc. As far as I can tell you cannot load arma 3's p3d's into Objectbuilder, so.... Share this post Link to post Share on other sites
EricJ 724 Posted June 10, 2015 Go into the SAMPLES_F folder and import the Test_Weapon_01_F, that cheap MX geometry that they use. What I mean is if you zoom out of Object Builder you'll see a red cross, that's your 0 plane for everything. Here's one of my scopes to show what I mean: http://562.50megs.com/Arma3/scope.jpg Given that the viewport is off to the right you'll see that the scope is centered on the vertical red line and "flat" along the horizontal red line. The scope proxy is that vertical red line so wherever the Top proxy is set the scope will be centered on that. Share this post Link to post Share on other sites
bek 744 Posted June 24, 2015 Okay that's helped, and I was able to get the optic in-game by modifying a mod I was familiar with and letting it fit on one of their weapons. But I have some questions: 1) The test weapon geometry is clearly from a lower lod; It doesn't have the weapon's rails. So how am I meant to align my model with the in-game weapon rails? 2) How are you meant to allow an optic to attach to all of arma3's default weapons? Surely you don't have to redefine EVERY weapon in a3 with your optic in the compatibleItems[] line.... right? I would've thought it would have a blacklist (rather than whitelist, or perhaps have both) based on some grouping, like weaver rail group, dovetail group, or weaver-large, weaver-small and so on. 3) I was able to figure out the eye and ModelOptic viewpoints by looking at some simple examples, but I imagine getting a weapon in the game is much more difficult, getting trigger, bullet points, hand positions etc set up... how does that work? And how does a model config work? The stuff on the wiki was mostly to do with vehicles or characters. Large and vague question I know, but any pointers would be welcome. Share this post Link to post Share on other sites
da12thMonkey 1943 Posted June 24, 2015 Okay that's helped, and I was able to get the optic in-game by modifying a mod I was familiar with and letting it fit on one of their weapons. But I have some questions:1) The test weapon geometry is clearly from a lower lod; It doesn't have the weapon's rails. So how am I meant to align my model with the in-game weapon rails? 2) How are you meant to allow an optic to attach to all of arma3's default weapons? Surely you don't have to redefine EVERY weapon in a3 with your optic in the compatibleItems[] line.... right? I would've thought it would have a blacklist (rather than whitelist, or perhaps have both) based on some grouping, like weaver rail group, dovetail group, or weaver-large, weaver-small and so on. 3) I was able to figure out the eye and ModelOptic viewpoints by looking at some simple examples, but I imagine getting a weapon in the game is much more difficult, getting trigger, bullet points, hand positions etc set up... how does that work? And how does a model config work? The stuff on the wiki was mostly to do with vehicles or characters. Large and vague question I know, but any pointers would be welcome. 1) The optic proxy position and rail dimensions on BIS weapons are often inconsistent anyway, so you'll probably find it clips or floats a bit on one or two weapons. That said, if you align the upper surface of the picatinny rail cutout with the Y = 0 line in Object Builder then move the whole sight upwards by 0.007, it sits on the MX rail pretty damn well. The optic position on most weapons does seem to be correctly justified in the centre of the weapon's rail though, so if you align the middle of the rail cutout with the X/Y plane (i.e. the middle of the cutout is at Z=0) it should sit in the middle of the rail. 2) Easiest way to do it is to make your optic compatible with ASDG Joint Rails. Pretty much every community-made weapon and attachment addon uses this to ensure attachment compatibility with all of BIS' weapons and community-made ones. 3)Model.cfg is used to program animations on weapon, vehicle and building models. You set up a bunch of axes in your model's memory LOD using named pairs of vertexes and animate the named selections in your mesh by programming them to translate along, or rotate around those axes. The trigger for these animations is defined by the "source" controller - there's a list of animation sources on the BIS wiki I wrote some tuts on programming simple model.cfg animations: http://www.rkslstudios.info/public-forum/33/180 http://forums.bistudio.com/showthread.php?171511-Animate-Bipod-Model-cfg-Help&p=2599648&viewfull=1#post2599648 Animating hand positions, magazine-change animations etc. is a bit more complicated since it's a character animation. There are some basic handanim tutorials around on the forum for getting units to hold your weapon correctly though. http://forums.bistudio.com/showthread.php?139652-Tutorial-Creating-Custom-Weapon-Animations (read the thread all the way through since there's some discussion of other methods and problems) Share this post Link to post Share on other sites