3D Grass- The Pros, Cons and Thoughts

Discussion in 'General Discussion' started by MarcG, Mar 18, 2017.

  1. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    Can the grass be set so that only people that set their game on the High or Full detail level will see it?
     
    2ndLastJedi likes this.
  2. LilSki

    LilSki Registered

    Joined:
    Oct 7, 2015
    Messages:
    58
    Likes Received:
    368
    Not sure if this was directed at me or not but I will explain how it works in AC. With AC we have 5 "layers" (KSLAYER1-5) which is basically tied to the world detail slider. On max detail all 5 layers are visible, very high is 4 layers, and high is 3 layers, etc. When you build the grass models say need 30k grass objects. You build that up with 3 separate 10k objects for layers 3-5. You then set them with three different LOD out numbers. Some quick examples from Riverside is grass in layer 3 disappears at 350 meters, layer 4 is 180, and layer 5 is 80. This means as you drive the grass "crawls" as it loads and unloads the grass objects. When set right you can't really see any pop-in of the grass. Then the key thing about this is if you set to full detail you see all grass. When on very high you get 2 layers of grass and then on high you only get 1. Once you go to med you loose all grass.

    On NJMP I actually used 5 layers of grass as an experiment and it seemed to work well. You can be more aggressive on the LOD numbers with less noticeable pop-in.

    I would assume rF2 has this same or similar ability to tie objects to world detail as well as LOD in and out settings.
     
  3. peterchen

    peterchen Registered

    Joined:
    Oct 25, 2011
    Messages:
    2,099
    Likes Received:
    287
    From what you describe it´s the same in green with rF2.
     
  4. KernigWRC

    KernigWRC Registered

    Joined:
    Feb 15, 2013
    Messages:
    106
    Likes Received:
    26
    for very short cut gras it may be smarter to use a fur shader instead of tons of 3d gras blades,
    but i'm really not into this stuff too deep.
    https://www.google.de/search?q=fur+...9ufSAhUCBywKHamzCAAQ_AUICCgB&biw=1600&bih=782

    One more thing I know about gras blades is that its best if the texture towards the lower edge fades into transparency to make any seams invisible, also to place the blades at an angle so that they still cover the surface when looking from the top down.
    http://images.akamai.steamuserconte...318/A45BD9955C4F0BD9F1E0BC6757E5417751C52265/

    also you need backface lighting and some normalmap+reflection to make 3d gras look correct in the sunlight
    and it looks like s397 has implemented screen space ambient occlusion (ssao) into the dx11 build wich will create some soft shadows under the blades http://cdn.overclock.net/7/7d/7d758ebb_1355517972SmtzmJYEeY_7_2_l.png
     
    TJones, stonec, Ernie and 1 other person like this.
  5. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    remember grass has light shining through it from behind.

    Would be cool if there was such a shader that could just reproduce grass dependent on a colour map, thing to include in the terrain shader.
     
  6. hitm4k3r

    hitm4k3r Registered

    Joined:
    Jun 15, 2016
    Messages:
    1,320
    Likes Received:
    3,121


    Found this relatively old video, but it shows what I tried to describe. The look when it's lit up is pretty ugly.
     
  7. LilSki

    LilSki Registered

    Joined:
    Oct 7, 2015
    Messages:
    58
    Likes Received:
    368
    Yeah that is pretty bad. However a proper shader setup would solve that. If there is no way to fix that with the current setup then I would be inclined to ditch the grass on the RIR conversion. Would be a shame as it really brought the circuit to life when I added it in AC.
     
  8. 2ndLastJedi

    2ndLastJedi Registered

    Joined:
    Nov 3, 2016
    Messages:
    1,873
    Likes Received:
    1,198
    Sorry for my ignorance , but what is RIR ?
     
  9. LilSki

    LilSki Registered

    Joined:
    Oct 7, 2015
    Messages:
    58
    Likes Received:
    368
    Riverside International Raceway
     
    kimikaze, adamfarmer and 2ndLastJedi like this.
  10. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    Just chiming in. I haven't read all of this. Just the few last pages. I have not checked the grass at night with headlights at RIR yet. I will check it out this evening. To answer a few questions I saw. Yes rf2 can be set up to show what you want at different graphic settings. Tips for good looking 3d grass in rf2 so far? Color matching is very important. Currently I found the non-directional tex1 shader to work the best (still testing). One more thing is to mark your instances as "pointy" instead of "gmotor"
     
  11. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    So unfortunately The two things I recommended earlier don't seem to work with omni lights. They look good day, night, and transitions but will not accept the omni light. Checking "pointy" or using the non_directional tex1 shader have this negative result with omni lighting. I am running out of options and shaders to try. Possibly using rf2's billboarding technology has a better shader. I haven't tried those yet. Probably just going to focus on something else and hope dx11 brings a better option.
     
    MarcG likes this.
  12. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    So it turns out the problem was on my end after all. I had messed up normals after the conversion process. Causing me to go down the rabbit hole of trying different shaders. After getting that sorted it appears all you need to make decent looking 3d grass in rf2 is color matching, a plain old T1 shader, and have "pointy" marked instance rollout. Here is a short video for a proof of concept. Please note this is a very early build of the conversion.

    https://goo.gl/photos/aE4vRNZjwUoGdjhCA
     
    Emery, MarcG, TwoHardCore and 4 others like this.
  13. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    There's certainly some other things that could be done to improve the grass in rF2. This type of grass, I think, gets you 90+% the way there, though.

    Even in games that have obviously spent a lot of time and tech on 3D grass (e.g. Legend of Zelda: Breath of the Wild), there's still a lot of aberrations that just seem to be trade-offs rather than objective improvements--the shadowing, in particular, comes to mind. It also seems to alias like crazy, from what I've seen in videos.

    As someone who has grown up in forest country, one thing that's always bothered me in rF2, which is actually the reason I initially wanted to learn to write shaders, is the way that foliage is rendered. That's one area I'd definitely like to revisit. I'd love to get some translucence in the foliage when they're back-lit. I think that grass is a whole 'nother beast, though. Similar to a road surface, I think it'd need its own lighting/rendering technique. Terrain can look drastically different when viewed at different angles, and is even dependent on your viewing distance.
     
  14. 2ndLastJedi

    2ndLastJedi Registered

    Joined:
    Nov 3, 2016
    Messages:
    1,873
    Likes Received:
    1,198
    I cant get this vid to play :(
     
  15. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    Hmm its just a google photo vid. Should play. Didn't feel like dealing with youtube. Did you try clicking it?
     
  16. 2ndLastJedi

    2ndLastJedi Registered

    Joined:
    Nov 3, 2016
    Messages:
    1,873
    Likes Received:
    1,198
    Just on my phone, will try again later tonight when i fire up my pc.
     
  17. 2ndLastJedi

    2ndLastJedi Registered

    Joined:
    Nov 3, 2016
    Messages:
    1,873
    Likes Received:
    1,198
    I think we are in good hands here . Looks good .
     
  18. Love Guitars n Cars

    Love Guitars n Cars Registered

    Joined:
    Jan 5, 2017
    Messages:
    192
    Likes Received:
    156
    How about sparks when bottoming out instead?! :)
     
  19. Walker8

    Walker8 Registered

    Joined:
    Jan 9, 2016
    Messages:
    26
    Likes Received:
    11
    Is it possible in rF2 to have grass like in F1 games from Codies?
     
  20. dazzer

    dazzer Registered

    Joined:
    Feb 3, 2018
    Messages:
    518
    Likes Received:
    1,697
    I think the fact that textures are good can also help.
    I think the tracks of feels3 were quite superior to those of the studio 397 (personal opinion).
    [​IMG]
    [​IMG]
     

Share This Page