Featured TUTORIAL Build your FIRST track - BASIC GUIDE

Discussion in 'Tracks' started by luchian, Jun 14, 2014.

  1. Johnr777

    Johnr777 Active Member

    Joined:
    Jul 26, 2017
    Messages:
    168
    Likes Received:
    86
    That's just one layer? yikes

    Splitting grass files into multiple KN5s does little for performance, All it does is help loading files into ksEditor quicker.

    The guide you've read is emphasizing on using multiple layers per section. I like to use 5 layers, some guys use 3... but it really depends on how much grass you need to cover.

    I'll write the way I distribute grass to my projects, by no means the only way to do it, but its efficient and follows the layer system.

    1) I've cloned my grass surface object and split into roughly 10 equal sized areas. These will be my distribution surfaces... Surface 1 to Surface 1o

    2) I'm now going to do a test scatter on Surface 1, determining how many polygons it will take for the area to be lush and covered. Turns out its about 50000 polygons. Easy math = 50000/5 layers = 10000 per layer.

    3) I apply 5 scatter commands, each at 10000 clones, ( if using max, each scatter command needs a new seed, so the clones are random all 5 times) to Surface 1.

    4) The way I name them:
    surface1_01_KSLAYER1
    surface1_02_KSLAYER2
    surface1_03_KSLAYER3
    surface1_04_KSLAYER4
    surface1_05_KSLAYER5

    5) Reset the pivot points of those 5 objects to their centers, its what the game needs to know so the LOD out works correctly.

    6) I keep on doing the same steps 2 - 5 to all other 9 surfaces. Doesnt necessarily mean they all take 50000 clones/polygons.. but always use the math dividing by 5 layers. (ie 45000/5 = 9000 per layer, etc)

    Until my Surface 10 is all set
    surface10_01_KSLAYER1
    surface10_02_KSLAYER2
    surface10_03_KSLAYER3
    surface10_04_KSLAYER4
    surface10_05_KSLAYER5

    7) The normals will need to be fixed, pointed up.

    8) Export to FBX... doesnt need to be multiple, only if loading into ks editor is ridiculously long... then sure, split them into 2-3 FBX

    9) Once loaded into the editor, need to fix the LOD out values for each layer of each surface.

    KSLAYER1 = 350
    KSLAYER2 = 300
    KSLAYER3 = 260
    KSLAYER4 = 160
    KSLAYER5 = 80

    These numbers arent set in stone, but its what its been used successfully, but i've done different versions of that.. again, depending on the project, and camera angles.

    Once shader is all set, KN5 exported. You should have a 3d grass system in your track that is efficient, looks good, and doesnt cost you of any more than 10-15 fps.

    With a good texture that actually matches the grass surface, good shader values... it could look very good.

    You dont want this.... Untitled.png

    You want this.... Mosport-shot58.jpg
     
    Last edited: Sep 25, 2018
    pyge, luchian, benobro and 1 other person like this.
  2. luchian

    luchian Administrator Staff Member

    Joined:
    Jun 3, 2014
    Messages:
    1,929
    Likes Received:
    702
    Excellent explanation @Johnr777 , thank you for taking the time.
     
  3. Johnr777

    Johnr777 Active Member

    Joined:
    Jul 26, 2017
    Messages:
    168
    Likes Received:
    86
    Glad to be of help!
     
    Kibbutz and luchian like this.
  4. eg01st

    eg01st New Member

    Joined:
    Sep 17, 2018
    Messages:
    23
    Likes Received:
    6
    Screenshot_ks_nissan_gtr_gt3_r_coaster_26-9-118-0-53-42.jpg Screenshot_ks_nissan_gtr_gt3_r_coaster_26-9-118-1-8-32.jpg Screenshot_ks_nissan_gtr_gt3_r_coaster_26-9-118-1-8-44.jpg

    Talking about textures, my grass becomes darker in distance in wide angle views, ingame. See the two pictures with S corners - the camera position is the same, in low FOV grass is ok, but in wide angle it becomes "dirty". Is that something to do with mipmaps/aniso filters?

    Also, can somebody recommend a good texture source for dry/old/dead grass? Google gives only one example that is close, but it's half transparent and looks ugly. I place it on sand surfaces.
     
  5. Johnr777

    Johnr777 Active Member

    Joined:
    Jul 26, 2017
    Messages:
    168
    Likes Received:
    86
  6. eg01st

    eg01st New Member

    Joined:
    Sep 17, 2018
    Messages:
    23
    Likes Received:
    6
    Thank you, I will try these out.

    I'm having a little struggle with getting .dds transparency through GIMP right in ksEditor. My project currenly has .png files. I make a flat transparent layer in photoshop and delete white matte to get rid of white borders.

    EDIT: SuperPNG plugin for Photoshop is really easy to use for testing textures with alpha layer.
     
    Last edited: Sep 26, 2018
  7. Johnr777

    Johnr777 Active Member

    Joined:
    Jul 26, 2017
    Messages:
    168
    Likes Received:
    86
    You should really avoid using png, it kills performance
     
  8. eg01st

    eg01st New Member

    Joined:
    Sep 17, 2018
    Messages:
    23
    Likes Received:
    6
    I know, it's just for testing. It's pain to open each file after each change in GIMP and convert to .dds.

    BTW:

    Today's test drive. Please don't roast me for crashing. I'm a bad driver and this was first time using this car.
    https://photos.app.goo.gl/q325oqxDMswUq9wz6
     
    Last edited: Sep 27, 2018
    luchian likes this.
  9. piermario

    piermario New Member

    Joined:
    Nov 5, 2014
    Messages:
    3
    Likes Received:
    0
    ...
     
    Last edited: Oct 20, 2018 at 2:33 PM
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice