bravo 6 0 Posted February 11, 2009 Does anyone have other good rvmat code to simulate wall bricks for houses then this one? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> 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, 0.0}; emmisive[] = {0.0, 0.0, 0.0, 1.0}; specular[] = {1.0, 1.0, 1.0, 1.0}; specularPower = 50.0; PixelShaderID = "NormalMapSpecularMap"; VertexShaderID = "NormalMap"; class Stage1 { Â Â texture = "Iraqborder\buildings\data\hut_02_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 = "Iraqborder\buildings\data\hut_02.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}; Â Â Â Â }; }; Share this post Link to post Share on other sites
bravo 6 0 Posted February 11, 2009 im trying to understand how this works and why this happens. i want to bring the brick details to its surface but if certain angle and time of day i have this results: Pic 01 as if the white appears and the real color if the house disappears. Can someone enlighten me abit about it? Share this post Link to post Share on other sites
Nicholas Bell 0 Posted February 11, 2009 Your class stage 2 appears to be the problem. Â I think it needs to refer to a specular map or a specific color - at least that is how most of the BIS model rvmats read. Â Check out an rvmat of an existing wall. Share this post Link to post Share on other sites
bravo 6 0 Posted February 11, 2009 heres an example of an wall with bricks: Model: dum01_ruins.p3d File: ruiny_steny.rvmat <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> 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, 0.0}; emmisive[] = {0.0, 0.0, 0.0, 1.0}; specular[] = {1.0, 1.0, 1.0, 1.0}; specularPower = 50.0; PixelShaderID = "NormalMapSpecularMap"; VertexShaderID = "NormalMap"; class Stage1 { Â Â Â Â texture = "ca\buildings\misc\data\ruiny_steny_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\buildings\misc\data\ruiny_steny_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}; Â Â Â Â }; }; I noticed in the Stage2 texture BIS use a "smdi" type of file that have pink colors instead the "nohq" that are blue. Does this have to do with my results? If so, why does the blue type works the same was as the pink? Edit1: Is there an official and correct method to transform the blue texture/image file into the pink one? Edit2: the question in Edit1 was about this: bigger How do i transform the blue one into the pink one? Any specific method? Share this post Link to post Share on other sites
vilas 477 Posted February 11, 2009 i must clarify to You pink and blue issue i hope it helps others i will tell WHAT FOR and WHY this example show you philosophy of pink and blue how it works: NOHQ simulates bumping, it makes all those screws and rivets look NOHQ - makes something look stretched like fabric on trousers etc. something light-green means "deep", somethin darkblue-pink means "something is on top" please look at my exampl SMDI - this decides how things shine, are they glossy or they are matte how do i make SMDI and NOHQ??? i paint SPECIAL 2 TEXTURES, i am copying base texture i make them gryscale tone, i make it very small saturation like now you see for NOHQ i paint lines of depth and important elements than created map will give result like you see SMDI - i make all that should be matte/less gloss - darker i make all that should be shining - bright dominating RGB number as i remember should be 255,12/13,255 when you make car : dark parts : rubber, shaded elements, holes very bright : glass, chrome but please remember also that for some RVMATs SMDI is not needed, sometimes you can use NOHQ only, than it will be total matte < this way i made soldiers materials, as fabric/clothes/cotton do not shine please look at MAN 630 wip example: multilayer texture with SMDI and NOHQ layers http://www.armaholic.eu/vilas/man_all.jpg only colour layers: http://www.armaholic.eu/vilas/man_co.jpg example how SMDI layers work after changing http://www.armaholic.eu/vilas/man_smdi.jpg example how NOHQ layers job look: http://www.armaholic.eu/vilas/man_nohq.jpg example of car. w.i.p. (no mud and etc) looks like this: http://www.armaholic.eu/vilas/85temp/lkw1.jpg http://www.armaholic.eu/vilas/85temp/lkw2.jpg http://www.armaholic.eu/vilas/85temp/lkw3.jpg i hope now SMDI and NOHQ "pink and blue" is clear to you Share this post Link to post Share on other sites
bravo 6 0 Posted February 11, 2009 wow.. nice explanation edit3: Thank you very much. edit4: Thanks DaSquade for the link. Share this post Link to post Share on other sites
DaSquade 0 Posted February 11, 2009 *kicks the BIS forum seach (no luck). Anyway, someone (forgot) was that kind to make a texture tutorial a few months ago where he explained the SMDI making. In short it involves deleting the red channel (it should look white). Inverting the Blue channel or often it is even better to delete the blue channel aswell. But also it is a mather of playing around with the brightness and contrast. Also all depends on your original made smdi texture. As you probebly know, you can't make an _nohq and _smdi texture out a _co texture. They bought need to be remade in greyscales form representing what you want to achive. With organic textures it is often a game of playing with the levels, contast, brightness etc etc... Imho SMDI's are the hardess part of them all...at least to get them good and realistic. Especially if you need several in the same 'pack'. EDIT: found the tutorial Share this post Link to post Share on other sites
soul_assassin 1750 Posted February 11, 2009 You can use the demo of CrazyBump to make fantastic spec maps from your textures (normal maps too) and if you posses surpluss cash I'd tell you to buy it never the less CrazyBump allows for fantastic tweaking with instant feedback. Using my tutorial also works SEE ^^ If you do use photoshop as in my tutorial I would advise to record the actions for the levels and desaturation process so that if you do need to make several in one pack then they do look similar, to answer DaSquade's remark. Share this post Link to post Share on other sites
DaSquade 0 Posted February 12, 2009 Hm not sure what level and desaturation has to do with the smdi's? I mean, like i wanted to point out...in order to make a good and realistic smdi you have to make a custom greyscalled representation of your colour texture, where as villa explained whites and blacks represents specular values. I mean, if you have different base colours (camo's etc) afaik there is no way to come to a decent greyscalled smdi template. But i must admite i'm no 'colour value export'. Also i actually have never experimented with crazzybump and its spec maps :s. (opens crazzybump). Share this post Link to post Share on other sites
soul_assassin 1750 Posted February 12, 2009 of course the specularity is a property of the material and not the color (ofcourse the colour 'could' play a role as PAINT in itself is also a material but for the sake of argument the green dyed fabric is the same a blue dyed fabric). one method of equalizing the camo to a uniform texture is flipping through the channels where the camo pattern stands out most, using it for selection and then tweaking the hue/saturation of that selection to fit the rest. A pretty close match can be made if the pattern isnt too bad. Then this equalised texture can be used to extract a specmap. Share this post Link to post Share on other sites
BadBenson 0 Posted February 12, 2009 very nice summary by vilas. thx. just one thing seems to be not right (not sure about that though). Quote[/b] ]something light-green means "deep", somethin darkblue-pink means "something is on top" i think the different colours represent the possible angles the light can come from. that's why they're put in different channels. so one normalmap can provide several versions of lightning. u can easily see that by just looking at one channel at a time. looks just like a rendered normalmap with light comin from one angle. the way vilas explained it is more how a heightmap works. just trying to clear things up. but PLEASE correct me if i'm wrong. Share this post Link to post Share on other sites
soul_assassin 1750 Posted February 12, 2009 very nice summary by vilas. thx. just one thing seems to be not right (not sure about that though).Quote[/b] ]something light-green means "deep", somethin darkblue-pink means "something is on top" i think the different colours represent the possible angles the light can come from. that's why they're put in different channels. so one normalmap can provide several versions of lightning. u can easily see that by just looking at one channel at a time. looks just like a rendered normalmap with light comin from one angle. the way vilas explained it is more how a heightmap works. just trying to clear things up. but PLEASE correct me if i'm wrong. Ur absolutely right, the channels in the normalmap store the components of the vector normal to the face [x,y,z] respectively. If you know the normal vector u can calculate which direction the light reflects when it hits that face. Share this post Link to post Share on other sites
scubaman3D 0 Posted February 25, 2009 bravo, as an additional, late suggestion, you can play with the diffuse, ambient, and spec values in your rvmat so that they don't reflect white and the reflection isn't so bright. I've been known to use values that produce a brown reflection, which will dull out the bright spots on a building like that and give it more of a mud brown look. I can show you what I mean via skype if you want. Share this post Link to post Share on other sites
max power 21 Posted February 25, 2009 The smdi doesn't take into account the red channel, I believe, so turning that off will make it easier for you to see what's going on. Â What you are left with is a green channel which is the specular colour, and the blue channel, which is the specular power. Â The biki hints that red might be specular intensity but I really don't see it. Â It doesn't really appear to do anything at all. Â There is also an alpha channel which I don't know what it does, possibly it's specular intensity. For this purpose it will probably benefit you greatly to generate a cavity map for your wall normals in black and white, black being occluded, and apply it to the green channel of your smdi map. Â In BIS fashion, you would then invert it and apply it to the blue and alpha channels, but in my experience that can lead to some funky results. Share this post Link to post Share on other sites