Jump to content
Elcoo

Rendering grass at long distances: My thoughts about it

Recommended Posts

I have a little bit of experience concerning realtime graphics, shaders etc., so here is an approach I would take to render grass at long distances, or at least obscure soldiers smoother than with the current method.

So here is a soldier in prone position:

http://s1.directupload.net/images/130309/tmseoir6.jpg (307 kB)

Let's take a look at the soldiers alpha layer:

y4mxx6h9.jpg

And now here is a grass alpha layer I quickly sketched in photoshop:

http://s1.directupload.net/images/130309/jp5ucqp4.jpg (210 kB)

Using pixelshaders and combining global and local texture coordinates, we could multiply the alpha layer of the soldier with the grass layer, resulting in this:

http://s1.directupload.net/images/130309/qvojajgf.jpg (155 kB)

http://s1.directupload.net/images/130309/uaklkkkf.jpg (266 kB)

Now let's place our little fellow on some terrain!

Looking through the scope, without the multiplied alpha...

http://s1.directupload.net/images/130309/wjyay4ch.jpg (565 kB)

... and here it is with the new alpha:

http://s1.directupload.net/images/130309/iyqh868j.jpg (564 kB)

Here's what it looks like without scope...

http://s7.directupload.net/images/130309/3hd3afbd.jpg (164 kB)

... and here with the describben technique:

http://s14.directupload.net/images/130309/doxrq6q7.jpg (164 kB)

Of course I simplified everything, so it is understandable to hopefully everyone, but I know this is possible since the day pixel shaders were invented. The performance impact should be minimal, considering no additional geometry has to be rendered and it can be done entierly on the GPU. I don't know if something like this is planned, so I thought I'd just share my thoughts on it.

Cheers!

EDIT:

Thanks for all the comments, I made a feedback entry on the tracker, here's the link:

http://feedback.arma3.com/view.php?id=3505

(thx for the tip coulum)

Edited by Elcoo
  • Like 2

Share this post


Link to post
Share on other sites

I dont know what you mean - it already working this way. at least you cant really say if there is grass alpha or they blends into the texture....

arma32013-03-0918-47-aasfp.jpg arma32013-03-0918-46-z3s4u.jpg

I think it works really perfect for prone

this is the way it looks when laying down on sand / stones

arma32013-03-0918-51-7vs7s.jpg arma32013-03-0918-51-uksqn.jpg

maybe here the soldier is easier to see because he is sharp while texture is blurry... either the texture should have some sharp random noise (stones stuff) or the soldier should get blurry also in the distance

Edited by tremanarch

Share this post


Link to post
Share on other sites

The current technique lets soldiers sink into the ground for about 20cm, so that only parts of their bodies are shown. The thing is, that the transition between ground and soldier is not very smooth, and much more noticable for the eye than a smooth transition. Of course this is still better than no obscuring at all, but I think my describben technique might lead to better/smoother results.

Share this post


Link to post
Share on other sites

The final picture is way too hard to spot the soldier, but I like what you're on to here. Better than the current implementation.

Share this post


Link to post
Share on other sites

Wow, I like this idea, I wonder how much more resources it would take vs the current 'sink' solution?

Share this post


Link to post
Share on other sites

here is a closer version of the actual style

arma32013-03-0918-58-awse9.jpg arma32013-03-0918-58-9ps2p.jpg arma32013-03-0918-55-p8snf.jpg

some alpha blend into texture would be enough. what stands out is the sharp vector edges and AA of the soldier model vs the blurry texture.

Share this post


Link to post
Share on other sites
The final picture is way too hard to spot the soldier, but I like what you're on to here. Better than the current implementation.

Thats the idea behind camouflage. Now if the soldier is moving then you would be able to see the movement.

Share this post


Link to post
Share on other sites

I like your idea. I say why not try and give feedback? Could you make an addon maybe?

Share this post


Link to post
Share on other sites

in my eyes the real problem is not the fade between object and texture, but between visual qualits difference between object and texture.

Share this post


Link to post
Share on other sites
Wow, I like this idea, I wonder how much more resources it would take vs the current 'sink' solution?

As I said, the performance impact should be minimal. The soldiers already use complex pixel shaders to render normal, diffuse and specular maps; alpha blending shouldn't be a great deal. The hardest thing would probably be to get the z-order right, so that it blends correctly with foliage near to the eye, but even this should be well solveable.

