1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SHADER 3D grass

Discussion in 'Tracks' started by luchian, Dec 22, 2014.

  1. luchian

    luchian Administrator ACM Racing Team ACM Club Driver

    Joined:
    Jun 3, 2014
    Likes Received:
    423
    AC member SandroX made a video back in July, on how to make 3d grass with 3ds max. Maybe you guys find it usefull as well:



    Objects with suffix KSLAYER5 will be visible only at settings World Detail Maximum, KSLAYER4 on Very High, KSLAYER3 on High and so on. Some examples:

    grassA_KSLAYER1, grassB_KSLAYER1, plantA_KSLAYER1, bushA_KSLAYER1, etc - will all be groupped and visible starting from lowest world detail.

    grassX_KSLAYER2, grassY_KSLAYER2, grassZ_KSLAYER2, etc. - will all be visible starting from world detail 2


    For shader settings, of course you can define your own, but in case you need a starting point, here's an example (also thanks to SandroX) :

    nw_gs.jpg
     
    MacArnu likes this.
  2. luchian

    luchian Administrator ACM Racing Team ACM Club Driver

    Joined:
    Jun 3, 2014
    Likes Received:
    423
    In case you are using Blender, AC member skombijohn (<thank you) shows the way :D

    1) Create the object (a cube for example)
    2) Apply 2 array modifiers, set each to the desired number of iterations (they get multiplied!)
    3) Set the relative offset of one modifier to somthing bigger than 1 on X axis and on the other on Y axis (see screen)

    3d_grass_01.png

    4) Apply both modifiers.
    5) Now you have a single object with many cubes. Let's split em!
    6) Select the object, go to Edit Mode, select all vertices.
    7) Hit "P" and choose "by loose objects".
    8) Leave Edit mode, and you have independet objects!
    9) Now we must correctly set all the objects orgins. So select all single cubes and choose "Set Origin -> Origin to Geometry".

    3d_grass_02.png
    Result:

    3d_grass_03.png
    10) Let's randomize them: With all cubes selected we use the "Randomize Transform" function. To find that function quick hit SPACE and simply type "Randomize Transform".

    3d_grass_04.png
    11) in the tool panel there are now settings for the random transform:

    3d_grass_05.png
    12) When you are happy hit CTRL-A and select "Rotation and Scale" to apply the transformation
    13) Now with all cubes selected simply join them.

    3d_grass_06.png
    14) done.
     
  3. Fat-Alfie

    Fat-Alfie New Member

    Joined:
    Jun 2, 2015
    Likes Received:
    8
    Quick question: with world detail set to maximum, do you see objects named kslayer5, kslayer4, kslayer3 etc? Or only those named kslayer5? I.e. do they build up together or is each 'layer' viewed in isolation?
     
  4. luchian

    luchian Administrator ACM Racing Team ACM Club Driver

    Joined:
    Jun 3, 2014
    Likes Received:
    423
    99% sure they build up together.

    ..sent from my phone.
     
  5. Fat-Alfie

    Fat-Alfie New Member

    Joined:
    Jun 2, 2015
    Likes Received:
    8
    I just did a quick test and yes, I can confirm that KSLAYER3 objects appear when world detail is set to 'high', 'very high' and 'maximum' - so they build up.

    [Sorry, I could have just tested that in the first place instead of asking on the forum :rolleyes:]

    I was going to set my grass objects within each area at 500 for KS3, 1000 for KS4 and 2000 for KS5, but now I have done that test, that would mean on KS5 I would have 2000+1000+500 objects visible (3500) and not the 2000 I thought. I guess I could set KS3 to 600, and then just duplicate each object for KS4 and then KS5, giving me a total count of 1800 objects on KS5.

    I think I need to test performance before I go much further o_O

    Thanks for your help, btw :)
     
    luchian likes this.