Search the archive:
YaBB - Yet another Bulletin Board
 
   
 
Page Index Toggle Pages: 1
Send Topic Print
3D Gauges (Read 791 times)
Oct 21st, 2007 at 6:32pm

Gaspen   Offline
Colonel
I Fly Sim!
Hungary

Gender: male
Posts: 26
*****
 
Hi !

I'm searching for a tutorial about creating 3D gauges which you can see in RealAir planes. Which "direction" to start?
 
IP Logged
 
Reply #1 - Oct 21st, 2007 at 7:09pm

Felix/FFDS   Offline
Admin
FINALLY an official Granddad!
Orlando, FL

Gender: male
Posts: 1000000627
*****
 
A 3eD gauge is basically straight modelling - you model each part of the gauge, and set the animated needle, etc. with the proper animations.

THe hard part will always be getting the XML coding correct.
 

Felix/FFDS...
IP Logged
 
Reply #2 - Oct 22nd, 2007 at 12:49am

Travis   Offline
Colonel
Cannot find REALITY.SYS.
Universe halted.
Dripping Springs, TX

Gender: male
Posts: 4515
*****
 
Check out the FFDS forums for more information on this.  Look in the XML Codes section.  Link in Felix's signature above.
 

...
IP Logged
 
Reply #3 - Oct 22nd, 2007 at 4:57am

Gaspen   Offline
Colonel
I Fly Sim!
Hungary

Gender: male
Posts: 26
*****
 
Thanks guys ! My idea was also the same, but didn't how to start. I hope FFDS forum will give the answer  Wink
 
IP Logged
 
Reply #4 - Oct 22nd, 2007 at 4:04pm

Gaspen   Offline
Colonel
I Fly Sim!
Hungary

Gender: male
Posts: 26
*****
 
Well, I found some XML codes at FFDS forum, does not work for first time....

My way : I make the object in MAX, name it 'gau_needle_speed', anim it with keyframes.
Then I paste the code into modeldef.xml, and use the same text (gau_needle_speed) in the <name> section within it. Finally i export the model to FSX.
 
IP Logged
 
Reply #5 - Oct 22nd, 2007 at 6:23pm

Felix/FFDS   Offline
Admin
FINALLY an official Granddad!
Orlando, FL

Gender: male
Posts: 1000000627
*****
 
Post your code here to take a look at it.  It may be that syntax is wrong (FS-X is even more picky on capitalizations than FS9)

Too many thiings to even start thinking what's going off.
 

Felix/FFDS...
IP Logged
 
Reply #6 - Oct 22nd, 2007 at 6:38pm

Gaspen   Offline
Colonel
I Fly Sim!
Hungary

Gender: male
Posts: 26
*****
 
Here is the code :

<PartInfo>
  <Name>gau_needle_speed</Name>   
  <AnimLength>200</AnimLength>   
   <Animation>   
     <Parameter>   
     <Sim>   
        <Variable>AIRSPEED INDICATED</Variable>   
        <Units>mph</Units>   
        <Scale>4</Scale>   
        <MinValue>0</MinValue>   
        <MaxValue>160</MaxValue>   
     </Sim>   
     </Parameter>   
   </Animation>   
</PartInfo>

I also add this line to the file :

  <Animation name="gau_needle_speed" guid="A6F1C5D0-BEF6-449e-BAF8-FB777F27808F" length="200" type="Sim" typeParam="AutoPlay" />

And here is the XAnim file :

<?xml version="1.0" encoding="ISO-8859-1" ?>
<AnimLib version="9.1">
  <Anim name="gau_needle_speed" guid="A6F1C5D0-BEF6-449e-BAF8-FB777F27808F" length="100.000000"
       type="Sim" typeParam="" typeParam2="">
    <AnimStream name="Rotation" id="0" partName="gau_needle_speed" length="100.000000">
     <Keyframe time="0.000000" type="Quaternion" data="0.000000;0.000000;-0.000000;1.000000"/>
     <Keyframe time="25.000000" type="Quaternion" data="-0.000000;0.179933;0.000000;0.983679"/>
     <Keyframe time="50.000000" type="Quaternion" data="-0.000000;0.353992;0.000000;0.935248"/>
     <Keyframe time="75.000000" type="Quaternion" data="-0.000000;0.516497;0.000000;0.856289"/>
     <Keyframe time="100.000000" type="Quaternion" data="-0.000000;0.662142;0.000000;0.749379"/>
    </AnimStream>
     </Anim>
