News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Blender trees

Started by Sarlock, August 31, 2013, 09:34:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sarlock

I have been buried deep in the bunker the past few months trying to refine my blender tree process.  I've gone through dozens of different designs and models trying to come up with something that fits all of my demanding criteria:
1) Looks good when scaled to 128x128
2) Doesn't have too many faces so that rendering is fast
3) Looks good from every angle
4) Is easy to port through GIMP to Simutrans (this was a major hurdle during my first designs last winter, it took up to an hour to convert from blender to Simutrans)

I'll let you decide on #1, but I think I have satisfied #2-4 on the list.  I can convert from blender to Simutrans in less than 1 minute now and get a great result.

Let me know what you think of this cedar tree.  I'm getting closer to my goal.  The tree colour doesn't quite match the other trees but it's also much truer to what a cedar tree does look like.  pak128 trees tend to be quite strong on the green side.

Current projects: Pak128 Trees, blender graphics

Sarlock

I took that tree and tried making a single-tile forest with it (coded as a res building since I wanted it centred on the tile).  Not bad.

Current projects: Pak128 Trees, blender graphics

Carl

That's really nice. It works well as a RES building, too, which is no mean feat, since doing things that way can often look too regular and geometric.

The Hood

I'd be interested in how your tree blends compare with the two I've used in pak128.Britain - I want to add a few more trees soon.

IgorEliezer

Quote from: Sarlock on August 31, 2013, 10:21:18 PM
I took that tree and tried making a single-tile forest with it (coded as a res building since I wanted it centred on the tile).  Not bad.
*pic*
Not bad, the forest either.

A thing I don't like in Simutrans (at least in pak128) is the way how the forests look: they look like a very rich tutti-fruit salad. All kind of trees in the same area (the 1st post's pic is okay, though). Pak128.Britain is a good example: the forests are pretty easy-looking, there's some kind of uniformity.

My opinion, don't kill me. D:

Sarlock

I absolutely agree, Igor.  That's one of my goals, actually.  A little variation in colour and tree type is good but as long as the forest retains a certain uniformity to a certain type of tree.  Combining 20 trees together makes it look, as you say, like a salad.  The other thing I dislike is the lack of forest cover: even at 4 trees/tile the forests aren't dense enough.

Hood, I tried using the sapling tree-maker addon for blender a lot but I could never achieve a tree that I was happy with.  Part of the problem is that the foliage would extend right to the trunk of the tree and not group at the ends of the branches like most real trees do, especially evergreens.  What I did then was create the tree manually but in a way that wasn't too labour intensive.  Using a tree picture that I wanted to model, I built the trunk and about 3-4 different types of branches along one axis.  I then took an alpha map that I assembled of a full branch of foliage and laid that out along the branches.  Once I set up a few branches then I would just copy those same branches and spin them around the trunk to create full coverage.



You'll notice that every single branch has the same image, just different sizes and rotated slightly.

I prefer to export a 32 bit (with alpha) PNG from blender at a higher resolution than 128x128, so I usually do 256x256 or 512x512.  I then load it in GIMP and reduce the size to 128x128 and then use a Threshold Alpha removal of around 40 or so (changes depending on what the final product looks like) to peel off the alpha channel, then add a second layer of the background colour for Simutrans and it's done.



I think I can still improve the post render result but it's getting much closer to something that makes me happy.  You're more than welcome to use any of the trees I create for pak128.Britain.  I'll provide the blends once I achieve a final blend that I am happy with.  Then you can just take them and apply the pak128.Britain blend filters/lights/etc to make it fit that pak's style.
Current projects: Pak128 Trees, blender graphics

Fabio

Awesome trees.

I think that instead of gimp you might want to try Imagemagick for post rendering, writing a script to authomatize the editing.

Sarlock

#7
I haven't used Imagemagick before.  I am only using GIMP for about 30 seconds, so it isn't that important speed-wise.  I prefer to image resize in GIMP instead of rendering a 128x128 image as I find that GIMP does a nicer job on resizing a small object.  GIMP also has a nice tool for quickly filtering out the alpha channel.

