.granQ. 0 Posted June 10, 2004 wanted to have the CfgTextureToMaterial thing to our models, i am 99% sure i made "right".. of course could be wrong path i linked to and such, but i still don't see any diffrence, so now i wonder is this just for mods, or could you define just for one addon? Share this post Link to post Share on other sites
suma 8 Posted June 10, 2004 It should work with addons as well. Post your CfgTextureToMaterial config here, and someone may be able to see what you are doing wrong. Share this post Link to post Share on other sites
MidShip 0 Posted June 10, 2004 Will it work with terrain textures too ? Share this post Link to post Share on other sites
BraTTy 0 Posted June 10, 2004 I've played with cfgtexturematerials too and I couldn't see any changes.I'd like to see a working example Share this post Link to post Share on other sites
suma 8 Posted June 10, 2004 Quote[/b] ]Will it work with terrain textures too No, it will not. Only .p3d models use this. Note: When applied to binarized models, CfgTextureToMaterial should already be present when binarizing. Share this post Link to post Share on other sites
suma 8 Posted June 10, 2004 Quote[/b] ]I'd like to see a working example There is a working example in the main config - AH1 cobra is done using this. I am not sure I understand what part are you missing. Share this post Link to post Share on other sites
hardrock 1 Posted June 10, 2004 Is there any description of what the values in CfgMaterials cause? I messed around with it a bit, but can't really find it out. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ambient[] = {1,1,1,1}; diffuse[] = {1,1,1,1}; forcedDiffuse[] = {0,0,0,0}; specular[] = {0.8,0.8,0.8,0}; specularPower = 20; emmisive[] = {0,0,0,0}; What do they stand for? Share this post Link to post Share on other sites
.granQ. 0 Posted June 10, 2004 hmm, do you mean i have to binarize it together with the code? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgTextureToMaterial { class SFPMetal { textures[]= { "\sfp_ikv91\ikv91.paa", "\sfp_ikv91\ikv91turret.paa", "\sfp_ikv91\barrel.paa", "\sfp_ikv91\details.pac" }; material=#SFPMetal; }; }; class CfgMaterials { class SFPMetal { ambient[] = {1,1,1,1}; diffuse[] = {1,1,1,1}; forcedDiffuse[] = {0,0,0,0}; specular[] = {0.2,0.2,0.2,0}; //specular[] = {1,1,1,1}; specularPower = 5; emmisive[] = {0,0,0,0}; }; }; very small code, since i am just testing.. Share this post Link to post Share on other sites
BraTTy 0 Posted June 10, 2004 Quote[/b] ]I'd like to see a working example There is a working example in the main config - AH1 cobra is done using this. I am not sure I understand what part are you missing. OK my bad, I think that was the example I used,I will get back at it sometime. Thanx Share this post Link to post Share on other sites
BraTTy 0 Posted June 10, 2004 hmm, do you mean i have to binarize it together with the code? I think he means you can't binarize your model,then later on add the changes to the .cpp Can't add it to a already binarized model Share this post Link to post Share on other sites
colonel_klink 0 Posted June 11, 2004 I had tried this ages ago, but didn't realise it had to be binarized: Note some parts have not had the effect applied to show the difference. Share this post Link to post Share on other sites
.granQ. 0 Posted June 11, 2004 now i tested have the code on binned models, on models that isn't binned, and to have the code, and bin the model with it.. nothing works.. maybe "metal" is the default stuff so thats why i see no diffrence. but can someone explain just what is right and what is not. Share this post Link to post Share on other sites
colonel_klink 0 Posted June 11, 2004 .granQ. This is the code i used to get the effect in the pics (updated one below) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgTextureToMaterial { class Flkmat_Seaharrier_Chrome { textures[]= { "FLKseaharrier\tex\sideR.pac", "FLKseaharrier\tex\sideL.pac", "FLKseaharrier\tex\PtWing.pac","FLKseaharrier\tex\PtWingL.pac", "FLKseaharrier\tex\stWing.pac","FLKseaharrier\tex\stWingL.pac", "FLKseaharrier\tex\tailL.pac","FLKseaharrier\tex\tailR.pac", "FLKseaharrier\c\tailwng.pac","FLKseaharrier\c\wheel.pac", "FLKseaharrier\c\ord.pac","FLKSeaHarrier\c\parts.pac" }; material="#FLKSH_Chromed"; }; class Flkmat_Missile_Chrome { textures[]= { "FLKseaharrier\S\aim9fin.pac","FLKseaharrier\S\aim-9L.pac", "FLKseaharrier\S\aim-9Lfin.pac" }; material="#FLKSH_Chromed"; }; }; class CfgMaterials { class FLKSH_Chromed { ambient[]={.8,.8,.9,1}; diffuse[]={1,1,1,1}; forcedDiffuse[]={0,0,0,0}; specular[]={0.720000,0.700000,0.80000,0}; specularPower=20; emmisive[]={0,0,0,0}; }; }; Share this post Link to post Share on other sites
.granQ. 0 Posted June 11, 2004 ohh, now i think i see the error.. you have: myaddon\mytexture.paa and i have \myaddon\mytexture.paa thank you, got some new energy now, gonna try ;) Share this post Link to post Share on other sites
colonel_klink 0 Posted June 11, 2004 Sometimes its the little things that create the biggest problems. Post your result here for us to see. Share this post Link to post Share on other sites
.granQ. 0 Posted June 11, 2004 Thank you very much.. Work in progress: J 29 with TextureToMaterial There is still things left to be done, sharping parts, and adding more textures to the list (mostly the wings as you can see) and once again, thank you for your help Share this post Link to post Share on other sites
colonel_klink 0 Posted June 11, 2004 Looking good. I just tried the effect on the black lincoln, and the result is pretty good, except getting the sharp and rounded vertices correct is a royal pain in the ass. (and that aint no donkey ) Share this post Link to post Share on other sites
Guest Posted June 11, 2004 If you want to see a good working example of all this, then download Agent Smith's AGS_INDS.pbo Some very nice work there. Share this post Link to post Share on other sites
FW200 0 Posted June 11, 2004 Thanks Col. Klink & Suma for your help and examples. With Col. Klinks settings I was able to make this kind of stuff: Note the yellow "stain" on the wing, reflection from the muzzle flashes, just too bad it's just on one side. Share this post Link to post Share on other sites
philcommando 0 Posted July 7, 2004 waitta minute!!!!!!!!!!!!!!! " ambient[]={.8,.8,.9,1}; diffuse[]={1,1,1,1}; forcedDiffuse[]={0,0,0,0}; specular[]={0.720000,0.700000,0.80000,0}; specularPower=20; emmisive[]={0,0,0,0};" .......we can make mirror ( reflection) effects here???!!!!! Share this post Link to post Share on other sites
<>Crippler<> 0 Posted July 13, 2004 As far as I know, the effect wont go as far as to create a true mirror-like reflection unfortunately. For example here I've turned the specular levels really high (a bit too high infact) -as far as I can tell, a really high shine level will get sharper, but it tends to expose all the separate polygons on the model Share this post Link to post Share on other sites
-Parabellum- 0 Posted July 28, 2004 I'm trying to get this to work, but I'm having zero success. Here's what my cfg sections look like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgTextureToMaterial { class PRA_Weapons { textures[]= { "pra_sof\t\m4.pac","pra_sof\t\m68.pac","pra_sof\t\m68_mt.pac","pra_sof\t\m68mt.pac", "pra_sof\t\mag.pac","pra_sof\t\peq.pac","pra_sof\t\reflex.pac","pra_sof\t\ris2.pac", "pra_sof\t\ris_1.pac","pra_sof\t\grip.pac" }; material="#PRA_RifleMetal"; }; }; class CfgMaterials { class PRA_RifleMetal { ambient[]={1,1,1,1}; diffuse[]={1,1,1,1}; forcedDiffuse[]={0,0,0,0}; specular[]={0.7200000,0.7200000,0.7200000,0}; specularPower=10 emmisive[]={0,0,0,0}; }; }; I can't see that I'm doing anything wrong there. If that's the case, could it be an issue with Oxygen? A particular setting that the models needs to have? I have binarized the addon, but still no luck. Share this post Link to post Share on other sites
Footmunch 0 Posted July 28, 2004 Para - It looks okay. Have you copied the ODOL p3d back into the PBO? Do you have hardware T&L enabled in OFP: Preferences? Have you tried setting the PRA_Weapons Material to one of the built in materials (Metal, SpecularGlass, etc)? Is this _outside_ any other Cfg scope? Share this post Link to post Share on other sites
-Parabellum- 0 Posted July 29, 2004 Yes, I've put the ODOL in the PBO. Yes, Hardware T&L is on - BIA weapons, and even my own character models have proper lighting. Just not my weapons. I'm not sure what you mean by being outside any other CFG scope. My texuretomaterials section is the 1st section after the common defines. Share this post Link to post Share on other sites