Texture Mapping Tutorial
Results 1 to 6 of 6

Thread: Texture Mapping Tutorial

  1. #1
    SOH Staff
    Join Date
    Jul 2005
    Location
    State of Confusion..... -8GMT
    Posts
    3,775

    Texture Mapping Tutorial

    Ivan has graciously offered to post
    a cfs model texture mapping tutorial.
    i am only starting the thread for it.
    many thanks Ivan for taking the time
    from your busy schedule.
    sometimes the magic works.
    sometimes it doesn't.

  2. #2

    papingo here......

    excellent!!mark me down for it!

  3. #3

    Combat Flight Simulator - Basic Texture Mapping

    Hello All,

    A couple of my friends seem to be interested in a "Tutorial" on my method of laying out (mapping) of textures for a Combat Flight Simulator Aircraft Project. This thread will describe the methods and practices I use which seem to work well enough for me. I make no claims that this is the best method.

    This thread will be describing the Texture Mapping used in the creation of a CFS Aeroplane using the following tools:
    Aircraft Factory 99 - Used to build the basic 3D Model and map textures onto the model.
    AF5Paint, MS Paint, GIMP - Used to create and edit Texture Files
    Aircraft Animator - Used to do basic animation for the model
    SCASM - Used to adjust animation and possibly change texture file formats

    Many of the methods I use are determined by the behaviours of these particular tools and may not apply if other tools are used.

    - Ivan.

  4. #4

    File Naming and Formats

    Aircraft Factory is an essential tool in my method of building CFS Aeroplanes.
    It uses .PCX files as input for its textures and generates output files in a format called .R8.
    I have never seen the R8 format elsewhere and the more common, non-flightsim specific tools don't seem to recognise it at all.
    No matter what your file naming convention was for PCX files, the result after processing by AF99 will be a filename with a root made up of the first 8 characters of your project name with the extension .[0123456789abcdef]af.

    A project with the name Reisen32 would end up with texture files with names like
    Reisen32.0af
    Reisen32.1af
    ....
    Reisen32.9af
    Reisen32.aaf
    etc.

    If your project name is longer than 8 characters, the file names will truncated to take only the first 8 characters.
    If your project name is shorter than 8 characters, the file name will be filled out to 8 characters by underscores (_).

    These are the file names that will be stored in your resulting MDL file.

    AF5Paint can generate and edit PCX files for use as textures by AF99. It is also restricted to 8.3 filename formats.

    Aircraft Animator can handle a bit in the way of transparencies but for the scope of this discussion has no influence on the laying out of textures.

    SCASM has no texture filename requirements, but it is a convenient tool to change the embedded file name in the MDL file to something that is more convenient to use. AF99 models in CFS can use BMP textures but the file names of those textures must match the file names in the MDL file.
    Changing filenames back and forth between .BMP extensions that graphical tools recognise and .?af extensions in the MDL file can be tedious. SCASM (or other tools) can be used to fix that.

    Note that while AF99 uses 8 characters for a project name, it uniquely identifies each file within the project with one character of the extension. When we use three character extensions, we can only use 7 characters for the project name because at least one character identifies the file within the project.

    Think of a good 7 character unique identifier for your project.

    - Ivan.

  5. #5

    Square Textures

    The original idea was to use this Tutorial thread to show the process of mapping texture files over an unpainted aircraft project. I have several projects that have been stuck for yeas in my paint shop waiting for this process to be completed.
    After thinking about it a bit, I figured that using multiple projects to illustrate various points would make for a better tutorial because very seldom do we run into all of the essential issues in a single project.
    I also try to avoid the "errors" that I know about but find them fairly often in existing AFX files that I have downloaded.

    In order to even consider mapping textures, we need to have the Aircraft Factory Project source code: either the AFX or .afa file and rest of the source. This is also necessary because very often pieces of the aircraft may need to be re-shaped in order to properly map a texture.

    Square Textures:
    When mapping the texture files over the aeroplane's pieces, try to make the images square whenever possible...
    ....Unless you have a VERY good reason not to.

    This will make it much easier for the painter to draw patterns, insignia, overlay drawings / profiles on the aeroplane when the initial colours (I use a lot of gray primer) have been applied.


    The two images attached here show the consequences of non-square versus square texture mapping on the Fin and Rudder of a Messerschmitt 109E. (Both have been rotated to be horizontal and to be understood more easily.)

    Note that in the first texture file, trying to draw a perfect circle as one might need for an early German insignia or for an access opening would not be easy. It is not obvious how a circle would need to be stretched in order to appear as a circle on the aeroplane itself.

    In the second texture, what looks like a circle in on the texture file will look like a circle on the aeroplane. There is no aspect ratio or stretching to worry about.
    Another useful technique is to colour just the part of the texture file that you will be using for your pieces as you do them. That way, you can tell what parts of the texture file remain to be used for other pieces and avoid using the same parts of the texture file for multiple pieces. If you make that a habit, it will also make it less likely to have a piece extend past the edge of the texture file.

    In making this texture file square with the same vertical and horizontal ratios, there was enough room left over to texture the Propeller Spinner.

    The Propeller Spinner is one of the few cases in which it makes sense NOT to have the same scale horizontally as vertically. This particular Spinner was not animated, but if it were, the top and bottom edges of the Spinner would need to be colour matched between the left and right sides. Because the top and bottom have polygons that are close to horizontal the scale should be expanded to allow for more precise control.
    This was not done here because I was satisfield just to have the piece textured so the colour could be changed.

    - Ivan.
    Attached Thumbnails Attached Thumbnails Me109E_4.bmp   Me109E05.bmp  

  6. #6

    Choosing What to Texture

    As I mentioned in the last post, the Spinner of the Me 109E was not textured when I started. Neither was the Canopy Frame as can be seen in thr first screenshot.

    In the second screenshot, it may not be obvious, but the Horizontal Stabiliser is not textured.

    In my opinion, both choices were less than optimal. Those choices make it impossible to apply a different paint scheme, especially one involving a camouflage pattern. Imagine trying to repaint the P-38 in Olive Drab overall and finding that the tail can't be changed from Light Gray.

    The general idea is to texture all the exterior pieces (and possibly some of the interior pieces as well) that might be painted different colours on individual aircraft.

    Sometimes we make "Safe" choices without thinking things through. I did this with my F6F-3 Hellcat. The Landing Gear Struts were simple Light Gray. I had never seen a picture of the early Hellcat with anything different. When I decided to modify it into a F6F-5 Hellcat, I found that most late-war Hellcats had their Landing Gear Struts painted the same colour as the rest of the aeroplane.

    - Ivan.
    Attached Thumbnails Attached Thumbnails RO_109E_LFHigh.jpg   P38J-EJ0.jpg  

Members who have read this thread: 0

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •