Jump to content
Sign in to follow this  
mikebart

Mikebart's Grass Pack [BETA]

Recommended Posts

Ok heres some tests,I think you'll be quite suprised with the results,tested on Intel Quad Core 6600,3 GIG RAM,Nvidia 9600GT 512.The rule of thumb here is smaller the grass clutter bigger the frame rate.There really isn't much difference in FPS between the two resolutions.However there is a big difference depending on how big your clutter is.The first set of pictures with the nice looking alpha was tested also with default clutter rvmats and again not alot of difference in frame rates.Arma default clutter size min 0.6 - max 1.1 is more friendly no matter which rvmat used.

The clutter size below is min 0.75,max 1.6 with a whopping 0.99 probability.

1024 Resolution Textures Normal and Very High Terrain Settings,Alpha Blending RVMAT

1024tnts.jpg 1024tvhts.jpg  

2048 Resolution Textures Normal and Very High Terrain Settings,Alpha Blending RVMAT

2048tnts.jpg 2048tvhts.jpg

Share this post


Link to post
Share on other sites

1024 Resolution Textures Normal and Very High Terrain Settings,Default Sahrani Settings and RVMAT

1024tntds.jpg 1024tvhtds.jpg

2048 Resolution Textures Normal and Very High Terrain Settings,Default Sahrani Settings and RVMAT

2048tntds.jpg 2048tvhtds.jpg

Share this post


Link to post
Share on other sites

mb_clutterGrass.rvmat

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#define _ARMA_

//Class MB_clutterGrass_general.rvmat{

ambient[] = {1.5,1.5,1.5,1};

diffuse[] = {0.4,0.4,0.4,1};

forcedDiffuse[] = {0,0,0,1};

emmisive[] = {0,0,0,1};

specular[] = {0,0,0,1};

specularPower = 1;

PixelShaderID = "Grass";

VertexShaderID = "BasicAlpha";

mainLight = "Sun";

renderFlags[] = {"AlphaInstancing","AlphaTest96"};

fogMode = "Fog";

//};

mbgrass1.rvmat

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ambient[] = {0.9,0.9,0.9,1};

diffuse[] = {0.9,0.9,0.9,1};

forcedDiffuse[] = {0.02,0.02,0.02,1};

specular[] = {0.0,0.0,0.0,0};

specularPower = 1; // specular interpolator must be enabled

emmisive[] = {0,0,0,0};

PixelShaderID = "NormalMapDiffuse";

VertexShaderID = "NormalMapDiffuseAlpha";

//surfaceInfo = "landtext\bumps.bisurf";

class Stage1

{ // normal map

 texture="ca\mb_grass\Data\mb_grass1_2048_NOHQ";

 uvSource="tex";

 class uvTransform

 {

   aside[] = {10,0,0};

   up[]    = {0,10,0};

   dir[]   = {0,0,10};

   pos[]   = {0,0,0};

  };

};

class Stage2

{

 texture="ca\mb_grass\Data\mb_grass1_2048_CO";

 uvSource="tex";

 class uvTransform

 {

   aside[] = {10,0,0};

   up[]    = {0,10,0};

   dir[]   = {0,0,10};

   pos[]   = {0,0,0};

  };

};

mb_grass2.rvmat

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ambient[] = {0.9,0.9,0.9,1};

diffuse[] = {0.9,0.9,0.9,1};

forcedDiffuse[] = {0.02,0.02,0.02,1};

specular[] = {0.0,0.0,0.0,0};

specularPower = 1; // specular interpolator must be enabled

emmisive[] = {0,0,0,0};

PixelShaderID = "NormalMapDiffuse";

VertexShaderID = "NormalMapDiffuseAlpha";

//surfaceInfo = "landtext\bumps.bisurf";

class Stage1

{ // normal map

 texture="ca\mb_grass\Data\mb_grass2_2048_NOHQ";

 uvSource="tex";

 class uvTransform

 {

   aside[] = {10,0,0};

   up[]    = {0,10,0};

   dir[]   = {0,0,10};

   pos[]   = {0,0,0};

  };

};

class Stage2

{

 texture="ca\mb_grass\Data\mb_grass2_2048_CO";

 uvSource="tex";

 class uvTransform

 {

   aside[] = {10,0,0};

   up[]    = {0,10,0};

   dir[]   = {0,0,10};

   pos[]   = {0,0,0};

  };

};

Im very interested only in the clutterGrass.rvmat codes..

I have some questions and doubts about all this, maybe you can help me with them:

Q: Why do you have the "mb_grass1_NO.paa" and the "mb_grass2_NO.paa" files in the .pbo?

From the codes posted for .rvmat they are not being used at all.

Q: Why do you use "AlphaTest96" in the renderFlags?

i only know these:

AlphaTest32, AlphaTest64, AlphaTest128

EDIT: In my opinion the magic of all this is based on the rvmat codes. rvmat codes makes all the difference if well implemented.

Share this post


Link to post
Share on other sites

