Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: My observations on random trees  (Read 2191 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 1199
My observations on random trees
« on: December 03, 2014, 10:09:45 PM »

I recently got to re-working some map texture .tree.tga files. I wondered why fairly often a tree was not created where a white pixel was placed. It seemed to be hit-and miss.  So I tried an experiment. I placed a solid white square about 80 pixels wide in a .tree.tga. The trees thus created were arranged in a closely-spaced, perfectly uniform grid, with some number of empty spaces. Ah ha!

And so If I want to at least nearly guarantee a tree appearing in some number of particular locations, I place larger-than-single pixels at those places, a two-pixel line working well enough most of the time.

Incidentally, that tight crowd of dozens of trees would cause *all* tree shadows to disappear within a certain viewing distance, in the FMB at any rate. Therefore, beware trying to make super-dense 'mini-forests' via this method of placing monolithic white blocks in the .tree.tga.
Logged

Uufflakke

  • Modder
  • member
  • Offline Offline
  • Posts: 2078
Re: My observations on random trees
« Reply #1 on: December 04, 2014, 05:23:48 AM »

That should be common knowledge for mapmakers.
It is all written down by KevinP in his Texture tutorial.
Quote:
"The size of the white dots on the tree map should be no smaller than three
pixels otherwise the trees may not appear, even then there's a good chance of
not getting a tree."


Also shown in that tutorial is an image of a dense forest with open spots when making the .tree.tga completely white.
Qote:
You have to limit the amount of trees on the tree map. If you were to try &
have trees all over the texture by making the tree map completely white it
wouldn't work properly. The picture below shows the result.

Logged
"The Best Things In Live Aren't Things"

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 1199
Re: My observations on random trees
« Reply #2 on: December 04, 2014, 06:12:06 PM »

Well, there I go, reinventing the wheel! At least I'm delving in and finding stuff out for myself.

It would be nice if someone could divine the pattern of tree placement by type. I suspect such a pattern is universal. Then a mask could be applied when creating a .tree.tga so as to eliminate one or more of the four tree types.

For example, all trees of the coniferous type (lower right texture in the 4-panel "alteredbush" tree texture) could be located by their dots in a mask .tga. When this mask is overlaid on the .tree.tga being created, one knows where to not place white pixels so that conifers are not generated.
Logged

GilB57

  • Modder
  • member
  • Offline Offline
  • Posts: 377
    • Trucs & Bidules
Re: My observations on random trees
« Reply #3 on: December 28, 2014, 11:57:09 AM »

Quote
You have to limit the amount of trees on the tree map. If you were to try &
have trees all over the texture by making the tree map completely white it
wouldn't work properly. The picture below shows the result.

Another reason for that :
Every ".tre.tga-creator" has to know it: a too great number of generated trees may cause slow down then crash of game in on-line (maybe off-line) play.
There are warning message repeating in console : "warning, count = xxx" . I found that xxx is never under 512... it seems that more than 512 trees generated per texture unit (and viewed by player) generate the warnings and finally the crash (after around 30mn of flight).
I had to "darken" .tree.tga files to make warnings (and crashes) disappear...
Logged
Pages: [1]   Go Up
 

Page created in 0.011 seconds with 25 queries.