Messiah 2 Posted September 10, 2007 Trying out normal maps for the first time, and the best place to start, i thought, would be on the tyres as thats a rather substantial bump on the tread. great - I create my normal map, all pretty raindbow colours, and for the sake of not confusing the engine, I made a blank (i.e. all one colour) specular map for now. now, I create my write my rvmat file by hand, as I can't be arsed with the materials tool because I'm too lazy to learn it (shame on me) - I figure that the BIS hummer tyres were nicely done, so I'll use the same rvmat file from them and of course edit the important bits. now, the normal map works... kind of - I can't seem to create a 'stable' normal map, in that it doesn't always seem to work when viewing it, and on top of that I also have this strange grey 'sheen' over the entire object that has the material selected. Where the rim should be green, it now almost looks more grey than anything else. my rvmat file is as follows: <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}; emmisive[]={0,0,0,1}; specular[]={1,1,1,1}; specularPower=40; PixelShaderID="NormalMapSpecularMap"; VertexShaderID="NormalMap"; class Stage1 { texture = "ukf_wolf\Data\external_nohq.paa"; uvSource = "tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,0}; pos[]={0,0,0}; }; }; class Stage2 { texture = "ukf_wolf\Data\external_co.paa"; uvSource = "tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,0}; pos[]={0,0,0}; }; }; class Stage3 { texture = "ukf_wolf\Data\external_smdi.paa"; uvSource = "tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,0}; pos[]={0,0,0}; }; }; I have of course played with the numbers, but besides making the wheel go interesting colours other than grey and green, or making things more shiny, I'm left with a semi working normal map [edit] just to help, here is a picture showing the problem. The front wheel and one face at the rear have had the material applied to them - you can see how washed out they appear, and you can also see some strange dark areas on the washed out wheel - in fact those are parts of the wheel that are the correct colour but they move around as if they were a shadow, even though I have no shadow model yet. http://www.pukf.net/Messiah/normalmapproblem.jpg odd as hell Share this post Link to post Share on other sites
da12thMonkey 1943 Posted September 11, 2007 I don't think the colour map needs to be written into the .rvmat file mate. Of all the rvmats I've read with UnRAP the only one that contains a reference to a colour map is one that creates the mirror effect. No real idea if it'll work, but try removing the class Stage2 bit. I've been having some trouble with some of the specular effects too though to be honest. I edited BIS M240 model (adding a few bits), and applied the same textures and effects maps to it, albeit re-pathed to their location in my own pbo, both in O2 and the rvmat file (which contained all the same values as the original one; just the paths to the nohq and sdmi maps were changed) yet ingame I got some very strange lighting effects where the gun was really dark when facing into the light. Worked fine if I just used the seemingly identical .rvmat in ca\weapons\data though. Share this post Link to post Share on other sites
Messiah 2 Posted September 11, 2007 nope, once I do that it stops 'working' altogether. It did confuse me too, as all the BIS ones don't have it as you said, but the tutorial by linker split on materials requires it, and its the only way i get it to work in any capacity Share this post Link to post Share on other sites
Johannes 10 Posted September 11, 2007 Are you sure that you assigned all the rvmat files to the correct textures? Anyway. I tried to "reproduce" your problem and it appeard when i added the colour map to the rvmat file. This rvmat might help instead. Quote[/b] ]ambient[]={1,1,1,1};diffuse[]={1,1,1,1}; forcedDiffuse[]={0,0,0,0}; emmisive[]={0,0,0,1}; specular[]={1,1,1,0}; specularPower=75; PixelShaderID="NormalMapSpecularDIMap"; VertexShaderID="NormalMap"; class Stage1 {   texture="ukf_wolf\Data\external_nohq.paa";   uvSource="tex";   class uvTransform   {     aside[]={1,0,0};     up[]={0,1,0};     dir[]={0,0,0};     pos[]={0,0,0};   }; }; class Stage2 {   texture="ukf_wolf\Data\external_smdi.paa";   uvSource="tex";   class uvTransform   {     aside[]={1,0,0};     up[]={0,1,0};     dir[]={0,0,0};     pos[]={0,0,0};   }; }; Share this post Link to post Share on other sites
da12thMonkey 1943 Posted September 11, 2007 nope, once I do that it stops 'working' altogether. What stops working? The relief of the bump map? Mate, I think it might just be that you're using a flat textured smdi. Just make a quick one by taking the grey-scale heightmap you used to create the nohq file and run it through TexView2 using "edit\filter" with these settings <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> 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]; and see if it looks any better. Does deleting that 'Stage 2' stuff in the .rvmat get rid of the shite washed out colours though? Share this post Link to post Share on other sites
Messiah 2 Posted September 11, 2007 the relief dissapears, as does the weird grey shit. will try those suggestions out now lads, thanks Share this post Link to post Share on other sites
Messiah 2 Posted September 11, 2007 ok, that works, but I appear to be getting some strange specular results on parts of the wheel that shouldn't have them? Share this post Link to post Share on other sites
da12thMonkey 1943 Posted September 11, 2007 How big is the relief of the tread on the actual tyre normal map? The only thing I can think of doing now is playing about with that. Feel free to send some of the stuff my way or put it up on the team's board if you'd like someone else to have a stab at it for a bit. Share this post Link to post Share on other sites
Messiah 2 Posted September 11, 2007 all sorted now - was a combo of being too cautious with the normal map 'height', the shit rvmat I wrote (thanks lads) and also my spec map being too light and thus making things too shiny. so nice when things work Share this post Link to post Share on other sites