Howto:Illuminate faces: Difference between revisions

Line 15: Line 15:
  </animation>
  </animation>


Remember: If you are using blender, if you want to get illuminated faces (i.e. lamps) you need to set their emit material property (Under shaders) greater than 0 (i.e. 0.6).
===Blender users===
[[Blender]] users may create illuminated faces directly from blender itself. But what makes a face to be illuminated in Flightgear ? Well, Flightgear can not take full advantage of all the properties a blender surface can take (fgfs is not a full featured rendering program nor wants to be), there is anyway a method to make faces in blender emit light by their own. First of all we have to remember that whatever program we are using to model an object if we want to use it in Flightgear we have to export it in AC3D format. Materials in AC3D format have line like this one:
<pre>
MATERIAL "MaterialName" rgb 1 0 0 amb 0.5 0.5 0.5 emis 0 0 0 spec 1 0.9999 0.9999 shi 32 trans 0
</pre>
Look at the 3 numbers after the emis word (0 0 0). this tells that this material does not emit any light by itself. This is the common row we get when exporting an object in AC3D format from blender. If we wish to illuminate it we can take advantage of the '''Emit''' material property under the ''Shaders'' panel. If we want a slight emission we can give a value like 0.4 to it. We will get a surface that will emit white light:
<pre>
MATERIAL "MaterialName" rgb 1 0 0 amb 0.5 0.5 0.5 emis 0.4 0.4 0.4 spec 1 0.9999 0.9999 shi 32 trans 0
</pre>


==Variations==
==Variations==