Jump to content
Sign in to follow this  
Kieme(ITA)

Some technical questions about trees rendering

Recommended Posts

Hi all,

 

I have been trying to mod trees for a long time, without success.

 

So, I'd like to better understand how these work, and I'd like to ask for your help, so please correct me if something is wrong.

 

When looking at the file database I see these three bmp graphic files (for each tree type):

tree-x-bark

tree-x-bb

tree-x-Leaves

 

From what I understand now:

using the taller darker tree as reference

tree-x-bb is a 2d texture used to render the tree at long distances:

2py74o7.jpg

 

tree-x-bark and tree-x-Leaves are used at close/mid distance to render the 3d tree:

2a9pttl.jpg

 

Now, this happens when I reach a certain distance from the tree, the texture somewhat changes again, and I can't tell what happens, please note the different trees of the first line with respect to the previous picture, as they get a somewhat different tone (while some trees of the background retain the previous aspect):

3533wuu.jpg

 

So, what happened there?

Do the trees have a sort of "scaling back" or different LODs? Not sure If I am using techical terms correctly, sry I am not an expert.

 

When modding, any kind of graphical replacement I apply to the tree-bb file doesn't seem to be recognized.

Is tree-x-Leaves the main (only?) file that matters when I want to change the visual render of a tree? (given that it wil keep the original shape and dimensions)?

 

Thanks in advance for your help

Edited by Kieme(ITA)

Share this post


Link to post
Share on other sites

I did the trees! I did the trees!  :D:P

Oh man, let me remember how it works.

 

Take the first tree for example.

"tree-1-bark.bmp" is obviously the bark, the trunk, the larger branches. 256x512 pixel art. Nothing special there.

 

"tree-1-leaves.bmp" is a leaf cluster attached to a branch. This uses a knockout channel  to create the individual leaves. 1024x1024 pixel art.This knockout channel is special in that it accepts greyscale feathered edges to the knockout art. Usually knockout channels need to be hard-edged binary B&W.

 

'tree-1-bb.bmp is the greatly simplified LODs art for the tree, the whole tree boiled down to a 512x512 pixel image. This art also uses a knockout channel but unlike the leaf art this uses the KO channel that requires hard-edged B&W art for the knockout. One speck of grey in the knockout channel and the art won't appear on the map.

 

If you see the tree changing several times as you pull back that's because there are multiple tree LODs (perhaps four?) with differing detail. There's the close up 3-D tree, and intermediate simplified 3-D tree both using the high rez art. Then it switches to the simplified art. There's also a new setting starting with CMRT where you can really turn down the tree detail for higher framrate on huge maps. I'm not sure what's involved with that. Still uses the same art, though.

 

When you see tree coloration abruptly change that's because the ambient light strikes a single LODs image differently than a tree made of multiple transparent layers. In the morning it'll appear dark, in the early afternoon it'll appear lighter, under clouds its something else. So you can't quite adjust the LODs trees to be a 'prefect match' under all conditions. We got pretty close, though!  :D

Edited by MikeyD

Share this post


Link to post
Share on other sites

Is this the secret thing where it's out but the people who ordered the mailing version got the notice about downloading it and everyone is keeping it a secret until GodKnowsWhen so people like me can just get the digital version?

Edited by heyhellowhatsnew

Share this post


Link to post
Share on other sites

Nah. in CM trees is trees. CMFI, CMRT, CMBS. They're all built about the same way... more-or-less. CMBS actually reuses CMRT foliage because... well, because Ukraine and Poland are the same biozone!  Birch and spruce. Its not as though we're suddenly fighting In Vietnamese rice paddies.  :)

Share this post


Link to post
Share on other sites

Can I request that if anyone is thinking of modding trees could we have some with whitewashed trunks?  I've seen them a lot in pictures of Ukraine and Russia usually along the roadside with the first 5-6ft of trunk painted completely white (see here) .  I initially assumed it was were to stop cars hitting them at night, but apparently it's to do with reducing their exposure to extreme temperature changes in the spring by reflecting some of the heat away from the bark.  Freezing night time temperatures and rapid heating during the day cause them to ooze sap which then freezes and damages the trunk letting in disease.  I suppose they don’t want trees by the road to keep dying en masse and block the roads.  I think it would really help add a touch of realism.  I haven’t tried modding since CMBO and am still getting my head around windows 8 so it may take me a while to have a crack at it myself so in the meantime I’d appreciate it if someone would consider it.  Cheers :)

Share this post


Link to post
Share on other sites

I like all the original CMRT trees a lot; moreover, the fact that I didn't notice the multiple LOD (I would have said 1 or 2 max, instead they are be more) means only that they do their job very well.

 

Anyway, I am trying some tree modding just for the sake of trying; there are some trees too saturated in color in my opinion, but it's just a personal taste and it's easy to modify. As regarding the 2d model, for long distances, I have since now checked trees 1 to 3, and the only one that fits a bit less is the number one. Generally, I also tried to mod such 2d versions by making them a bit more desaturated and a bit less bright, if the fitting improved by any means is really very hard to notice.

Although I have the impression that if the 2d textures (or paintings?) could have a bit less of "noise", so to say, they would fit a bit better.

 

 

Update:

I belive there's something wrong with tree number 5.

I changed some values, yet as it was for the vanilla textures, there seems to be something wrong with the very first LOD change, as you can see here:

33u90rm.jpg

 

I didn't see such a strong difference with trees from 1 to 4, tree number 5 shows what appears to be a much darker version with the first LOD change, you can see where the LOD changes by looking at the distant terraint Tiles, which are more different than usual from the closer ones because they are not modded as the closer ones [i didn't mod the mini Tiles] (so the impact of LOD change is stronger there for a reason), yet the tree should be more similar.

Edited by Kieme(ITA)

Share this post


Link to post
Share on other sites

Another update, this time on tree number 6 (the same situation on number 7 and number 8, but thinking of it I will re touch all trees for this reason):

 

the vanilla 2d version is very different in color:

2zozt00.jpg

Appears really much more saturated.

I managed to solve the issue by desaturating a lot and adding some more brightness, still not exactly the same:

xonqzn.jpg

Edited by Kieme(ITA)

Share this post


Link to post
Share on other sites

A view from Orsha master map 5 (please ignore the terrain issues, modding in progress), showing the intensity of the effect on a large forest of similar trees:

 

Vanilla:

hueseb.jpg

 

Modded:

sf8dc2.jpg

 

 

Sorry to hack CMBS forums with CMRT related things, but I belive that CMBS will show the same issues if the trees get ported.

Share this post


Link to post
Share on other sites

Maybe a tagged mod for trees in a city environment would do that, but the bark texture is also used for the branches, so I am not sure of the result.

Ah, didn't think of that, worth knowing though.  Thanks anyway.

Share this post


Link to post
Share on other sites

A view from Orsha master map 5 (please ignore the terrain issues, modding in progress), showing the intensity of the effect on a large forest of similar trees:

 

Sorry to hack CMBS forums with CMRT related things, but I belive that CMBS will show the same issues if the trees get ported.

 

Outstanding effort to eliminate that "transition line".

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...