Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
  YaBB is sponsored by XIMinc!

FFDS Home | TIPS Section | Tutorials Section | Resources Section | Utilities Section

Military | FSDS | Jetliners | Real Planes Section | Gmax | Rotorcraft | Business | Civilian

Page Index Toggle Pages: 1
Send Topic Print
FS9 vs FSX: VC Gauge Polygons & UVW Map, etc. (Read 735 times)
25th Jan, 2007 at 4:23pm

Fr. Bill   Offline
YaBB Moderator
I used to have a life:
now I have GMax...
Hammond, IN

Gender: male
Posts: 5426
A friend asked me what he only "thought" was a "simple question," but my reply to him was so involved, that I thought I'd share it with everyone...  Shocked

My friend wrote:
"I still am not clear on what you mean by "gauge poly" vs. the bitmap.  I know the bitmap is the texture/painting of the gauge, but what do you mean by poly?  Aren't all the polys textured?"

The concept is simple enough, but first the explanation requires a bit of background on 3d modeling and how the geometry is created...

As you probably know, a 3d ngon (triangle) is a "physical surface" consisting of three vertex points that form the corners of a "surface."  Two triangular ngons placed together will form a rectangle, a series of triangular ngons joined at one point and rotated will form a circle, etc.  All surfaces in a 3d model then are made up of triangular ngons aranged in various combinations.

For purposes of this brief discussion however, let us limit ourselves to a single, flat ngon consisting of two triangles joined at their hypoteneuse: i.e., a rectangular polygon! Wink

In order for textures to be "applied" to the polygon a coordinate system is needed. In 3d modeling the letters for this system are UVW. They are analogous to the familiar x,y,z coordinate system that's used in the 3d modeling program to define the spatial location of vertices.  As you have undoubtedly noticed, most texture bitmaps used in FS consist of various images scattered around on the square area of the bitmap.  Each pixel of the bitmap has a mathematical spatial relationship with the 3d model's polygons.  This relationship is defined in the modeling program through a system known as the "UVW Map."

In short, the UVW Map instructs the sim's display engine to "paint the polygon with these xyz coordinates in the model with the area of the texture bitmap defined by these UVW coordinates..."  Whew!  Enough of that for now, let's get on with answering the bloody question already! Wink

There are two basic types of textures used in an FS 3d model.  The first is the "painted bitmap" that has the images desired already created by the modeler/artist.  The second type is the "blank, transparent canvas" that's created and used by the sim to dynamically "paint" the gauge images in real time.  These are declared in the model as the ubitiquous "$xxx.bmp" names.  The "$" is a reserved symbol used by FS as a flag that the sim should create a "blank, transparent bitmap" in system memory, and allow the panel/gauge system to "draw/display/erase" it continuously at an 18 Hz rate.

When creating the 3d model, the modeler can specify the names for these $xxx bitmaps, and also which polygons of the VC should use which parts of the $xxx as their drawing area, again through the UVW Map coordinate system.  There are several approaches that a modeler might use to "build/define" the VC, but the simplest of these is a single, rectangular polygon that makes up the entire panel of the model.  In your case, this would be the flat area of the center console.

Here is an example of a rectangular polygon (note the two triangles that form the ngon?) that will be used as a "gauge polygon".  Note that I've applied a UWV Map modifier to the stack.  The UVW Map's "Gizmo" was used to adjust the UVW Map so that the top edge of the map is at the top of the gauge polygon.

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

This next image shows how I've placed a UVW Unwrap modifier to the stack, and then opened up the UVW Editor's window.  This allows me to "fine tune" the exact size and placement of the gauge polygon on the UVW Map.  For this simple example, this step isn't truly needed, but I wanted to show how to open the UVW Map Editor's window, because if you were using "gauge shaped/sized 3d polygons" for each individual gauge, this is where you'd "shuffle them around" to define their exact placement on the map! Wink

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

In fact, here are two screenshots illustrating the technique I call the "cookie cutter method" for gauge placement...

The first image is the entire panel's width showing all gauge polygons with "sample textures" applied for modeling/placement purposes. This panel is divided into three separate $panel texture Materials in GMax. Each gauge polygon is assigned to a specific $panel texture, and arranged on the square $panel texture's UVW system.

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

Here is a screenshot showing the pilot's attidute indicator polygon selected, and how it is placed on the $panel texture assigned according to my predetermined "sample texture's" arrangement.  Prior to beginning this process, I use FS Panel Studio to load the gauges in the editor window, and then shuffle 'em around and set the sizes for best appearance in the sim, based on viewing position and level of detail/importance desired.  I then use FS Panel Studio to "export a bitmap" that I can then use in GMax/Max as a "sample texture" for precise placement of the gauge polys... Wink

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

I can hear your moaning now... "Christ on a crutch, man!  I just asked a simple question and you bury me with all this?" Wink

(continued in Part 2)

Fr. Bill
Gauge Programming - 3d Modeling Eaglesoft Development Group Intel Core 2 Quad Q6600-4 GB DDRII Crucial PC6400-500 GB SATA-ATI Radeon HD2400 Pro 256MB
IP Logged
Page Index Toggle Pages: 1
Send Topic Print