• Dear visitors,

    The email issue has been finally solved.
    Thank you for your patience and happy browsing.

    Team ACM.

SHADER setting-up trees

LilSKi

Well-Known Member
Hmm, probably would work, haven't thought about that, though IDK if it is necessary for trees, they are usually rather similar in colors, grass varies a lot more. Maybe it depends.

No I didn't meant single plane trees as a tree wall. But it could be an option in some cases when there are many sparse trees in distance, like in Magione.
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.
 

mantasisg

Active Member
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.
 

Kornepheros

New Member
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:

Patrice COte

Active Member
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
 

Patrice COte

Active Member
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!
 

luchian

Administrator
Staff member
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).
 

Bory123

New Member
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.

View attachment 3608

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!!!!!!
View attachment 3609
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

Active Member
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.
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
 

Bory123

New Member
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.

View attachment 3610
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.
 

Patrice COte

Active Member
Hi guys,
I'm stuck again with a weird bug with my trees.
The ALPHA channel is messed up (or so it seems). Basically, any transparent face locate BEHIND the tree will be drawn in front (including face of the Y tree on the oppposite side).
So you can see small far away trees overlaid in front of nearby trees, or even building windows, track lines.

I haven't found anything anywhere on the forums about similar issue.

Capture_messed_up trees 3.JPG


Capture_messed_up trees 5.JPG


Capture_messed_up trees 7.JPG


Capture_messed_up trees 8.JPG


What I did so far:
- All trees (8 variants) are on one single texture, DDS DXT5, no mipmaps (with or without, same results)
- In Blender, all trees object and data are single user (particle system converted to mesh)
- All trees object (Y shape) are derived from same base mesh the was scaled.
- One or 2 individual trees combination are OK, and do not have the problem. Meaning for instance the number 7 will always show up on top of number 1 (as it should), but other types will show thru number 7.
- Shader ks_tree, with typical settings
- Object named with KS_TREE scheme (blocktransform seems to work just fine during import). Apart from that bug the trees look as expected (I think).

My conclusions so far,
A- it looks like it's not the texture itself (dds file), some trees are OK some not, but they have the exact same material and image applied.
B- No shader settings changes the result. Even with opaque blend (no alpha blend) this problem remains the same. Probably not the shader then.
C-I suspect a FBX export or Import issue (or Blender setting??)

Any help or suggestion would be really appreciated (entire forest of trees and shrubs waiting!)
 

Patrice COte

Active Member
Ok, thanks! I'll change that. No impact on transparency issue unfortunatly.

If it would help I can make available a small FBX or .BLEND file with a few trees if someone what to check it out.
 

Johnr777

Moderator
Ok, thanks! I'll change that. No impact on transparency issue unfortunatly.

If it would help I can make available a small FBX or .BLEND file with a few trees if someone what to check it out.
Like LilSKi said, alphatest is a must... Also you have the "IsTransparent" setting set to "True" in the object tab, try setting it to "False"
 

Patrice COte

Active Member
yes... object were all set to "true"....... and false solves it all.
*really* feeling stupid at the moment. But now I can move forward!

Thanks!
 
Top