This is the same tree with and without an alpha channel to blend in to the background (cast against a white background):



Having to strip the alpha channel certainly makes the tree look more "blocky".
Current projects: Pak128 Trees, blender graphics

Sarlock

#8
Another experiment:





Added a few dead trees to the group, different sizes, etc.  Might vary a few colours a bit and see how that improves things.  And then, of course, different types of trees and different combinations of trees to break up the repetitiveness (though it looks pretty good for only one image).

[EDIT] Probably a bit too crowded, too...a few too many trees.
Current projects: Pak128 Trees, blender graphics

wlindley

Quote from: IgorEliezer on September 01, 2013, 11:39:13 AM
...in Simutrans (at least in pak128)... the forests look... like a very rich tutti-fruit salad.

Could this be mitigated by defining the various types of trees to occur only in certain climate-zones?

VS

Looking good! The forest works with one tree "as is", which exceeds my wildest expectations :D

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

IgorEliezer

Quote from: wlindley on September 02, 2013, 08:57:45 AM
Could this be mitigated by defining the various types of trees to occur only in certain climate-zones?
Long time no messing around with dats, so I can't answer. I think it's possible to set the climates where a certain kind of a tree will be generated, isn't it? But I don't know if it's possible to set the chances or probability of a certain tree to be generated within a climate-zone.

Combuijs

Quote from: wlindley on September 02, 2013, 08:57:45 AM
Could this be mitigated by defining the various types of trees to occur only in certain climate-zones?

Yes, it can. You can restrict trees to climates.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Sarlock

Yes, you can restrict per climate zone.  You can't define the distribution per specific climate zone but only for the group of zones that tree applies to... though you could create several .DAT files for the same .PNG and have one for each climate zone if you wanted to change the distribution for each climate zone.  The main reason for the "fruit salad" look is because there are so many trees for the mediterranean and temperate zones.  I released some changes to some of the temperate trees last winter and will be working on a bunch more over the next few months, hoping to address this very issue.
Current projects: Pak128 Trees, blender graphics

greenling

Hello Sarlock
The new tree make my flat to a flunder. :o
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

Sarlock

#15
Working on a beech tree.  Further refinements to blender technique... sapling addon does half decent leaves but doesn't do nice trunks, especially for more complex trees like an oak or a beech.  I manually created the trunk for this beech tree and then used a generated sapling set of leaves and did some manual work to make it fit nicely onto the trunk.

Posting a work in progress for a question to my fellow artists: I had lightly toyed with the concept of open holes in my trees while designing the birch tree in the first release last winter.  It is nice to be able to let the landscape show through the tree a bit but it is difficult to strike a good balance between small holes and being too sparse.

Using blender and playing with the alpha transparency removal settings in GIMP, I've generated a set of two different types of leaf-covered beech trees and one with the trunk only.  You'll notice that both the leafy trees and the trunk have pixels that are not directly connected to the tree and also have holes in the foliage to let the background come through.

I haven't done any post-blender editing to these trees except for alpha channel removal.  I can port from a blender render to viewing it in simutrans in about 20 seconds flat.



Let me know what you think with particular emphasis on the "holes" question.  Pay particular attention to the pair of leafy trees on the left: the tree in front is different than the other 4 leafy trees.  It has a much more "holey" section at the bottom right.  What do you think?  That section might be a bit too holey, perhaps.

Thanks!
Current projects: Pak128 Trees, blender graphics

kierongreen

Nice - both the version with less holes and the one with more :)

Fabio


greenling

Hello Sarlock
Your Painting´s looks very cool out.
Do you creat this tree as building?
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

Sarlock

It's created as a regular tree.  Would only take 30 seconds to make it a building though.

Thanks for the positive input, I'll continue to refine this tree and add it to my set of trees for release later this year.  Now that I have a good tree making process in place I will be able to make a lot of new trees.
Current projects: Pak128 Trees, blender graphics

VS

I think it's really nice :)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!