FriZY_SK 9 Posted January 3, 2008 Hi, with Faust, we have created radio from ww2. but we have problem with specular map. We know how to create normal and specular map, but it doesnt work correctly. Look at pic... ...dont understand why but with specular and bump map it looks worse. Can somebody help us pls? Here is material config: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgTextureToMaterial { class BOX_material { textures[] = {"FF_Radio\tex\body_co.paa"}; material = "#BOX_material"; }; }; class CfgMaterials { class BOX_material { ambient[] = {1.0, 1.0, 1.0, 1.0}; diffuse[] = {1.0, 1.0, 1.0, 0.0}; forcedDiffuse[] = {1.0, 1.0, 1.0, 0.0}; emmisive[] = {0.0, 0.0, 0.0, 0.0}; specular[] = {0.1, 0.1, 0.1, 0.1}; specularPower = 8.0; PixelShaderID = "NormalMapDetailSpecularMap"; VertexShaderID = "NormalMap"; class Stage1 { texture = "FF_Radio\tex\body_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 = "FF_Radio\tex\body_co.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 = "FF_Radio\tex\body_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}; }; }; }; Is this specular map correct?? btw: I hope u like the radio THX for answers Share this post Link to post Share on other sites
Synide 0 Posted January 3, 2008 The combination of what PixelShader & Vertex you use for your material defines how many stages you need and what those stages should be... With your material you have 3 stages defined and the combination requires 2. Delete 'stage 2' in your material and then rename 'stage 3' as 'stage 2'. Also, you should probably consider using the rvmat material method as opposed to using the 'CfgTextureToMaterial' method. Share this post Link to post Share on other sites
FriZY_SK 9 Posted January 3, 2008 we delete stage3 and use rvmat and it works correctly , thx for help Share this post Link to post Share on other sites
Linker Split 0 Posted January 5, 2008 also, when you want to create a _smdi texture, first run the filter on the texture: Quote[/b] ]sp = 10; p = src pixel [u,v]; x = 1 - green p; y = green p * ((sp * blue p + 1) / (sp + 1)); c = color[x,y,blue p,1]; then save it as _smdi since I've never seen a so pink specular map Share this post Link to post Share on other sites
FriZY_SK 9 Posted January 5, 2008 also, when you want to create a _smdi texture, first run the filter on the texture:Quote[/b] ]sp = 10; p = src pixel [u,v]; x = 1 - green p; y = green p * ((sp * blue p + 1) / (sp + 1)); c = color[x,y,blue p,1]; then save it as _smdi since I've never seen a so pink specular map yea we used that filter u wrote and that pink picture is result , but it works fine Share this post Link to post Share on other sites