Howto:Multi-channel lightmap: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 6: Line 6:
Start by setting up your lighting scheme in Blender.
Start by setting up your lighting scheme in Blender.
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.
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:Blend3a.jpg|400px|Lighting Scheme]]




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.
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.
 
[[File:Blend3a.jpg|400px|Lighting Scheme]]
[[File:Blend6a.jpg|400px|Setting up colored light sources]]
 
 
 
 
 
 
 
 
 
 
 




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 would eliminate some steps in Gimp during the next part of the process, but for the purpose of this tutorial, we'll take the longer approach so you can see how it is possible to work with images and their channels. This is what you might expect to see if you do a light source per color channel (rgb).
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 would eliminate some steps in Gimp during the next part of the process, but for the purpose of this tutorial, we'll take the longer approach so you can see how it is possible to work with images and their channels. This is what you might expect to see if you do a light source per color channel (rgb).
 
[[File:Blend6a.jpg|400px|Setting up colored light sources]]
 
[[File:Tutorial 01.jpg|thumb|Selecting object to map in the blend]]
 
 
 
 
 
 




Line 41: Line 19:
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.  
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 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.
 
[[File:Tutorial 01.jpg|400px|Selecting object to map in the blend]]
[[File:Blend1a.jpg|thumb|Create an image to bake to]]
 
 
 
 
 
 
 




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.
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:Blend1a.jpg|400px|Create an image to bake to]]
[[File:Tutorial 02.jpg|thumb|Uncheck applied texture]]
 
 
 
 
 
 
 
 
 
 
 
 
 




Uncheck the texture being applied to the objects.
Uncheck the texture being applied to the objects.
 
[[File:Tutorial 02.jpg|400|Uncheck applied texture]]
[[File:Tutorial 03.jpg|thumb|Settings for the bake]]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 




Line 103: Line 37:
# 3) Error .25
# 3) Error .25
I set "Correction" to 1.0, but it may only be use if Ambient Occlusion is also checked.
I set "Correction" to 1.0, but it may only be use if Ambient Occlusion is also checked.
 
[[File:Tutorial 03.jpg|400|Settings for the bake]]
[[File:Blend2a.jpg|thumb|Start the bake]]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 




Line 140: Line 46:
# 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.
# 4) Make sure you have selected the image you created in the UV-image editor.
# 4) Make sure you have selected the image you created in the UV-image editor.
[[File:Blend2a.jpg|400|Start the bake]]


[[File:Blend5a.jpg|thumb|Final baked lightmap in Blender]]
[[File:Blend5a.jpg|thumb|Final baked lightmap in Blender]]
330

edits