Jump to content
Sign in to follow this  
FriZY_SK

Specular map prob

Recommended Posts

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...

radio_help.jpg

...dont understand why but with specular and bump map it looks worse. crazy_o.gif

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??

SMDI.jpg

btw: I hope u like the radio smile_o.gif

THX for answers

Share this post


Link to post
Share on other sites

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

we delete stage3 and use rvmat and it works correctly , thx for help smile_o.gif

Share this post


Link to post
Share on other sites

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 smile_o.gif

Share this post


Link to post
Share on other sites
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 smile_o.gif

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×