Bridge Commander Central

BC Forums => BC Modding => Tutorials => Topic started by: blaXXer on November 15, 2007, 02:16:26 PM

Title: Tutorial - Lightmapping
Post by: blaXXer on November 15, 2007, 02:16:26 PM
Lightmapping for dummies - everybody can do it!


Prerequisites:

Okay, let's get started, shall we?

I simply assume, you know how to texture and already have your model mapped out and
textured.

Now, you all you need to do, is set up the lights, the way your interior set should be lit (may be throw in a few glowmaps and whatnot for good measure); and then, you can begin the long and tedious process of lightmapping.

Perfect, now go into the 'Render'-dialogue and select 'Render to Texture' (or press 'O') and a dialog-window will pop-up and you won't be able to do much with it.

So, select one of the objects in you scene and you will be presented with a multitude of different options.

I'll just walk you through the most important parts:
First, check the box to enable 'Projection Mapping' and then proceed to the
next section that reads 'Mapping Coordinates' and set the options there to 'Use Existing Channel' (usually you
mapping channel will be 1).

After that's done, head over to the 'Output'-section and first of all specify your texture
size (the exact size of your base texture would be appropriate here).

Then, click on the 'Add'-button and choose
'Complete Map' from the list (you can also play around with some of the settings, see what you can come up with ;)).
After that's done, under the 'Enable'-section, enter what you feel is appropriate, like the filename, save location and whatnot (self-explanatory, really) choose your texture size and finally hit the 'Render'-button.

You should be done now. Rinse and repeat for other textures aswell.

other users are welcome to add and expand on this little tutorial...
Title: RE: Tutorial - Lightmapping
Post by: Nighthawk on November 15, 2007, 02:21:11 PM
'bout time to have something like this.
I'm gonna try it out right now.
thnx blaxxer!!!!

EDIT:
previous versions go back up to v5 or so. version 3 doesnt have it that I know of.
Title: RE: Tutorial - Lightmapping
Post by: Adonis on November 15, 2007, 02:30:29 PM
Just remember, this is how I do my spotlights on ships ;)
Title: RE: Tutorial - Lightmapping
Post by: lint on November 15, 2007, 04:05:06 PM
hehe blaxxer ;)
Title: RE: Tutorial - Lightmapping
Post by: Dawg81 on November 15, 2007, 04:36:26 PM
Very good of ya to do this blaXXer; have a cookie
Title: RE: Tutorial - Lightmapping
Post by: Nighthawk on November 15, 2007, 04:39:18 PM
one Q tho:
do you actually need lights as lights? or can I use indirect/fake lighting?

also:
how does this affect red alert lighting?
Title: RE: Tutorial - Lightmapping
Post by: blaXXer on November 15, 2007, 04:42:06 PM
one Q tho:
do you actually need lights as lights? or can I use indirect/fake lighting?
You can place your light wherever you feel like, you should, however see to it that it looks realistic.

also:
how does this affect red alert lighting?
you would have to re-lit it for each alert state.

/edit: who unstickied it?
Title: RE: Tutorial - Lightmapping
Post by: Nighthawk on November 15, 2007, 06:09:49 PM
You can place your light wherever you feel like, you should, however see to it that it looks realistic.
no, I mean, self-lighted textures for example, like the ceiling

/edit: who unstickied it?
wasn't stickied yet.
Title: RE: Tutorial - Lightmapping
Post by: LJ on November 15, 2007, 06:34:32 PM
Consider it stickied. :)  Thankyou for the tutorial! :)
Title: RE: Tutorial - Lightmapping
Post by: blaXXer on November 15, 2007, 07:49:33 PM
@Nighthawk: for areas that are self-lit you should use alpha- or glow-maps.
Title: RE: Tutorial - Lightmapping
Post by: Nighthawk on November 16, 2007, 12:34:37 PM
@Nighthawk: for areas that are self-lit you should use alpha- or glow-maps.
that, instead of "complete map"?
Title: RE: Tutorial - Lightmapping
Post by: limey BSc. on November 16, 2007, 01:09:38 PM
Awesome tutorial, and great idea! I tried it, but when I tried to get it ingame, it crashed to desktop. I know its not the scripts, as I copied them from another bridge, and I don't think its the model. This is what the 'Render to Texture' menu looked like just before I clicked render:

(http://i237.photobucket.com/albums/ff74/JL_Studios/lming.jpg)

Can you see what I'm doing wrong?
Title: RE: Tutorial - Lightmapping
Post by: Adonis on November 16, 2007, 01:27:35 PM
Ok, first, I can see that you tried to do it for an Ori bridge.

Now, for bridges, it isn't as easy as port bridge model, rename some scripts and hope it works.

First, you need to reapply the lightmaps to the model on a different mapping channel (usually channel 1 is used for diffuse, channel 2 for lm's), do the animations, script everything and then you can remotely hope that it'll work. I played around with bridge scripts and it ain't pretty.
Title: RE: Tutorial - Lightmapping
Post by: limey BSc. on November 16, 2007, 01:39:45 PM
Ok, first, I can see that you tried to do it for an Ori bridge.

Now, for bridges, it isn't as easy as port bridge model, rename some scripts and hope it works.

First, you need to reapply the lightmaps to the model on a different mapping channel (usually channel 1 is used for diffuse, channel 2 for lm's), do the animations, script everything and then you can remotely hope that it'll work. I played around with bridge scripts and it ain't pretty.

Well, the script I'm using is the one LJ wrote for me for the X-303 bridge, and that's in-game with the lighmaps. It calls on some generic animations, so the crew just sit there, breath and look around!

So do I set:

(http://i237.photobucket.com/albums/ff74/JL_Studios/lming2.jpg)

both to channel 2 then?

The main thing I was worried about was the 'Target Map Slot' down the bottom, or is that ok?
Title: RE: Tutorial - Lightmapping
Post by: Adonis on November 16, 2007, 01:42:55 PM
Switch to use automatic unwrap, and select channel 2, after that, using a new material slot, apply the lightmap, in the lightmap slot to the object in question.