Page 1 of 1

Generating Terrain Shadows on custom worldsize..

Posted: Sat Dec 19, 2009 2:23 am
by fo0k
I have mangaed to use the Apache tutorial to generate terrain shadows manually..
however I have been using a custom worldsize setup for my map.. essentially one normal terrain square squashed to half the size.. this combined with a texture map square resolution of 4096x4096.. rather than 1024..

the result I am getting from shadow gen is that it just treats my square as half the size and i end up with a poor quality 256x256 lightmap.. :(

tried increasing the shadow precision but it seems to have no effect?

any thoughts?

and if not, does anyone have a nice lighting setup in 3dmax I could use to generate in there instead.

Re: Generating Terrain Shadows on custom worldsize..

Posted: Sat Dec 19, 2009 4:04 am
by fo0k
fixed this.

as it turns out it wasnt reading my terrainlightmap.con at all.. wasnt even in the right place.. :/

but it still generated lightmap.. i guess with some default settings..

the fact that it 'worked at all' led me to believe the file was working..

i can get the precision up to anything i think! trying 32 atm!

I lol at a value of 4.

Re: Generating Terrain Shadows on custom worldsize..

Posted: Mon Dec 21, 2009 9:53 pm
by Apache Thunder
Value of 8 should do it for you. But it will take a LONG time to generate at that setting. Don't try 32. That would result in textures so f****ing huge that even a dam supercomputer wouldn't handle very well. Not to mention you'd be 90+ years old by the time it finishes generating those terrain shadows. :P

Battlecraft maxes out at 4.0. Only way to go larger is via the manual method. :D

Re: Generating Terrain Shadows on custom worldsize..

Posted: Mon Dec 21, 2009 11:36 pm
by fo0k
heheh well it turned out ok! I have only got one terrain texture in the whole map which is 4096x4096

so the value of 4 gives you 4 pixels per meter.. essentially creating a 1024 x 1024 lightmap..
2048 needs a precision value of 8 and 4096 you multiply again to 16. (took 15 mins on fast cpu for that one square)

32 would be cleaner after resizing down in PS. BF does not soften the edges so well on objects close to the ground so scaling up then resizing would give a cleaner finish I think

Re: Generating Terrain Shadows on custom worldsize..

Posted: Tue Dec 22, 2009 5:22 am
by Apache Thunder
Must be faster for you with a dual core or something. My machine said it would have taken two hours when I set it to 8. :P

Anyways, if both the LGT file and the texture file are 4096x4096 why not keep that size? You don't need to resize it down as it would result in a loss of detail. The game can normally handle a full sized map and the total size for all the textures on a map like El Alamein is 8196x8196 if combined to one file. So BF42 should easily handle your single 4096x4096 image. ;)

Re: Generating Terrain Shadows on custom worldsize..

Posted: Tue Dec 22, 2009 6:48 am
by fo0k
Ahh I mean generate the lightmap at 8192x8192 then shrink to 4096.. Would give a smoother finish.

Time to generate lightmaps is very dependant on the number of objects so every case varies a lot in my experience.

Re: Generating Terrain Shadows on custom worldsize..

Posted: Tue Dec 22, 2009 7:52 am
by Apache Thunder
Oh I see. Then no loss for you then. :D

Re: Generating Terrain Shadows on custom worldsize..

Posted: Tue Dec 22, 2009 9:46 am
by Senshi
Where do you set precision?

Re: Generating Terrain Shadows on custom worldsize..

Posted: Wed Dec 23, 2009 1:05 am
by fo0k
in your terrainlightmap.con

you wont see that I guess if done via BC. theres a range of setting in there for the terrain shadows.