Hey thanks, really appreciate you guys testing this, im loving the pics smile_o.gif, its nice to see it also looks good with other ground textures, the flat lying planes really help with that. Im a bit suprised that the 2048 didnt really have too much impact on performance, also how much fps does fraps usually take up?, does Arma have a proper debugging hud showing fps, drawcalls, etc available for public use?

@Q; Thanks heaps for the link. Ever since I installed Vista i've only been able to use Eliteness for all my .pbo stuff, nothing else works anymore, im gonna install xp64 soon so hopefully I wont have these sorts of problems in the future.

@jojimbo; There's definitly more vegetation on the agenda, Ill probably make some weed's and wild flowers next, then move onto bushes, I've already got a few plants modeled, like veregated Ivy, Mustard plant and another small unidentified shrub allready made, so ill probably put them out first, they just need a little bit of work.

@bravo6;

Quote[/b] ]Q: Why do you use "AlphaTest96" in the renderFlags?

i only know these:

AlphaTest32, AlphaTest64, AlphaTest128

Most of my experience with text based materials comes from modding with the id-tech4 engine and although some of that translates over to Arma .rvmats, alot of its quite different in structure and terminology, so with arma I just kind of try to get results through trial and error and hope for happy accidents, which could be the wrong way, I dont know, but I appreciate you correcting me if im wrong about something. I could be wrong regarding Arma .rvmats but usually 'alphatest[cutoff]' as a material stage keyword either goes from 1-255 or 0-1, 1 or 0 meaning no cutoff and 255 or 1 meaning full cutoff, (material will dissapear), so its a variable.

Quote[/b] ]Q: Why do you have the "mb_grass1_NO.paa" and the "mb_grass2_NO.paa" files in the .pbo?

From the codes posted for .rvmat they are not being used at all.

yeah I screwed up the names sorry, they should be corrected in the current download with the 2048's

Share this post


Link to post
Share on other sites
I could be wrong regarding Arma .rvmats but usually 'alphatest[cutoff]' as a material stage keyword either goes from 1-255 or 0-1, 1 or 0 meaning no cutoff and 255 or 1 meaning full cutoff, (material will dissapear), so its a variable.

Use 2^values not 1-255. That is... 2 power x.

Share this post


Link to post
Share on other sites

ok, my mistake, too many late nights smile_o.gif, the alphatest keyword dosent actually seem to be doing anything with this material anyway, I think I must have noticed the bleeding around the edge of the alpha in bulldozer, then shut it down, changed alphatest 32 to 96, loaded it up again and thought the bleeding was gone, but it wasnt, i got fooled, cause if you take a close look at this pic you see that one side of a poly blends fine, while the other bleeds around the edges:

grass04.th.jpg

Thanks for pointing that out bravo 6 and synide.

btw, If anyone could suggest an ideal .rvmat for that would be great, cheers.

Share this post


Link to post
Share on other sites

Nice work mikebart (and others), really like what I see here!

Looks stunning.  thumbs-up.gif

Awesome result!

Quote[/b] ]

Here is the replacement file. Only works with my listed fixes

and the added rvmat from the posts above:

PROPER_c_MB_Grass.pbo

(load fixed MB_Grass.pbo along)

Q, sorry for a stupid question but can you be a bit more specific?

I tried to open MB_Grass.pbo but didn't find any rvmat files (tried with both cpbo and Elitiness). I also tried to add them manually and re-pbo it but gets this error msg...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

Warning Message: Cannot open object ca\mb_grass\mb_cluttergrass_general.p3d

As you notice I'm quite lost with some of this addon making stuff.

I understand that all this is WIP but it would be nice if there was an updated MB_Grass.pbo along with your PROPER_c_MB_Grass.pbo to grab and just unzip wink_o.gif

Any help appreciated!

/KC

Share this post


Link to post
Share on other sites

I don't want to post a modified file. I can send you a link mikebart if you want.

Changes:

1) open file with cpbo

2) Create text file

3) Rename to $PBOREFIX$

4) Open with text editor

5) Add ca\mb_grass

6) Save

7) Create text files and rename them to the rvmat name mikebart

posted. Add the content to each and save.

8) put them to mb_grass\data

9) pack file with cpbo

Share this post


Link to post
Share on other sites

Thanks a ton Q!

With your help I hope I will sort it out...

Thanks again m8!

/KC

Share this post


Link to post
Share on other sites

Awesome work on the grass mikebart, I love it!

however, I have 2 questions:

1 - does anyone know if its possible to fix the shadows of the grass? (I'd say this is a config/rvmat issue, since the same problem was there with Q's Sgt.Ace grass replacement)

clipboard01kho.th.jpg

(screenshot is from ACEmod, but I tested on vanilla arma too, same result.)

2 - could somebody tell me, in which pbo are the vanilla ArmA grass .rvmat files? I'd like to do some tweaks in it, but can't seem to find the damn files sad_o.gif

Any tips are highly appreciated, thanks!

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">PixelShaderID="Grass";

VertexShaderID="Basic";

i don't know about the FPS but this fixed both shadow casting on the grass (beautiful at sunrise) and the alpha blending problems for me.

