• Dear visitors,

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

    Team ACM.

QUESTION Tree are (buggy / weird)

Tino14

Member
Hello, I have a little problem with my trees.
I started with a small part then I exported them to kseditor and tested in games and I had no worries at all, so I continued until I made more than 9000 trees and that's where it happened my worries.
Not having the possibility to export all the trees at the same time 9000 seems quite big to me so kseditor crashes (I think, it may be another problem) So I joined all the trees together for the first time on blender , then I separated them by materials to make the famous KSTREE_GROUP_A so I gathered all the trees with the same materials then I renamed them KSTREE_GROUP_A , KSTREE_GROUP_B... Knowing that during the first try when the trees worked I had not only two groups for 5 materials, Once finished I exported them to kseditor.
And that's where my problem arises, I wouldn't explain too much, but the trees have very special lighting, the trees on the right side have no reflection and those on the left side have huge reflections (see photo below) .
So I have to remove the Ksdiffuse to 0 so that all the trees are the same texture but suddenly when we change the weather on the game the trees are too bright, others not enough, others too bright...
also I have the impression that are my detailed or something of the style but really less clean than on the first version.
If someone could tell me where the problem is coming from, it would be super nice. Have a nice day.
upload_2023-5-5_0-18-45.png



Without Ksdiffuse

upload_2023-5-5_0-20-0.png


With KSdiffuse in-game

upload_2023-5-5_0-31-17.png
 

fughettaboutit

aka leBluem
"the trees have very special lighting"

if you then do the KS_TREEGROUP thing - you should know that your custom normals get lost!

ksEditor will make new normals for the trees!
 

fughettaboutit

aka leBluem
oh you are using "," as decimal-separator? is this correct? here on my pc i have to use "."

those are some reasonable values for ksTree shader:
upload_2023-5-5_7-0-19.png
 

Tino14

Member
I started with a presset with no knowledge so I continued like that, okay I guess to look at an example I went to shader.ini. And yes indeed I did not know that the texture will be reset to 0 after changing the kstreegroup, how to put them back to original? Using shader.ini? Yes I use the modified version of kseditor (kseditorAT) the software uses "," compared to Normal which uses ".", its working for the values thank you.
 

fughettaboutit

aka leBluem
to avoid ksEditor making changes, just dont use KS_TREEGROUP naming scheme, that is just meant for this "auto-normals" stuff ... you should combine all the trees yourself then or they are still all single objects, which hurt performance!

also ksSpecular should be 0.0 for trees, makes a huge difference too!
 

Tino14

Member
Ok okay so I'll try to name them differently, but what's special is that before he was fine with this naming. so maybe they will just be different with or feel but I have to try, in a little hour. Yes I always put it to avoid unnecessary sun reflections on the tree. the KSspecularEXP, what is it for exactly because I don't touch it too much but you put it at 50 for what reason?
 

fughettaboutit

aka leBluem
I started with a presset with no knowledge so I continued like that, okay I guess to look at an example I went to shader.ini. And yes indeed I did not know that the texture will be reset to 0 after changing the kstreegroup, how to put them back to original? Using shader.ini? Yes I use the modified version of kseditor (kseditorAT) the software uses "," compared to Normal which uses ".", its working for the values thank you.
are you sure?
this is not an "error" per se, this value
upload_2023-5-5_10-50-47.png

is interpreted as 5.0 (at least on my system)
upload_2023-5-5_10-52-23.png

which indeed should be a 0.5!
upload_2023-5-5_10-53-4.png
 

Tino14

Member
Ah on my side I assure you it's a "," surprising but yes as soon as I went to the kseditor to modify the "." didn't work and the original values were with "," ducoup I use the "," otherwise as you said instead of 0.5 it puts me 5. I was talking more about the KsSpecularExp which is at 50.
 

Tino14

Member
So I carried out a test with your parameters, the trees have indeed better textures, but I have the impression of noticing the difference between the different sides of the tree.
upload_2023-5-5_11-52-4.png
upload_2023-5-5_11-52-14.png
 

Tino14

Member
Damn how can I change the shaders ducoup I searched I can't find shader.ini in my folder or even other map?
 

Tino14

Member
Infact I have more the impression that part of my map is not well lit by the sun, because even the roads are not lit while the sun is in the middle, and at tree level everything is good in all points...
 

Ryno917

Member
Ok okay so I'll try to name them differently, but what's special is that before he was fine with this naming.
From my understanding the KSTREEGROUP takes the individual tree objects, applies a spherical normals setup them individually, and then groups all the same tree names into a block group.

By grouping trees into a single object in Blender and then giving it a KSTREEGROUP object name, what you're getting is a spherical normals application to the entire object of multiple trees, rather than to each individual tree. That would probably be why all the trees on the left are illuminated while the ones on the right are all in shadow.

You need to either use KSTREEGROUPs as intended, or create your own custom normals in Blender. IIRC Lilski made a post about making your own custom normals for trees instead of using the group, but I don't know if he still uses that on his own projects at this point.
 

Johnr777

Moderator
From my understanding the KSTREEGROUP takes the individual tree objects, applies a spherical normals setup them individually, and then groups all the same tree names into a block group.

By grouping trees into a single object in Blender and then giving it a KSTREEGROUP object name, what you're getting is a spherical normals application to the entire object of multiple trees, rather than to each individual tree. That would probably be why all the trees on the left are illuminated while the ones on the right are all in shadow.

You need to either use KSTREEGROUPs as intended, or create your own custom normals in Blender. IIRC Lilski made a post about making your own custom normals for trees instead of using the group, but I don't know if he still uses that on his own projects at this point.
Yeah he does, I also use a similar technique on bushes and smaller vegetation.

The trick is to transfer normals from the sphere on to the intended tree mesh
 
Top