Jump to content
Sign in to follow this  
Linker Split

FPS vegetation increased performance

Recommended Posts

this is a little little tutorial on how to increase your vegetation performance impact on FPS:

Quote[/b] ]I noticed one thing:

What really causes lag is the Pixel shader and Vertex Shader of the _ca texture (the vegetation) and the shadow.

Unfortunately, we can't edit the shadow, since it's hardcoded. But we surely can edit the PS and VS:

for vegetation, you normally use VertexShader: NormalMapSpecularThroughNoFade and PixelShader: NormalMapSpecularThrough.

If instead of that PixelShader, we add the simple PixelShader: NormalMapThrough but with the flag NoAlphaWrite, we will have the SAME effect, but with an increase of FPS and performance smile_o.gif

Check yourself:

Before:

beforeso1.jpg

After:

afterhk8.jpg

Share this post


Link to post
Share on other sites

Interesting Linker Split - did you do large scale tests yet?

Maybe bring the idea to the attention of BI if it works well. smile_o.gif

Share this post


Link to post
Share on other sites

By using NormalMapThrough instead of NormalMapSpecularThrough you remove specular highlights on leaves, which makes the computations easier (shader is shorter). I understand this can bring better performance.

As for NoAlphaWrite, I do not see how could it bring any performance. Did you measure it without this flag? I expect NoAlphaWrite to cause significant artifacts when shadows are casted on the tree using it, therefore I suggest avoiding it.

Share this post


Link to post
Share on other sites

What sort of FPS changes are you seeing in ArmA itself? Buldozer running in a window might not be that representative.

Share this post


Link to post
Share on other sites

I thought it was mainly the specular setting that would cause the bump in preformance, as we have seen that happens when using the LowPlants mod. I believe that using just that method you would get a performance slightly worse than using the lowplants mod. Just my opinion.

Share this post


Link to post
Share on other sites

I checked also without NoAlphaWrite flag, it's the same result...

Also, seems that what really causes lag is (obviously) shadow casted on both ground and objects.

I got a slightly FPS increased performance when testing this new RVMAT on my HDT island (which got a lot of plants), but if I enable then the shadow setting, then FPS decrease again sad_o.gif

#EDIT

Can the textures have a performance impact on FPS?

I mean, I saved my vegetation Normal map with _novhq suffix, instead of _non one... but I got no differences.

I also tried to use the normal map parallax (_nopx) and the normal map Fade (_nof), still the same...

Why you BIS left the TexConvert.cfg editable, while even if i try to change the compression method for one class (for example from DXT1 to DXT5), texView 2 still saves the texture with the default compression method?

Share this post


Link to post
Share on other sites

OK, this is of interest to me, as I have large forests of custom trees smile_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]Yes, we found solution how to reduce overdraw about 25%, but this solution need diferent representation of tree surfaces and vertexes (diferent model and binarisation of this model and diferent way, how to switch vegetation lods). So it's not usable for curent vegetation data and will be used in next projects. Alphatextures mean also masked textures (that is 1bit transparency or opacity if you want and we use them)

This is what O'hara said on this forum (I can't find the source)

Basically BI will not implement it until ArmA2... is this still happening? Is this still true?

if so, basically we island makers are screwed. confused_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  

×