Jump to content
Sign in to follow this  
bravo 6

rvmat Brick house

Recommended Posts

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

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

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

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:

brick00_s.jpg

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

i must clarify to You pink and blue issue biggrin_o.gif

i hope it helps others

i will tell WHAT FOR and WHY

example.jpg

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

Share this post


Link to post
Share on other sites

wow.. nice explanation smile_o.gif

edit3: Thank you very much.

edit4: Thanks DaSquade for the link.

Share this post


Link to post
Share on other sites

*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

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 smile_o.gif never the less CrazyBump allows for fantastic tweaking with instant feedback.

Using my tutorial also works smile_o.gif 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

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

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

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×