Jump to content
Official BF Editor Forums
[BF:A]Ga-Knomboe

Making overgrowth darker; Overgrowth Shadow Map.

Recommended Posts

This is a very simple tutorial. I personally have a much longer way of going about this procedure but, it is only useful if you have a map that is 1024*1024 or above in size, and a great deal of overgrowth is in shadow. Moreover it requires a number of different tools, and you will want to come back into the editor to make sure everything is good. I will probably write this second tutorial if any mods ask me to. The advantage of this longer and somewhat more annoying way of making the overgrowth shadow map is that it will reflect the shadows on your terrain almost flawlessly, and you will instantly have the shadowmap done for the entire map. Anyway, enough of discussing possible future tutorials, here is the tutorial at hand.

This tutorial will show you how to make particular trees darker in your map. The topic has been discussed before so I am surprised no one has bothered to write up a quick tutorial. All you will need is your map, and the editor. Whenever I refer to "the picture below" I am referring to the picture in the link below the paragraph.

First things first, load up your map in the terrain editor.

*After this, go into the overgrowth mode, expand the overgrowth properties tab, and select "ShadowMap". The tweak tab should display another box that says "ShadowMapColor". Like so in this picture;

http://img376.imageshack.us/my.php?image=15ni.jpg

**Once your screen looks like this, depending what your map looks like. Go into the render tab at the top of the screen, and select "Overgrowth ShadowMap Mode". Like so in this picture;

http://img287.imageshack.us/img287/1332/29gp.jpg

***After selecting this render mode your map will then go white. This is a picture to show you what mine looks like as I have already done some overgrowth shadowing. It is slightly confusing at first because there is no grid, so you might paint in the wrong place - especially as the terrain will be white. I suggest you turn on render overgrowth and static objects. Anyway here is a picture of my overgrowth shadow map after changing to this rendering mode it was made with my longer procedure which is why it reflects the terrain shadows.

http://img121.imageshack.us/img121/3977/36ks.jpg

****Anyway, now to painting! The number in the tweak tab next to ShadowMapColor is the color you will paint. The overgrowth map is a greyscale raw picture 255 means 255 red, 255 green, and 255 blue values. Because r,g,b are at equal values you will go through shades of grey from black to white. As such it is white (since 255 is as high color values will go, at least with standard 32 bit coloring). In consequence black is 0. As shown in the picture below. Personally I think you should use 60-100 for overgrowth shadows, as 0, will make the tree a simple black. The brush tab on the right is now used to set the size of your overgrowth shadow color brush. You paint as you would normally in the texture mode, undergrowth, or overgrowth mode.

http://img410.imageshack.us/img410/922/60op.jpg

***** To save progress with the overgrowth shadow map simply save overgrowth, like so in the picture below. After painting you won’t immediately see the difference, however if you reload the editor you should be able to see the difference.

http://img494.imageshack.us/img494/1198/51ed.jpg

Something you should note is that, since the overgrowth shadow map is a 2d texture the entire tree will be dark, so if the top of the tree should be lit up but the bottom should be shrouded in darkness you might have a problem. Personally I feel you should set the light according to the most visible section, for instance, the top of a palm tree.

I hope this tutorial helps. Sorry I wrote it in a confusing manner.

Share this post


Link to post
Share on other sites

I'm trying to apply a shadowmap to a 512 size map converting alpha channel of groundhemi.dds to 8bit greyscale (boost on brightness/contrast for shadowmapio) but I can't get it to show correctly ingame: if I use a 1024x1024 shadowmap there is a weird flicker (right since the format is wrong) and if I set it to 512x512 there is no shadowmap at all (veichles don't get shadowed by statics corretly).

Anyone has a clue on this?

Share this post


Link to post
Share on other sites

fixed, for some weird reason I had to invert io map and now shadows are projected correctly.

Edit: I went a bit naif on this, now I got it how it works: simpleshadowmap.raw is the actual static_to_bundlemesh shadow map while simpleshadowmapio.raw triggers the effect on or off (white=on) so you want it to be all white execpt on area of buildings that can be accessed on the roof.

Case closed.

Further note to get back on topic, to generate overgrowth shadowmap without merging terrain Lightmap tiles you can convert groundhemi alpha to greyscale, add 1 pixel to imagesize and flip it vertically. Some brightness/contrast tweaks are still needed but it's fast at least.

Share this post


Link to post
Share on other sites
fixed, for some weird reason I had to invert io map and now shadows are projected correctly.

Edit: I went a bit naif on this, now I got it how it works: simpleshadowmap.raw is the actual static_to_bundlemesh shadow map while simpleshadowmapio.raw triggers the effect on or off (white=on) so you want it to be all white execpt on area of buildings that can be accessed on the roof.

Hi Khrimson, you bailed me out on the Ground Hemi thing (thanks again for that) but I need your help again. You are the only one here who seems to know about this. Can you explain some things further for me?

1) Is the editor suppossed to Generate simple shadow maps automatically? (with lightmaps or groundhemi?)

2) If not is there a way to make the editor do it?

3) If not 1 or 2, what is the correct way of making them manually?

I have looked at some Vanilla map versions, and it seems simple enough. I created my own using the greyscale image from my Groundhemi Alpha channel, but vehicles & soldiers still appear unshaded when they should be in the shadow of terain (most of the static objects do cast shadows onto vehicles and players fine, but the ones in terrain shadow don't seem to).

:arrow: When you say Invert the IO map, does your's now look mostly black with white areas for exceptions (opposite to the Vanilla map ones for SimpleShadowmap?) :?:

Share this post


Link to post
Share on other sites

hey Ga-Knomboe any chance of the extra tut to show me the more professional way to do this? cheers :)

EDIT: dont worrie about the long tut, ive worked out my own way of getting it looking real sweet. Its looking really, really nice now :)

thanks for this tut :)

Edited by Rhino

Share this post


Link to post
Share on other sites

also i looked at a buch of the stock maps overgrowthshaddowmap, and the 1s i looked at (oman, stalemate) where blank. Any reason for this?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×