looks very awesome mikebart!!! inlove.gif one question though. could you release some colour variations pls. cuz since it's not allowed to change the textures (i mean colour correction) it's hard to make it fit in the palette of my map. just some darker and less saturated (or more brownish) versions and maybe a dry one would be cool. just an idea.

Share this post


Link to post
Share on other sites

BadBenson

Quote[/b] ] just some darker and less saturated (or more brownish) versions and maybe a dry one would be cool. just an idea.

Gotta say, that is a sweet idea  biggrin_o.gif .

Like maybe african/middle eastern. Could look nice, especially on your new island Benson  wink_o.gif ,and some of the others coming out soon.

Also, a brown/dry grass would look really nice on some of the ACE islands..

Before I forget.. crazy_o.gif

Thankyou for for releasing this to the community mate, great work.. it can get very scary in the long grass at night.. confused_o.gif

Share this post


Link to post
Share on other sites

Thanks for the comments guys,

Badbenson: Good point, thats fine mate, feel free to colour correct the textures to suit your level, color correction's important and I dont want to limit its use in anyway, ill make sure I state that in the readme on the next release.

Heres a more alphatesting freindly version of the grass texture: GrassAlphaTest

just for if you decide you want to use the classic BIS's .rvmat like shown below, you should get much smoother cutout on the edges with this one.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

PixelShaderID = "Grass";

VertexShaderID = "Basic";

renderFlags[] = {"AlphaInstancing", "AlphaTest32"};

@cole.cz: sorry mate, i havent even gotten around to getting it ingame myself, and still trying to get my head around alot of this, maybe try playing with the shadow settings in the vertex properties in oxygen, I turned off shadows in there to get rid of shadow casting, but the grass is still receiving shadows in bulldozer.

Share this post


Link to post
Share on other sites

Thanks to Q's help I now have this nice looking grass in game and it looks really nice.

I will play around some with grass density/mixture and see what I will come up with.

/KC

Share this post


Link to post
Share on other sites

Been fiddling around a bit and decided that "mixed grass" works best for me for two reasons... First, the AI is very good seeing thru vegetation (also with VegFix) so I prefer lower grass to even the odds, second consideration is my framerate stays up with less dense grass while still adding lots of immersion to the game (hate to play without grass).

Here are some pics showing how it looks like (still tweaking)...

ArmA_MB_Grass_000.JPG

ArmA_MB_Grass_001.JPG

ArmA_MB_Grass_002.JPG

Would be nice to have some darker green/brownish versions of it since in some situations it stands out a bit to much, no big deal, just wanted to mention it...

Also noticed the following issue when using smoke grenades, is it fixable?

ArmA_MB_Grass_003.JPG

Kudos to mikebart for this nice grassmod and Q for helping me out wink_o.gif

/KC

Share this post


Link to post
Share on other sites

Keycat, thanks for posting that up, i see what you mean about it needing to be a bit darker, feel free to play around with the colours. I'll be putting a .psd in the final version which has all the different components of the grass texture seperated on masked layers so that you can easily pick out and adjust for example: just the colour of the grass without effecting the seed heads, the shadows are on a seperate layer too.

About the errors in the last pic you posted, have a read of this thread: http://www.flashpoint1985.com/cgi-bin....11;st=0

just incase you havent already, its got some good info on different grass .rvmat settings and could answer a few questions you have (did for me)

Quote[/b] ]I don't want to post a modified file. I can send you a link mikebart if you want.

Q: sorry i think I must have missed that before, a link would be great!, thanks.

Share this post


Link to post
Share on other sites

Thanks for the pointer, will check it out!

/KC

Share this post


Link to post
Share on other sites

Hey guys heres the .psd i was talking about, its masked so you can pick out and change different components of the grass texture, the shadows are also on a seperate layer.

Masked Grass.psd

Just curious, has anybody used the ground textures yet?

Share this post


Link to post
Share on other sites

which ground texture?

Share this post


Link to post
Share on other sites

I mean the grass terrain textures in the pack, just curious really, i guess its more of a pain in the ass to change the terrain textures than it is to change the clutter.

manaisland3go8.th.jpg

Share this post


Link to post
Share on other sites

Well it is some work for Sara/Rahmadi.

We can do it easily for ACEIP which is using the single SAT texture

technique. Thanks for the info mike!

Share this post


Link to post
Share on other sites

p005.jpgp006.jpg

p007.jpgp008.jpg

* There was no MCO in there.

* I used the HQ also for SAT - just ignore.

* Used some standard arma clutter. Would be interesting to see

with different ones as well as yours of course.

* IMO looks pretty good. smile_o.gif

We can include it in ACEIP if you want.

Share this post


Link to post
Share on other sites

thanks Q!, yeah they go well with the grass clutter, I've got the base texture size at 20x20 on my island, could be a bit high? it was necesary to get the scale right, could probably just use it at 1024?

I got it looking pretty good in idtech4 with diffuse, normal, specular and just one light, running around with the flashlight was pretty cool.

I think they should look nice in Arma at night, lit with headlights from vehicles or fires.

shot00091mq9.th.jpg shot00090lf8.th.jpg

edit:

Quote[/b] ]We can include it in ACEIP if you want.

yeah sure, go for it smile_o.gif

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  

×