The International Simutrans Forum

 

Author Topic: Some questions about trees  (Read 13281 times)

0 Members and 1 Guest are viewing this topic.

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Some questions about trees
« on: September 27, 2012, 05:49:27 AM »
Hi all,
I have been tinkering with graphics in Pak128 for a couple of weeks now and I have decided to tackle some trees.  I notice that most trees do not have a snow option available, though I see some old discussions about it dating back to 2006 in the old forum archives.

Question 1: There were some snow tree submissions at the time yet I do not see those as part of Pak128 as it exists now.  I'm curious to know why!

Question 2: I developed a douglas fir tree concept and I ran in to a curious problem.  The tree is about the same size as the mountain spruce that is in the game, done by Shunter, and I see that its placement is considerably higher than that which I can achieve.  To demonstrate:



The douglas fir is the design that I drew, located at the bottom of the 128x128 grid.  When placed in-game, I find that it will sometimes land on top of roads and such because it is placed too low in the 128x128 box.

When I look at the mountain spruce drawn by Shunter, I see that it is located considerably higher than what I am able to achieve with a 128x128 box.  How did the tree get moved up so far in the image so as to appear to be larger than 128x128?

I'm sure there is an easy explanation for this, but once I can figure this out then my tree will work as designed without it falling on to roads and other objects.

Here's my douglas fir as I currently have it designed so far, input/comments/critiques welcome!



Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #1 on: September 27, 2012, 05:52:11 AM »
Oh, another thing I've noticed:

When following a vehicle at standard zoom (1:1), the grid pattern of the tree shadow creates an awful effect, almost like blinking, as the vehicle moves along and the shadow is continually advanced with the background.  Anyone else notice that?  When zoomed out to 2:1 or so, it looks fine because the shadow merges in to a solid black shape and doesn't have the broken grid pattern at standard zoom.

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #2 on: September 27, 2012, 06:05:09 AM »
I've made some headway on an answer to question 2:

I see from the .DAT file for some trees there is additional information given in the Image= parameter:

image[0][0]=tree131.1.0,6,-22

I wasn't aware of being able to add the last two numbers to the end.  I assume these represent some sort of image offset.  Can someone enlighten me as to what these values represent?  I can't find them anywhere on the Wiki.

Thanks!

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #3 on: September 27, 2012, 06:10:11 AM »
Aha, I figured it out... as I suspected, it's an X/Y offset value to position the tree from the original 0,0 location that it would normally be placed at.  A negative Y value pushes the tree up higher in the grid.

So that answers that question... now just curious about the lack of snow/5 season trees in the Pak.  I'd be happy to help develop some if we're lacking in this department.

Offline Roads

  • Devotees (Inactive)
  • *
  • Posts: 645
Re: Some questions about trees
« Reply #4 on: September 27, 2012, 08:10:06 AM »
Sarlock, I can't help with any of the tech questions you asked but looks like you have figured it all out on your own.  Just wanted to say the tree looks great!  The snow effect I'm not just crazy about but apparently creating snow on trees and making it look perfect is something only God can do.

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Some questions about trees
« Reply #5 on: September 27, 2012, 01:54:44 PM »
First... welcome! Impressive introduction, never mind the quadruple-posting ;D You already answered the technicalities yourself, so no need to comment there.

Trees look great, as well as snow.

Quote
There were some snow tree submissions at the time yet I do not see those as part of Pak128 as it exists now.  I'm curious to know why!
???

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4564
  • Languages: EN, DE, AT
Re: Some questions about trees
« Reply #6 on: September 27, 2012, 02:27:55 PM »
Aha, I figured it out... as I suspected, it's an X/Y offset value to position the tree from the original 0,0 location that it would normally be placed at.  A negative Y value pushes the tree up higher in the grid.
Just make sure that the tree starts at approximately x = 64, y = 96 within the 128 x 128 box after applying these offsets.

The program assumes that the images of the trees are centered on a tile.

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #7 on: September 27, 2012, 02:36:36 PM »
Excellent, thanks for the info!

I refer to an old forum archive post I found about building snowy trees (there are a few more, but this is the best one):

http://archive.forum.simutrans.com/topic/03585.0/index.html

I suspect that the project was dropped as mentioned by Roads... almost impossible to draw a snowy tree.  It took a lot of work to get what I had (I probably drew every individual pixel 10 times or more) and I agree, it's still not right... the first thing I noticed was that you cannot simply paint white/light grey over an existing tree as it makes the green underneath look really out of place.  I had to change most of the tones to a grey/grey-green/grey-green-blue and add more deep shadows to make it look less strange.  Taking a look at the pixelation of many snow-covered tree images was what led me to this realization.  Partially this is due to the brightness of the snow causing your eyes/the camera to decrease the intensity of the branches/foliage underneath.

I'll keep working on the snowy tree, I'm determined to make it work... it would be really nice to get Pak128 up to speed with a full slate of snow images.

Offline Roads

  • Devotees (Inactive)
  • *
  • Posts: 645
