BilOlson 0 Posted June 2, 2008 Ok, after getting hang of O2 and getting new units ingame and such, I have started the optimization stage. I have successfully used paNTool and merged textures into 2 larger textures with appropriate _as, _smdi, _nohq files, etc (ex. asp_soldier_co and asp_soldier_equip_co). soldier_co was made using three orig textures (uniform,Prohelmet, and face/hands) and soldier_equip_co was made using two orig textures (two diffrent sets of soldier equip textures) UVs set on these two textures as well and working in buldozer. Successfully UnRap'd rvmats, adjusted paths, but they are not working properly... Can anyone shed some light on this procedure for me? I did read Linker's Material tutorial, but it didn't help me, or at least I couldn't figure it out. Thanks in Advance Share this post Link to post Share on other sites
maddogx 13 Posted June 2, 2008 Can you provide the following: - The basic file and folder structure of your addon. - Some sample texture "links" from the O2 model, such as "\myAddon\texture_co.paa"+"\myAddon\material.rvmat" etc. - One of your rvmat files that doesn't work. The problem will most likely be an error in one of those. Share this post Link to post Share on other sites
BilOlson 0 Posted June 2, 2008 - The basic file and folder structure of your addon. P:\asp_sealsv1\data - Some sample texture "links" from the O2 model, such as "\myAddon\texture_co.paa"+"\myAddon\material.rvmat" etc. asp_sealsv1\data\asp_seal_co.tga asp_sealsv1\data\asp_seal_co.rvmat asp_sealsv1\data\asp_seal_equip11_co.tga asp_sealsv1\data\asp_seal_equip11_co.rvmat - One of your rvmat files that doesn't work. Neither of them work. Pretty sure its my rvmat, maybe the UVTransform??. I know what its used for, but past that I'm lost.. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// asp_seal_equip1_co.rvmat - 07:53:05 06/02/08, generated in 0.03 seconds // Generated by unRap v1.06 by Kegetys // Separate rootclasses: Disabled, Automatic comments: Enabled ambient[] = {1.0, 1.0, 1.0, 1.0}; diffuse[] = {1.0, 1.0, 1.0, 1.0}; forcedDiffuse[] = {0.0, 0.0, 0.0, 1.0}; emmisive[] = {0.0, 0.0, 0.0, 1.0}; specular[] = {1.0, 1.0, 1.0, 1.0}; specularPower = 21.9; PixelShaderID = "NormalMapDetailSpecularDIMap"; VertexShaderID = "NormalMap"; class Stage1 { texture = "asp_sealsv1\data\asp_seal_nohq.paa"; uvSource = "tex"; class uvTransform { aside[] = {1.0, 0.0, 0.0}; up[] = {0.0, 1.0, 0.0}; dir[] = {0.0, 0.0, 0.0}; pos[] = {0.0, 0.0, 0.0}; }; }; class Stage2 { texture = "ca\characters\data\prohelmet_dt.paa"; uvSource = "tex"; class uvTransform { aside[] = {1.0, 0.0, 0.0}; up[] = {0.0, 1.0, 0.0}; dir[] = {0.0, 0.0, 0.0}; pos[] = {0.0, 0.0, 0.0}; }; }; class Stage3 { texture = "asp_sealsv1\data\asp_seal_smdi.paa"; uvSource = "tex"; class uvTransform { aside[] = {1.0, 0.0, 0.0}; up[] = {0.0, 1.0, 0.0}; dir[] = {0.0, 0.0, 0.0}; pos[] = {0.0, 0.0, 0.0}; }; }; Thank you ahead of time, for any light you can shed on the subject.. Share this post Link to post Share on other sites
scars09 9 Posted June 2, 2008 try forced diffuse 0,0,0,0 uvtransform is like it should be if base texture and materialtexture have same ratio, except forced diffuse all is like it should be as far i can say, but since i have my knowledge from unsecured sources (aka try and error) i cant say for sure if the forced diffuse is the reason or not. Share this post Link to post Share on other sites
BilOlson 0 Posted June 2, 2008 @Scars - tried it, it did make it better but something is still definitely wrong. Maybe some screens will help, if you can see what it is doing.. Pic 1 (just showing rest of body is OK) Pic2 (the problem) Share this post Link to post Share on other sites
Linker Split 0 Posted June 2, 2008 ehm... m8, what is the problem? can you explain it to me please? Share this post Link to post Share on other sites
scars09 9 Posted June 3, 2008 im also not sure what exactly is the problem, there are several things that looks strange. are there holes in the mesh or is this your problem? maybe do a scrennshot with and without material apllied of the same modelpart, that should make it clear. Share this post Link to post Share on other sites
BilOlson 0 Posted June 3, 2008 Ill take a couple more pics and get em posted... @Linker - Not really sure whats wrong cant get my head around this rvmat thing... @Scars - theres no holes in mesh, if I run buldozer with "Hide Materials" on, everything looks great, as soon as I unhide materials, it goes crazy on me, and I get the helmet discoloring like in 2nd photo above.. Share this post Link to post Share on other sites
scars09 9 Posted June 3, 2008 u tried to put the faces on top again after changing the forced diffuse, white fragments can appear at the edge to the transparent part of the texture, the "holes" could be produced by this. it seems more and more like a alpha channel related problem. wich of your textures do have an alphachannel? smdi texture should be the only one with a alpha channel in the nohq+smdi+dt setup try the following material and see if there are similar issues or not <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ambient[]={1.000000,1.000000,1.000000,1.000000}; diffuse[]={1.000000,1.000000,1.000000,1.000000}; forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000}; emmisive[]={0.000000,0.000000,0.000000,1.000000}; specular[]={0.000000,0.000000,0.000000,1.000000}; specularPower=0.000000; PixelShaderID="NormalMapDetailSpecularDIMap"; VertexShaderID="NormalMap"; class Stage1 { texture="#(argb,8,8,3)color(0.5,0.5,1,1,NOHQ)"; uvSource="tex"; class uvTransform { aside[]={1.000000,0.000000,0.000000}; up[]={0.000000,1.000000,0.000000}; dir[]={0.000000,0.000000,0.000000}; pos[]={0.000000,0.000000,0.000000}; }; }; class Stage2 { texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; uvSource="tex"; class uvTransform { aside[]={1.000000,0.000000,0.000000}; up[]={0.000000,1.000000,0.000000}; dir[]={0.000000,0.000000,0.000000}; pos[]={0.000000,0.000000,0.000000}; }; }; class Stage3 { texture="#(argb,8,8,3)color(0.5,0,1,1,DTSMDI)"; uvSource="tex"; class uvTransform { aside[]={1.000000,0.000000,0.000000}; up[]={0.000000,1.000000,0.000000}; dir[]={0.000000,0.000000,0.000000}; pos[]={0.000000,0.000000,0.000000}; }; }; Share this post Link to post Share on other sites
BilOlson 0 Posted June 3, 2008 well that seemed to"fix" it... Helmet bug is gone.. Can you explain a little more so I can understand what was happening.... Share this post Link to post Share on other sites
scars09 9 Posted June 3, 2008 the material posted is made without model related textures. its using single color default "textures". I want you to test it to see if the rvmat or the textures used in the rvmat are the problem. it seems that there is some issue with alpha channel with one of your used texture. i guess the smdi or the detail, since alphachannel problems of the _co should be visible without the material apllied aswell. to make it clear, the material i posted will have visual effects but since no information of the original texture are included these usually dont look very good. your goal should be to replace the buggy texture with a correct functioning one. if you want, upload the textures somewhere and send me a link and i take a look. btw way you know what a alpha channel is and how to get rid of it? as written before, the material with the nohq-smdi-dt properties should have only alpha channel in smdi texture. if you have alpha in nohq or detail, it should be save to delete, make a backup anyway. just in case. Share this post Link to post Share on other sites
BilOlson 0 Posted June 4, 2008 Turns out you were correct Scars, I had made a major boo-boo, put wrong extension on one of my nohq's, it was actually a smdi , D'oh no weird happenings now! Thank you Share this post Link to post Share on other sites
scars09 9 Posted June 4, 2008 good to hear m8 you got my pm, if you want to know something else, let me know. Share this post Link to post Share on other sites
namreg 0 Posted June 14, 2008 Hi guys!! I'm making a new helicopter that uses some of BIS original textures and new textures that I've made. As I want to use the same original BIS materials with my new textures I encountered a problem and that was that I cannot recreate the same material myself.... I read that you unraped BIS original materials.... how can I do that??? Share this post Link to post Share on other sites
BilOlson 0 Posted June 15, 2008 Yep you read correct you need to use UnRap thats in Keygets Tools which can be found here Keygets Tools **Edit - forgot to mention after they are Unrap'd, it outputs to a .cpp file which is openable in a text editor. After that all you have to do to work with them is change file extension from cpp to rvmat and your good to go, if you need to alter rvmat again just change file extension back to cpp or txt. Share this post Link to post Share on other sites