373
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
== Multi-channel Lightmap == | == Multi-channel Lightmap == | ||
This documentation is intended to be a step by step guide to produce lightmaps for FlightGear using Blender and Gimp. It is not intended to be a comprehensive tutorial on the use of Blender or Gimp, just enough to get the job done. Anyone with expert skill in either Blender or Gimp is more than welcome to add to this guide with more details, techniques and tricks. | |||
[[File:Blend3a.jpg|thumb|Multi-channel lightmap tutorial]] | [[File:Blend3a.jpg|thumb|Multi-channel lightmap tutorial]] | ||
Start by setting up your lighting scheme in Blender. This is what your cockpit or subject will look like when looking at it in the Material Viewport if using only the normal white light. | |||
You can set up your lights to mimic the 3 color channels used in the shader and thus bake three different light sources into three different channels in one bake session if you wish. This is what you might expect to see if you do a light source per color channel (rgb). | |||
Create the light sources you want to map (bake) in your blend. You can have up to 4 lightmaps per multi-channel light map in FlightGear. Each of those four lightmaps can be a single light source or a combination of light sources. In other words, you could potentially have 2 lights on the left combined into one lightmap and two on the right into another lightmap, leaving 2 channels open for 2 more lightmaps of any configuration. | |||
[[File:Tutorial 01.jpg|thumb|Tutorial on creating a 4-channel lightmap for FlightGear using Blender and Gimp]] | [[File:Tutorial 01.jpg|thumb|Tutorial on creating a 4-channel lightmap for FlightGear using Blender and Gimp]] | ||
| Line 18: | Line 23: | ||
Using Blender, | Using Blender, it would be wise to work from a copy of your original blend file to use for the lightmap creation so as not to disturb the original. | ||
Because of the nature of the lightmap effect and the way it is applied using shaders, it is required to have all the objects to be influenced by the same lightmap also mapped to the same texture. | |||
Tip: Other blends that use a different coordinate space must be converted to the same coordinate space as the final blend that you are creating the lightmap from and also be mapped to the same texture sheet if you want to apply a single lightmap to all those object. This obviously can be a real challenge if using generic instruments. | |||
Tip: Other blends that use a different coordinate space must be converted to the same coordinate space as the final blend that you are creating the lightmap from. This obviously can be a real challenge if using generic instruments. | |||
[[File:Blend1a.jpg|thumb|Multi-channel lightmap tutorial]] | [[File:Blend1a.jpg|thumb|Multi-channel lightmap tutorial]] | ||
| Line 34: | Line 38: | ||
Using the UV-Image Editor screen in Blender, create a new image that is the same size as the texture sheet being used. Here is where you may have a problem. I happen to have only one texture sheet for the entire blend (by design). These things need to be well thought out, in advance, for ease in setting up the effects later on in the creation process. This is what the map will bake to and be the source of the final lightmap. | Using the UV-Image Editor screen in Blender, create a new image that is the same size as the texture sheet being used. Here is where you may have a problem if you have set up your blend to have multiple texture sheets. I happen to have only one texture sheet for the entire blend (by design). These things need to be well thought out, in advance, for ease in setting up the effects later on in the creation process. This is what the map will bake to and be the source of the final lightmap. | ||
[[File:Tutorial 02.jpg|thumb|Tutorial on creating a 4-channel lightmap for FlightGear using Blender and Gimp]] | [[File:Tutorial 02.jpg|thumb|Tutorial on creating a 4-channel lightmap for FlightGear using Blender and Gimp]] | ||
| Line 50: | Line 54: | ||
Uncheck | Uncheck the texture being applied to the objects. | ||
[[File:Tutorial 03.jpg|thumb|Tutorial on creating a 4-channel lightmap for FlightGear using Blender and Gimp]] | [[File:Tutorial 03.jpg|thumb|Tutorial on creating a 4-channel lightmap for FlightGear using Blender and Gimp]] | ||
| Line 113: | Line 117: | ||
Your now ready to bake. | Your now ready to bake. | ||
# 1) Make sure your | You can either join all the object into one and do a single bake or you can uncheck the "Clear" box in the Bake section and do multiple bake runs over the same image using different selected objects in the edit mode one at a time. With the complexity of the Shuttle Cockpit, I found it easiest to join all the object into a single object and bake only once per light source. | ||
# 1) Make sure your object is selected and in edit mode. | |||
# 2) Make sure you have only the light source or sources you want in this lightmap active. | # 2) Make sure you have only the light source or sources you want in this lightmap active. | ||
# 3) In the bake information (Render Tab) make sure you have a reasonable "overlap". Read up in Blender docs for that info. I used 2 and it appears to have been a decent setting for my texture sheet resolution. | # 3) In the bake information (Render Tab) make sure you have a reasonable "overlap". Read up in Blender docs for that info. I used 2 and it appears to have been a decent setting for my texture sheet resolution. | ||
Hit the bake button. When the baking is finished, if everything went OK, you should have a baked map | [[File:Blend5a.jpg|thumb|Multi-channel lightmap]] | ||
Hit the bake button. When the baking is finished, if everything went OK, you should have a baked map that looks something like this. | |||
[[File:Tutorial 04.jpg|thumb|Tutorial on creating a 4-channel lightmap for FlightGear using Blender and Gimp]] | [[File:Tutorial 04.jpg|thumb|Tutorial on creating a 4-channel lightmap for FlightGear using Blender and Gimp]] | ||
edits