Page 1 of 10 12345 ... LastLast
Results 1 to 10 of 93

Thread: Rendering grass at long distances: My thoughts about it

  1. #1

    Rendering grass at long distances: My thoughts about it

    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:


    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)
    Last edited by Elcoo; Mar 10 2013 at 00:12.

  2. #2
    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....



    I think it works really perfect for prone

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



    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
    Last edited by tremanarch; Mar 9 2013 at 16:53.

    . . . . .

  3. #3
    Private First Class
    Join Date
    Jan 30 2013
    Posts
    15
    Author of the Thread
    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.

  4. #4
    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.

  5. #5
    Wow, I like this idea, I wonder how much more resources it would take vs the current 'sink' solution?
    "It takes a big man to admit when he is wrong...I'm not a big man." Chevy Chase, Fletch Lives

  6. #6
    here is a closer version of the actual style




    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.

  7. #7
    Quote Originally Posted by Gorbachev View Post
    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.

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

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

  10. #10
    Private First Class
    Join Date
    Jan 30 2013
    Posts
    15
    Author of the Thread
    Quote Originally Posted by DayGlow View Post
    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.
    Last edited by Elcoo; Mar 9 2013 at 17:07.

Page 1 of 10 12345 ... LastLast

Similar Threads

  1. Units are warping & rendering problems at long range
    By oxmox in forum ARMA 2 & OA - TROUBLESHOOTING
    Replies: 1
    Last Post: Jan 30 2010, 13:19
  2. Different Sounds For Different Distances
    By SaBrE_UK in forum ARMA - ADDONS & MODS: DISCUSSION
    Replies: 5
    Last Post: Apr 23 2008, 11:21
  3. Grass rendering
    By Blanco in forum ARMA - GENERAL
    Replies: 13
    Last Post: May 19 2006, 21:04
  4. Changing draw distances.
    By Psylocke in forum TROUBLESHOOTING
    Replies: 5
    Last Post: Aug 1 2002, 22:34
  5. How do You Set Viewing Distances
    By ParkingCart in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 9
    Last Post: Jan 21 2002, 17:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •