SHADER setting-up trees

Discussion in 'Tracks' started by jarodyi, Nov 4, 2014.

  1. Bruno Mendes

    Bruno Mendes New Member

    Joined:
    Jan 6, 2020
    Messages:
    15
    Likes Received:
    2
    Ok I'll re-check the shader when i get home...

    Attached there is a secreenshot how it looks like in the game....
     
  2. Bruno Mendes

    Bruno Mendes New Member

    Joined:
    Jan 6, 2020
    Messages:
    15
    Likes Received:
    2
    Nice ... ill check this addon =]

    I've attached a screenshot how my trees are in the game... Is it supposed to look similar to this? the one showing the edge it's just a matter of rotating it?
     

    Attached Files:

  3. Portland12345

    Portland12345 Member

    Joined:
    Feb 11, 2017
    Messages:
    34
    Likes Received:
    10
    yeah that is just incorrect unwrap.


    you can follow this tutorial here.


    but with 2.8 you can skip everything if you use images as plane addon.

    just follow the part where he rotates the tree correctly and sub divides it.

    and it will look good in game.

     
  4. Bruno Mendes

    Bruno Mendes New Member

    Joined:
    Jan 6, 2020
    Messages:
    15
    Likes Received:
    2
    Thanks a lot man! Trees looks better now!

    Cheers
     
  5. Bruno Mendes

    Bruno Mendes New Member

    Joined:
    Jan 6, 2020
    Messages:
    15
    Likes Received:
    2
  6. Theis

    Theis New Member

    Joined:
    Apr 29, 2020
    Messages:
    7
    Likes Received:
    1
    Hi!
    Trying hard to wrap my head around trees in AC :)

    I cant get the group naming to work in KS Editor...

    I´ve read this entire thread on the naming convention, but it still won´t group the way it´s supposed to. Here´s how the objects are named in Blender, and how they end up in KS Editor - instead of 1 group with 15 trees, I get 15 groups all named the same.

    I saw the post and reply re. Make Single User, but I´m not sure I´m doing it correctly. I´m marking the objects in Blender, then choosing the option shown in the screenshot below, but makes no difference. Is it something I set when exporting to .fbx perhaps?

    Please help! :)





    2020-06-19 (1).png 2020-06-19 (2).png 2020-06-19.png
     
  7. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    dont start with KSTREE_GROUP_a_001
    but with
    KSTREE_GROUP_a_1

    ;)

    small Blender-script that does it, replace _a_ with what you want:

    Code:
    import bpy
    if True:
      i=1
      prefix='KSTREE_GROUP_a_'
      for ob in bpy.context.selected_objects:
        ob.name=prefix+str(i)
        i+=1
        print(ob.name)
        if ob.type == 'MESH':
          ob.data.name=ob.name
      print(str(i) + ' objects')
     
    luchian and Prototype like this.
  8. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    and yes, make single user! Every tree must be an individual ;)
     
  9. Theis

    Theis New Member

    Joined:
    Apr 29, 2020
    Messages:
    7
    Likes Received:
    1
    Thanks for the reply, fughettaboutit!

    Should have mentioned that I already tried quite a few naming options, but still doesn´t work. I tried the 1, 2, 3 as you suggested but made no difference:

    2020-06-19 (5).png

    2020-06-19 (4).png

    I´ve only used Blender for a few months, so there´s lots I don´t know/understand, and I´m not sure about the "single user" issue. I did follow the instructions:
    - In Object mode
    - "A" to select all my objects, including the trees
    - Click the menu Object -> Relations -> Make Single User -> Object & Data
    - Then choose "Selected Objects" from the small menu that appears

    But it doesn´t make a difference once looking at the exported fbx in KS Editor - still a long list of BLOCKTRANSFORM objects all named the same (and with different materials, making it a pain to adjust shaders)
     
  10. LilSKi

    LilSKi Well-Known Member

    Joined:
    Apr 6, 2015
    Messages:
    370
    Likes Received:
    329
    Do they all have the same material?
     
    fughettaboutit and Theis like this.
  11. Theis

    Theis New Member

    Joined:
    Apr 29, 2020
    Messages:
    7
    Likes Received:
    1
    Doh! No, they didn´t. Just made a test with a few trees where I force the same material on all, and it works :) Thanks!! So obvious, and yet I didn´t think about it.

    This happened because I copy-c/v my tree object in my blender scene - when doing so, it automatically gives the new object it´s own material name (why??) - even though it could/should be exactly the same. I just googled a way to assign one material to multiple objects, so I guess I´ll just need to remember to do that moving forward...

    Thank you so much for your help, LilSki and fughettaboutit!
     
    fughettaboutit likes this.
  12. Theis

    Theis New Member

    Joined:
    Apr 29, 2020
    Messages:
    7
    Likes Received:
    1
    ah of course, I could use Alt-D to make the copies (instances) instead of copy-c/v, and then just need to remember to make them single-user before export.... oh, the joys of learning :)
     
  13. Theis

    Theis New Member

    Joined:
    Apr 29, 2020
    Messages:
    7
    Likes Received:
    1
    Regarding treelines using Blender 2.8x, I had trouble getting the normals to point in different directions, like having the top point up and the bottom-edge point somewhat down, as was recommended by Lilski. I finally found a nice and easy method:

    - TAB to edit your treeline object
    - Move your cursor to the edge you want to edit normals for, and use Alt-lmb (left-mouse-button) to select edge only (like your top-edge of the treeline)
    - ALT-L to "point normals to target"
    - lmb once to bring up small menu with options/coords
    - type in 10000 in Z-value to point up (or -10000 to point down)

    You can also make the normals in a different angle by combining a high X or Y value with a somewhat lower Z value (like 10000 Y and 5000 Z).

    Repeat with the other edge, point them in some other direction.


    Should look something like this, for example:
    2020-06-26.png


    I find that pointing top-edge straight up, and pointing bottom edge 45 degrees down gives nice results, but happy to hear other ideas!


    Hope this helps :)
     
  14. wardenjam

    wardenjam New Member

    Joined:
    Aug 26, 2020
    Messages:
    1
    Likes Received:
    2
    This must be a simple one but I can't find the solution in here... sorry if I'm blind.

    My Trees are casting plane shadows not shadows of the alpha. I'm using ksTree and pretty sure they're grouped correctly by name. Any help would be appreciated.

    EDIT - Found it in the end: ksAlphaRef was set to 0
     
    Last edited: Sep 9, 2020
    WatThaDeuce and Johnr777 like this.
  15. maachu

    maachu New Member

    Joined:
    Nov 2, 2020
    Messages:
    4
    Likes Received:
    1
    Hi guys, I threw myself into trackmodding last week with the ambition to race a road around my hometown. I achieved to fix a lot of problems thanks to this forum but now I'm stuck with something I can't solve.
    I followed every tips to set up trees and to make them look acceptable : normals up, origin, make them single user, KSTREE_blabla.
    I made a 6.6km track with a lot (a loooooooooooooot) of trees that I separated in 7 fbx files (some bugs occured so it's the only way I figured out). It displays nice on KsEditor but when I load the track ingame, it's more like a desert than a tropical environnement.
    I tried to load the track ingame with only one of the 7fbx trees files but same problem, no vegetation at all.
    Did this happened to anyone else and is there a solution ?
     

    Attached Files:

  16. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    did you export to fbx with all the same settings?
    did you put your tree.kn5 into models.ini?
     
  17. maachu

    maachu New Member

    Joined:
    Nov 2, 2020
    Messages:
    4
    Likes Received:
    1
    Yes, I exported the trees with the same settings.
    What do you mean into model.ini ? I'm a bit lost hehe
    Should I export to kn5 the trees without the road and place it somewhere ? in the "data" folder I only got surface.ini that have (i suppose) nothing to do with the trees. May I have a missing .ini ?
     
  18. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    for more than one kn5 you need to make a "models.ini" in the tracks main folder, ac does not read all kn5's by itself :
    Code:
    [MODEL_0]
    FILE=mytrack.kn5
    POSITION=0,0,0
    ROTATION=0,0,0
    
    [MODEL_1]
    FILE=trees1.kn5
    POSITION=0,0,0
    ROTATION=0,0,0
     
  19. maachu

    maachu New Member

    Joined:
    Nov 2, 2020
    Messages:
    4
    Likes Received:
    1
    Oh okay, I understand the process. I'll give it a try and give you a feedback !
    I'm so excited to share this project, it remind me some good memories behind a real car on this road ! But I have to work a lot more to make sure it's worth the dowload !
     
    fughettaboutit likes this.
  20. LilSKi

    LilSKi Well-Known Member

    Joined:
    Apr 6, 2015
    Messages:
    370
    Likes Received:
    329
    May be too late but make sure you don't use X trees. Y trees are what you should be using.
     
  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