</AnimLib>

Cool

 
IP Logged
 
Reply #7 - Oct 23rd, 2007 at 12:35am

Fr. Bill   Offline
Colonel
I used to have a life;
now I have GMax!
Hammond, IN

Gender: male
Posts: 962
*****
 
Gaspen wrote on Oct 22nd, 2007 at 4:04pm:
Well, I found some XML codes at FFDS forum, does not work for first time....

My way : I make the object in MAX, name it 'gau_needle_speed', anim it with keyframes.
Then I paste the code into modeldef.xml, and use the same text (gau_needle_speed) in the <name> section within it. Finally i export the model to FSX.


I assume you used the Animation Tool to assign the "gau_needle_speed" animation name to the part, right?

The needle should be keyframed from 0 - 200 (you stopped at 100!), with intermediate keyframes at the major tickmarks on the background image.
 

Bill
... Gauge Programming - 3d Modeling Eaglesoft Development Group Intel Core 2 Quad Q6600-4GB DDR2 Crucial PC6400-800 GB SATA-ATI Radeon HD2400 Pro 256MB DX10 NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...
...
IP Logged
 
Reply #8 - Oct 23rd, 2007 at 6:33am

Gaspen   Offline
Colonel
I Fly Sim!
Hungary

Gender: male
Posts: 26
*****
 
Ok, I keyframed it 0-200. Only one change : the needle rotating around and around independetly from the real speed of the plane...like a second-needle on a clock Smiley
 
IP Logged
 
Reply #9 - Oct 23rd, 2007 at 12:51pm

Fr. Bill   Offline
Colonel
I used to have a life;
now I have GMax!
Hammond, IN

Gender: male
Posts: 962
*****
 
Try removing the <Scale>4</Scale> entry.
 

Bill
... Gauge Programming - 3d Modeling Eaglesoft Development Group Intel Core 2 Quad Q6600-4GB DDR2 Crucial PC6400-800 GB SATA-ATI Radeon HD2400 Pro 256MB DX10 NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...
...
IP Logged
 
Reply #10 - Oct 23rd, 2007 at 2:04pm

Gaspen   Offline
Colonel
I Fly Sim!
Hungary

Gender: male
Posts: 26
*****
 
Now I have a working airspeed and vertical speed gauge Smiley  I learned some rules about XML coding from the SDK. So AnimLength = Scale * Value ( the value between MaxValue and MinValue ). I'm not sure, but I think I have to tag the anim with Anim.Manager FIRST, after that I have to animate the part.
Now I'm working with the altimeter...

Thanks a lot !  Smiley
 
IP Logged
 
Reply #11 - Oct 23rd, 2007 at 2:09pm

Katahu   Offline
Colonel

Gender: male
Posts: 6920
*****
 
Hmm, modeling a working gauge in a 3D model? That sounds like something I should explore. My custom 2D gauges tend to be poor in quality, so let me see if this method is any better for my taste. Keep it up, Gaspen. From the looks of things, you seem to be a fast learner.
 
IP Logged
 
Reply #12 - Oct 23rd, 2007 at 2:56pm

Gaspen   Offline
Colonel
I Fly Sim!
Hungary

Gender: male
Posts: 26
*****
 
Here is the working code for my airspeed gauge. The max. value on the instrument's face is 400 km/h, thats why I use this number. Scale is 1, so one frame in MAX equal to 1km/h.

<PartInfo>
  <Name>needle_speed</Name>   
  <AnimLength>400</AnimLength>   
   <Animation>   
     <Parameter>   
     <Sim>   
        <Variable>AIRSPEED TRUE</Variable>   
        <Units>kph</Units>   
        <Scale>1</Scale>   
        <MinValue>0</MinValue>   
        <MaxValue>400</MaxValue> 
     </Sim>   
     </Parameter>   
   </Animation>   
</PartInfo>

My altimeter is working also, but both of the needles stop after one revolution. Any idea to solve this?
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print