Re: Some questions about trees
« Reply #8 on: September 27, 2012, 03:22:51 PM »
What you are saying makes a lot of sense and is counter intuitive.  It seems like the thing to do - take a green tree and put white snow on it.  After all that is exactly what happens in nature.  Looks like what you came up with will work much better - make the tree out of the shade color and add the white and the green.

I'm not sure that gray is an ideal shade color.  Years ago when I did some canvas painting, we used burnt umber (brown) to shade white.  I'm thinking a very light gray/blue might work better for snow.

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #9 on: September 27, 2012, 04:31:49 PM »
It's interesting to look at the pixel structure of some close-up shots of snow covered trees:



The first thing to note is that there is hardly any actual "green" in this picture.  The tree I built has a lot of grey-green in it, but I think I need to be a bit more radical and include a bit more red in to the pallet and be even more aggressive with the deep shading beneath the snow-covered branches.

It's what the eye perceives, not what is actually there that counts.  When all of the pixels in an area are brought together by the eye/brain and amalgamated, the brain then interprets what it sees as a whole against what it has seen in memory from past pictures and visual experiences.  The brain will fill in the blanks if it accepts the blob of pixels to be what it perceives it to be... otherwise it will reject the image as incorrect.  The trick is to get the blob of pixels to look good enough to convince the brain.

Offline greenling

  • Lounger
  • *
  • Posts: 1728
  • Simutransarchology it my hobby!
  • Languages: DE,EN
Re: Some questions about trees
« Reply #10 on: September 27, 2012, 05:09:23 PM »
Sarlock
The Trees Look very good out.
And the trees in Winter look good out. :thumbsup:

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #11 on: September 27, 2012, 06:10:37 PM »
I've done a bunch of work on my first two snowy trees, adding more shadows/deep browns, shrinking the size of each snow patch, removing a lot of the greens and replacing with grey/green hues as well as making the snow a lot more varied in hues, adding light blues and greys.  I had to do it all by hand to make it look right, one pixel at a time.



Tell me what you think.  Only the first two trees have been edited, the next 3 in the sequence are unchanged.  If I'm on the right track, I'll update the rest of the sequence in the same manner.

« Last Edit: September 27, 2012, 07:01:06 PM by Sarlock »

Offline Roads

  • Devotees (Inactive)
  • *
  • Posts: 645
Re: Some questions about trees
« Reply #12 on: September 27, 2012, 09:31:54 PM »
Seeing a bunch of them in the same shot, they look great, great, great!  Individually, I think the first one in the shot looks better than the second.  In the second, the dark looks kinda like it has continuous lines.

But...those...are...awesome!

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Some questions about trees
« Reply #13 on: September 27, 2012, 09:58:10 PM »
Hmm, I'd say even less green? Torturing you with opinions does not sound like a good introduction for me, though :D

Still... https://www.google.com/search?q=aerial+view+snow+forest&tbm=isch

It's what the eye perceives, not what is actually there that counts.
Absolutely!

Regarding offsets, I have a program for aligning trees interactively, so no need to spend time on that :)

Anyway, this is awesome :)

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #14 on: September 27, 2012, 10:28:15 PM »
I appreciate the input!  No sense in getting it only half right.

I'll play with them a bit more tonight and see if I can further refine them.  Good to know I'm on the right track, though...we'll figure out these snowy trees one way or another!

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #15 on: September 28, 2012, 02:02:44 AM »
Attempt #4:



First two trees... almost all of the green is gone now, I've tried to remove the "lines" in the black and added more detail to the snowy sections.

Offline Roads

  • Devotees (Inactive)
  • *
  • Posts: 645
Re: Some questions about trees
« Reply #16 on: September 28, 2012, 05:59:18 AM »
I think you've got it!  Number 1 still looks better than number 2 to me but you have gotten rid of those continuous dark lines.  I think your original idea should not be totally discarded.  If you look closely at number 1 it looks like some limbs are fully covered with snow much like 3, 4 and 5.  That looks more like it does in nature where you have some limbs completely covered and some not.

Now if my posts are of no benefit to you, please tell me and I'll stop.  You have done great and I certainly do not want to discourage you in any way. 

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #17 on: September 28, 2012, 06:03:40 AM »
I appreciate the input, the more comments the better!  I thrive under constructive criticism.  I appreciate honestly.  My goal is to make these trees worthy enough of inclusion in the pakset and then be trusted to move on to the other trees one at a time and modernize them for all "5" seasons.  I'll await further comments on the first two tree/snow designs and then finish the other three after that and then we'll see where we go from there.

Offline greenling

  • Lounger
  • *
  • Posts: 1728
  • Simutransarchology it my hobby!
  • Languages: DE,EN
Re: Some questions about trees
« Reply #18 on: September 28, 2012, 12:09:30 PM »
Sarlock
The Trees get a better and better look.

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Some questions about trees
« Reply #19 on: September 29, 2012, 12:12:25 PM »
Are the graphics in first and second row identical? (Or meant to be - just two working versions?) I'm asking because Simutrans trees can have only some numbers of seasons - 1 (all year), 2 (snow on/off), 4 (seasons), 5 (seasons + snow). Of course the system can be played by selecting the higher available count and reusing same graphics for some "seasons" :)