edit:

@Tremanarch: You're right, alpha blending is missing, so that the edges fade in better, but in the end this is more or less what I described.

@Minoza: I didn't give feedback yet, as I thought it would be easier to explain what I mean in a forum, because of all the pictures etc.

Edited by Elcoo

Share this post


Link to post
Share on other sites

Elcoo, great idea.

Imho the results of the method proposed by you are much more promising than the solution currently implemented.

I always considered the effects of camouflage one of the graphical aspects crucial to game play and immersion. I would highly appreciate, if it could be improved.

Share this post


Link to post
Share on other sites

This is a far better solution than the current "sinking". For one it more accurately shows what is exposed of the soldier and second it doesn't mess with the hit detection (right now you actually have to aim above a sunken soldier to hit I believe). If it could be made into an addon it would be great. If BIS were to take up on it then even better. Either way, there needs to be better representation of grass/foliage at a distance.

Plus if this was combined with some better mid range ground textures... it would be a real step up for the series in this department.

Share this post


Link to post
Share on other sites

I can barely see them now as is! However, I find the sinking to be very stupid looking, so I would actually prefer this. If only it could stop the AI from seeing me...

Share this post


Link to post
Share on other sites
I can barely see them now as is! However, I find the sinking to be very stupid looking, so I would actually prefer this. If only it could stop the AI from seeing me...

not to bring this offtopic, but trust me, the grass helps conceal you, even against ai. Just remember, they have scopes too.

I am interested though, is the OP's suggestion remotely possible to mod in?

Share this post


Link to post
Share on other sites
not to bring this offtopic, but trust me, the grass helps conceal you, even against ai. Just remember, they have scopes too.

I am interested though, is the OP's suggestion remotely possible to mod in?

I've noticed plenty of xray ai

Share this post


Link to post
Share on other sites

Would be nice too if they put a slider, like for the shadows, to set how far the grass is rendered as well.

not to bring this offtopic, but trust me, the grass helps conceal you, even against ai. Just remember, they have scopes too.

I may be wrong but I do believe it's been proved over and over that on ArmAII only trees and bushes may provide concealment, not grass. As for ArmAIII, I remember some interview a while ago in which they said the issue wasn't likely to be fixed with ArmAIII. Considering the distances I've seen myself being engaged from by AIs, I think it's safe to say they still see you through grass.

I like OP's idea. It remains to be seen if it doesn't stands too much in movement though.

Edited by dunedain

Share this post


Link to post
Share on other sites

I suggest everyone take a moment to read about "overdraw".

Would be nice too if they put a slider, like for the shadows, to set how far the grass is rendered as well.

I may be wrong but I do believe it's been proved over and over that on ArmAII only trees and bushes may provide concealment, not grass. As for ArmAIII, I remember some interview a while ago in which they said the issue wasn't likely to be fixed with ArmAIII. Considering the distances I've seen myself being engaged from by AIs, I think it's safe to say they still see you through grass.

I like OP's idea. It remains to be seen if it doesn't stands too much in movement though.

I cant' remember what game it was for, Arma or Arma2, but I remember the devs talking about a clutter approximation component to their detection system. So, if you're in clutter, it would modify their chance to detect you the same way crawling prone or other modifiers work.

Edited by Max Power

Share this post


Link to post
Share on other sites
I cant' remember what game it was for, Arma or Arma2, but I remember the devs talking about a clutter approximation component to their detection system. So, if you're in clutter, it would modify their chance to detect you the same way crawling prone or other modifiers work.

Isn't that how the ACE AI Grass View Block module works? I'm not sure.

Anyway, great stuff, Elcoo!

Share this post


Link to post
Share on other sites

Hi, the method proppossed by Elcoo is by far the best method that i've seen; it should be like that instead as always. Let's C ya

Share this post


Link to post
Share on other sites
Isn't that how the ACE AI Grass View Block module works? I'm not sure.

Anyway, great stuff, Elcoo!

A viewblock volume is something different.

Share this post


Link to post
Share on other sites

What the heck, who deleted my first post?!

Edit: Whatever, it's there again^^

Edited by Elcoo

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×