Game Development Community

T3D terrain lightmaps?

by pilotcap232 · in Torque 3D Professional · 02/27/2010 (4:11 pm) · 7 replies

was wondering if T3D can do terrain lightmaps.

since we all know that the current T3D is pc resources hungry, and not to mention advanced lights will kill performance on an average household pc boxes using a common 9 series nvidia card.

so to aliviate this, was trying to find a way if T3D offers baking lights to terrain like most other known game engines does within the editor.

ie:

you light up all your scene then I thought that the full relight function will bake the lights to the terrain. but It only seems to bake the shadows and not the actual lights to it.

if there any way to do this with the editor?

thanks

#1
02/27/2010 (6:01 pm)
Terrain Lightmaps are enabled when you change the lighting to "Basic" (which will be "lowest - lighting quality" in the forthcoming new options menu). Currently it's set at a rather small 256, and whilst being 4096 is nice, can still slow down lower systems during generating.

The Terrain LightmapSize function "might" be exposed in the editor come next release so that you can select your prefered size.
#2
02/27/2010 (8:38 pm)
Sort of off-topic, but it would be nice to be able to mix and match these settings which are currently locked into the kind of simplistic low/medium/high (1.1b) or adv lighting on/off (1.0) options.

For example, you might want to bake all of your structures and other static environmental objects to allow them to shadow at any range with greater detail while leaving the shadows for dynamic objects running at maximum quality. As I understand it, turning the lighting to lowest currently also decreases the quality of the dynamic object shadows. Would this kind of setup even be possible?
#3
02/27/2010 (9:01 pm)
@Steve,

you mean this feature works on basic lightning?

I have tried doing it but have no success, as logic the way i setup is create my lights on the scene, spot etc... to light up terrain etc.. then use the full relight option to see if it bakes the lights to the terrain, then remove the lights from the mission, and nothing happens, no baking all dark.

unless i am doing it wrong,

will you care to elaborate how this works.

thanks
#4
02/27/2010 (9:03 pm)
Wouldn't you have to use an external baker (like PureLight) for that? Built in lightmapping generation is built into the terrain only. Even stuff that doesn't cast shadows out at range still receives direct and ambient sun/source light.

Personally, I'm already planning on lightmapping everything interior of buildings regardless of lighting quality options. (mind you, you can't turn lightmaps off - save on terrain which auto with generation)

Turning the lighting to lowest turns it to Basic Lighting, thus no dynamic shadows at all. You can change all of the (beta) quality options, I've already tweaked them to personal preferences (+fps -eyecandy at some lower levels so that there's more of a difference - eg: "low" lighting - I removed all shadows, but it's still Advanced lighting which is nicer than Basic).

edit: "elaborate how this works"
Haven't tested it with anything but the sun, but as I said 256 is very small - that's one pixel per terrain squaresize on the smallest terrain - thus not currently noticeable. original thread
nighty!
#5
02/28/2010 (12:27 am)
@Steve:

Ergh, I should probably try to have at least some understanding of what I'm talking about before I post. I have to admit I've never really messed with BL mode beyond toggling it on once or twice for testing in a terrain-only level.

I was basically assuming it was TGE lighting (and even then only terrain and DIFs were actually lightmapped)... in reality my idea makes zero sense, and is effectively a description of the PureLight + dynamic shadows for dynamic objs solution.

@pilotcap232:

Dynamic lights (ie, anything other than the level's primary light source -- the sun/scattersky) don't seem to be part of the light baking at all.

I kind of assumed the interior (DIF file) lightmaps still functioned, but I'm getting the feeling I was wrong (don't even have a DIF around to test anymore). If lightmaps really are terrain only, that explains why the placed lights don't bake; generally they're used to light buildings (or whatever environmental objs you have), so to accomplish anything at all they need to be dynamic.

That said, a toggle to add them to the terrain lightmap baking couldn't hurt -- if your level is terrain only for whatever reason, then it could still be a viable solution.
#6
02/28/2010 (12:27 am)
Thanks mate.

Yeah, lightmapping everything is the key to go if you want to target your game to average box outhere, at least thats what I am trying to accoumplish, and I am not saying low end boxes, but at least average core2duo.

I have tested T3D in one of my mid end pc box which is a core2duo 2 gigs ram 9 series nvidia card, and believe me, advance lightning from T3D kills performance on this setup badly, literary you get a headache with this settings because the low fps, and is not even considered a low end, but kinda the average mid setting pc outhere.

I guess the key here is to find the right settings, lightmapping, low poly meshes etc.. for average pc box without loosing rendering quality.
whihc I think this will be a tough one to achieve with current T3D.

another example which i am pretty sure you have experienced, is the water, basic lighting water rendering does nto look that good, offcourse after a few tweaks on the settings may get something decent but no foam effects, which you can only obtain with advance lighting.
:-(



I guess terrain ligtmapping works kinda different on T3D,

been used to other engines which let you do that from within the engine editor.
ie: unity which lets you light your scene with as many lights or spot lights or any other light with colors to make the terrain more vivid, then generate lightmap from terrain which bakes the light colors to it , and then you can just remove all the lights create before to release resources and increase performance, and still get your terrain all light mapped with all lights baked to it.

Looks that T3D will only let you lightmap the shadows directly from sun light, and nothing else, ie: spotlight, etc..


will check if there is a work around to this,

thanks again
#7
02/28/2010 (12:31 am)
@Henry,

yeah, it looks like on sun and scattered sky light are ligntmapped on to terrain, but noticed only shadows and not actual light colors.

hopefully developer can implement terrain lightmapping for other light sources like spot lights etc.. in future releases.