ref:
http://simutrans-germany.com/wiki/wiki/tiki-index.php?page=de_TreeDef



I'll try to get this into game to see it with my own eyeballs ;)

Offline Carl

  • Devotee
  • *
  • Posts: 1571
    • Website
  • Languages: EN
Re: Some questions about trees
« Reply #20 on: September 29, 2012, 12:16:26 PM »
The second row appears to be slightly lighter than the first, I think.

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Some questions about trees
« Reply #21 on: September 29, 2012, 12:30:24 PM »
Never mind - tried the snowy variant in game and I think it's perfect. Certainly incomparable to other attempts, and I can not offer any constructive criticism from now on :)

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #22 on: September 29, 2012, 03:41:45 PM »
You're correct, the second row is slightly lighter.  From a seasonal perspective, douglas fir trees grow new shoots in the spring which are a lighter green colour and then slowly fade back to the regular darker green through the summer.  It's the only seasonal colour difference they experience.  The second row is for the spring season, the first row is for the other three seasons.

Thanks for the input everyone, I'll finish the younger trees for their snow version and then see about tackling one of the existing trees and see what happens.

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Some questions about trees
« Reply #23 on: September 29, 2012, 05:01:11 PM »
Sounds good! Do you know how to get the sources?

By the way - someone created a shadow pattern that should not break so easily when zooming. I'll try to locate it... edit: http://forum.simutrans.com/index.php?topic=6362.msg61245#msg61245

Also, I have some unsorted resources for the trees from pakset (mostly original images before inclusion, pre-renders and that stuff). If you're interested, I'll email these to you.
« Last Edit: September 29, 2012, 05:31:05 PM by VS »

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #24 on: September 29, 2012, 06:33:14 PM »
I've accessed all of the source files from Sourceforge, so I have everything I need.

I'd love to have access to the other stuff, feel free to email it my way: sarlock@elvenorder.com

I'll also try that shadow pattern and see how it works.

Thanks!
« Last Edit: September 29, 2012, 08:14:19 PM by Sarlock »

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Some questions about trees
« Reply #25 on: September 29, 2012, 07:17:10 PM »
Ah! Sorry! I thought you would understand that I could get the email easily as admin :) I deleted it from your message since you might not want it "in the open". If you're still comfortable with that, just edit it back in...

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #26 on: September 29, 2012, 08:12:38 PM »
I don't mind, it's a fairly public email address anyhow from other games I've played in the past.  Thanks for the consideration, though!

Here is the next incarnation of the douglas fir tree, I've edited the 3 smaller sizes to add snow as well:



Here are the trees placed in the game, pre-snow, with snow at the top height and snow for the whole area:







Let me know what you think of the last three snowy trees and whether I should make some minor/major changes.

Thanks!

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #27 on: September 30, 2012, 03:09:18 AM »
I just realized something... tree placement tool vs. forest placement tool:



The tool to individually place trees puts them in to a set grid pattern while the forest placement tool is much more random (and natural-looking) in its placement.  I had to remove all of the tree paksets from my folder except the douglas fir one in order to lay down a pure douglas fir forest.

Has anyone else noticed this?

Offline Roads

  • Devotees (Inactive)
  • *
  • Posts: 645
Re: Some questions about trees
« Reply #28 on: September 30, 2012, 03:18:22 AM »
At risk of being labeled a nit picker...the trunks of the trees look a little too solid color to me.  It is more noticeable with the snow than other seasons.  It might just be that the trees are taller or the trunks more visible than other trees but I actually like the trees being tall.  It gives more variety...

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1323
Re: Some questions about trees
« Reply #29 on: September 30, 2012, 03:54:43 AM »
The tool to individually place trees puts them in to a set grid pattern while the forest placement tool is much more random
Indeed... Try w/ r5960.

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #30 on: September 30, 2012, 05:42:12 AM »
Thanks, TurfIt :)

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Some questions about trees
« Reply #31 on: September 30, 2012, 11:41:21 AM »
Tall is not necessarily bad. Comparing the trunk to other trees, it seems very massive, though...

Looking at the tree next to a vehicle might help?

Offline Roads

  • Devotees (Inactive)
  • *
  • Posts: 645
Re: Some questions about trees
« Reply #32 on: September 30, 2012, 07:28:32 PM »
Right VS, tall is not necessarily bad.  In fact I think it is very good because it gives variety to the trees in a new way and also it is actually more like what happens in nature.

I think the trunk just needs some shading so it doesn't look so flat.  This is something you do in canvas painting all the time.  I could try shading one if you like but I'm much better with a brush and paint than I am with a cursor at this point.

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: Some questions about trees
« Reply #33 on: September 30, 2012, 10:29:04 PM »
I'll try a few ideas with the trunk and see what you think... it was initially darkened because I darkened the entire tree for the snow shots, but in reality that would be in full sun and be brighter.  I'll toss out a couple of ideas and see what you think.  :)