SHADER setting-up trees

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

  1. LilSKi

    LilSKi Active Member

    Joined:
    Apr 6, 2015
    Messages:
    311
    Likes Received:
    243
    I don't know what trees you are looking at but in many areas the colors of trees will vary greatly from species to species. So variation in the tree walls can be very useful. I would actually really like to have variation be an option on the kstree shader but we never got it. There has been work on custom shaders so maybe we can get it that way.

    Another note for tree walls is that it is best on the first wall to point the bottom normals down or at 90*. This will darken the bottom to better match the Y trees. Otherwise you will see the bright tree wall though the trees down by the trunks.
     
  2. mantasisg

    mantasisg Active Member

    Joined:
    Nov 21, 2017
    Messages:
    175
    Likes Received:
    136
    Thats good tip for bottom normals of treeline, LilSki, definitely will check out that next time I am working with them. Tree wall solid 4vertices plane, or divided by half verticaly ?

    As for color variation, I suppose it is true for tree walls just to reduce possible repetition impression, as it was said. I would try just to use longer texture, maybe even 4096x512, it is easy to compose by using Y trees textures. But for Y trees IDK, spieces to spieces yes, but different spieces - different tree texture should go anyway, I would think so.
     
  3. LilSKi

    LilSKi Active Member

    Joined:
    Apr 6, 2015
    Messages:
    311
    Likes Received:
    243
    No vertical subdivisions on the walls. Just 4 vertices per face. Also you don't need shadows on the walls usually.
     
  4. Kornepheros

    Kornepheros New Member

    Joined:
    Dec 12, 2018
    Messages:
    2
    Likes Received:
    0
    I am having problems with the "KSTREE_GROUP_name_number" feature. I have 493 trees, each as separate object in Blender, and named sequentially as follows:

    upload_2018-12-31_16-59-12.png

    When I load my exported FBX file into the ksEditor, I get the following results:

    upload_2018-12-31_17-6-9.png

    One of these "A" items is a (apparently random) set of trees that are correct. A few of the other "A" items are sets of trees with incorrect materials assigned. And all other "A" items are individual trees with a "FBX_MATERIAL" assigned as a material, which is not a material in my Blender file, appear black on screen, and cannot be assigned a texture within ksEditor.

    Things I've already tried:

    1. I have the same issue whether I use Blender 2.79 or Blender 2.8. (I love the changes in 2.8 by the way!)

    2. I have tried breaking the trees into small groups (KSTREE_GROUP_A_number, KSTREE_GROUP_B_number, etc.), but each of the groups display the same behavior. Maybe the groups have to be quite small? If so, does anyone know the limit? I've experimented with different quantities of trees per group, but have not been able to get anything to work, although I've had a few small groups (< 10 trees) work correctly.

    3. I have tried sequencing the trees using numbers 1-493 WITHOUT padding with zeros and WITH padding zeros, with no change to the behavior.

    4. I've looked for trees that might have an extra material assigned within Blender, but haven't been able to find any.

    One thing I also want to point out: In LilSki's tutorial screenshot of ksEditor, I notice that he has at least two of most groups listed under BLOCKTRANSFORM (for example he has two "A" items and two "B" items listed). How and why does this happen?

    Does anyone have advice that might help me solve my problem? My track is looking pretty silly with trees that look like this:
    upload_2018-12-31_17-18-26.png
     
    Last edited: Jan 1, 2019
  5. LilSKi

    LilSKi Active Member

    Joined:
    Apr 6, 2015
    Messages:
    311
    Likes Received:
    243
    They can't be multiuser objects on export.
     
  6. Kornepheros

    Kornepheros New Member

    Joined:
    Dec 12, 2018
    Messages:
    2
    Likes Received:
    0
    Thank you LilSki! I applied "Make Single User -> Object & Data", and it looks great now.
     
  7. LilSKi

    LilSKi Active Member

    Joined:
    Apr 6, 2015
    Messages:
    311
    Likes Received:
    243
  8. Patrice COte

    Patrice COte Member

    Joined:
    Jan 3, 2018
    Messages:
    22
    Likes Received:
    39
    Hi guys, trying to get my trees working on my first track.
    All good with 'single' panel Y trees, but weird shadow with split panel version.

    upload_2019-9-6_23-32-3.png

    Getting this in the editor (triangular shadow - should be smooth transition instead of pure black...):
    Got my naming OK and origin at the base of the object. Any suggestions?

    thanks in advance!!!!!!
    upload_2019-9-6_23-33-30.png
     
  9. Johnr777

    Johnr777 Moderator

    Joined:
    Jul 26, 2017
    Messages:
    309
    Likes Received:
    216
    Are the vertices welded?
     
  10. Patrice COte

    Patrice COte Member

    Joined:
    Jan 3, 2018
    Messages:
    22
    Likes Received:
    39
    Just tried it, manually merged all nodes of opposite faces to be 100% sure, still got same result in editor....

    EDIT: Double-checked... one was missing - now 1/2 faces are disapperaring when merged... Now I know where to look, thanks!
     
  11. Johnr777

    Johnr777 Moderator

    Joined:
    Jul 26, 2017
    Messages:
    309
    Likes Received:
    216
    Sorry man, I don’t use blender... so can’t help much. Hopefully one the blender wizards will see this soon!
     
  12. luchian

    luchian Administrator Staff Member Pilot RLR

    Joined:
    Jun 3, 2014
    Messages:
    2,449
    Likes Received:
    1,031
    Can you attach the file ? I will have a look. I need to monkey-click stuff, not good at guessing (..but if I had to, I'd look at: vertices, origin, normals).
     
  13. Bory123

    Bory123 New Member

    Joined:
    Feb 4, 2016
    Messages:
    6
    Likes Received:
    2
    Had the same issue.
    Just move the tree model origin slightly below the bottom vertex, also make sure the bottom vertices are on the same level by scaling on Z axis.
     
    Patrice COte likes this.
  14. Patrice COte

    Patrice COte Member

    Joined:
    Jan 3, 2018
    Messages:
    22
    Likes Received:
    39
    That was it!!!!! Just moved model 5mm lower, and bingo! Thanks a lot!!!!!!

    It works great for the leaves, but now I loose all the white of the trunk in the lower part... I'll try different height for the face split to get a better compromise.

    upload_2019-9-7_10-23-31.png
     
  15. Bory123

    Bory123 New Member

    Joined:
    Feb 4, 2016
    Messages:
    6
    Likes Received:
    2
    Great!
    And if you put the tree on the ground the trunk should be properly exposed.
    Since there is only single object on your screenshot the engine is exposing for highlights, so i think you're ok with the origin as is.
     
  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