AC3D file format: Difference between revisions

Jump to navigation Jump to search
m
wiki links + images lifted, to remove long empty space at bottom of article | Great article D-79!!
No edit summary
m (wiki links + images lifted, to remove long empty space at bottom of article | Great article D-79!!)
Line 1: Line 1:
Ac files (extension .ac) are the basis of all scenery and aircraft models in FlightGear. Knowing how to read and change an AC file can be useful sometimes, e.g. when you quickly want to change a color or use another texture. This article shows you how to modify the material and texture entries.
Ac files (extension .ac) are the basis of all [[scenery]] and [[aircraft]] models in [[FlightGear]]. Knowing how to read and change an AC file can be useful sometimes, e.g. when you quickly want to change a color or use another texture. This article shows you how to modify the material and texture entries.


===Materials===
===Materials===
[[Image:AC_color.jpg|thumb|rgb 1 1 0]][[Image:AC_ambient.jpg|thumb|amb 0.72 0.64 1]][[Image:AC_emission.jpg|thumb|emis 1 0 0]][[Image:AC_spec.jpg|thumb|spec 0 1 0]][[Image:AC_trans.jpg|thumb|trans 0.5]]
When you open an AC file in a text editor, you will see a number of material lines like this:
When you open an AC file in a text editor, you will see a number of material lines like this:


Line 10: Line 12:
We will now go through that line bit by bit:
We will now go through that line bit by bit:


<tt>rgb 0.5 0.5 0.5</tt>[[Image:AC_color.jpg|thumb|rgb 1 1 0]]
<tt>rgb 0.5 0.5 0.5</tt>  
: Color: This material is medium grey. Red Green Blue (of which the color is composed) are all medium strong. <tt>rgb 0 0 0</tt> is black, <tt>rgb 1 1 1</tt> is white. Mix to your needs. In the example to the right, red and green make yellow.  
: Color: This material is medium grey. Red Green Blue (of which the color is composed) are all medium strong. <tt>rgb 0 0 0</tt> is black, <tt>rgb 1 1 1</tt> is white. Mix to your needs. In the example to the right, red and green make yellow.  


: The examples have been made with the [[Bo105]] material dialog (when using the model, press Ctrl-Y to open it). Of course you can make them in the AC file as well: Open, edit, save, done.
: The examples have been made with the [[Bo105]] material dialog (when using the model, press Ctrl-Y to open it). Of course you can make them in the AC file as well: Open, edit, save, done.


<tt>amb 0.4 0.4 0.4</tt>[[Image:AC_ambient.jpg|thumb|amb 0.72 0.64 1]]
: Most common rgb setting for textures is 1 1 1, which shows the colors on the texture excactly as they were drawn.
 
<tt>amb 0.4 0.4 0.4</tt>
: Ambient: The [http://en.wikipedia.org/wiki/Ambient_light ambient] is the color of the light that falls indirectly onto the material, i.e. the reflection of sunlight is (almost) not affected.  In the example to the right, I have changed the ambient (not the color) to full blue.
: Ambient: The [http://en.wikipedia.org/wiki/Ambient_light ambient] is the color of the light that falls indirectly onto the material, i.e. the reflection of sunlight is (almost) not affected.  In the example to the right, I have changed the ambient (not the color) to full blue.


<tt>emis 0 0 0</tt>[[Image:AC_emission.jpg|thumb|emis 1 0 0]]
: As of [[FlightGear CVS]], the amb setting should duplicate the rgb one.
 
<tt>emis 0 0 0</tt>
: Emission makes things glow. Here, I have set the emission to full red and nothing else. In total dark, the model shines red only, in light it is yellow and red.
: Emission makes things glow. Here, I have set the emission to full red and nothing else. In total dark, the model shines red only, in light it is yellow and red.


<tt>spec 0.2 0.2 0.2</tt>[[Image:AC_spec.jpg|thumb|spec 0 1 0]]
<tt>spec 0.2 0.2 0.2</tt>
: [http://en.wikipedia.org/wiki/Specular_reflection Specular] means the reflection of light that comes from the viewer, i.e. the color of light that comes from you and goes back to you. In other wprds, here you set the color for mirror-like reflections. In the example, specular is set to full green.
: [http://en.wikipedia.org/wiki/Specular_reflection Specular] means the reflection of light that comes from the viewer, i.e. the color of light that comes from you and goes back to you. In other wprds, here you set the color for mirror-like reflections. In the example, specular is set to full green.


Line 27: Line 33:
: Shi seems to stand for shininess, but with that I'm not sure, sorry. Try yourself (no example, of course).
: Shi seems to stand for shininess, but with that I'm not sure, sorry. Try yourself (no example, of course).


<tt>trans 0</tt>[[Image:AC_trans.jpg|thumb|trans 0.5]]
<tt>trans 0</tt>
: With transparency it get really interesting again. Make things transparent, even without using a [[Textures & Texture Maps in SketchUp|texture]].  
: With transparency it get really interesting again. Make things transparent, even without using a [[Textures & Texture Maps in SketchUp|texture]].  


[[Category:Howto|AC files: Understanding and changing .ac code]]
[[Category:Howto|AC files: Understanding and changing .ac code]]
[[Category:Scenery enhancement|AC files: Understanding and changing .ac code]]
[[Category:Scenery enhancement|AC files: Understanding and changing .ac code]]

Navigation menu