PDA

View Full Version : [FSX] SDK - 3D model for Garmin GPS 500



David W.
March 21st, 2012, 12:18
I'm proud to present my new SDK for developper who want integrate a 3D GPS model for your aircraft on FSX. Be careful, all package is in french language !

SDK includes:

- Gmax 3D model of Garmin GPS 500
- Code for the modeldef.xml file to add animation on FSX
- Textures for the 3D model
- Code for the panel.cfg file
- Creative Commons legalcode "http://creativecommons.org/licenses/by-nc-sa/3.0/"



http://danslesairs.fr/data/screenshots/monthly_03_2012/thumb-fc1551c35f35a80ce30b5d67eebab6e1-.jpg


File Name: SDK - 3D Model for Garmin GPS 500
Author File: David W. (http://www.danslesairs.fr/portail/index.php?/user/1-david-w/)
Date Added File: March 18, 2012
Category File: Developer
Version Flight Simulator: FSX
MD5 Checksum: 851D844EC51192AC7E2103AA7B92E1F9

Development kit for adding a 3D model Garmin GPS 500 for Flight Simulator X


Click here to download this file (http://www.danslesairs.fr/portail/index.php?/files/file/14-sdk-habillage-3d-pour-garmin-gps-500/)


Support

Click here (http://www.danslesairs.fr/portail/index.php?/topic/10-sdk-habillage-3d-pour-garmin-gps-500/)

/!\ Reminder: No support will be made ​​on Sim-Outhouse

robcap
March 21st, 2012, 12:46
That is very nice!

full
March 21st, 2012, 12:52
Thank you very much David ! this is excellent :)

David W.
March 22nd, 2012, 12:30
Thank you too ;)

It's a great pleasure to share my expirence with you.

crashaz
March 22nd, 2012, 19:48
WoW! Thank you very much for sharing with us. :wavey:

Tako_Kichi
March 30th, 2012, 16:31
Has anyone had any success with this unit yet?

I just placed it my current model but when I went to export it the exporter complained numerous times about 'No definition found for animation XYZ' and 'Ending an animation that wasn't started.....'.

The model shows up in the VC (with textures) but of course nothing works. I do have the XML file in the panel folder and I added the info to the panel.cfg file.

I am guessing that I need to assign the animations to something but I am not sure what at the moment and I'm afraid my high school French (from 40+ years ago) hasn't helped me to find an answer on the French website linked to above for support.

Edit: I just noticed that the image for the moving map (called I presume from the default GPS) is mirrored vertically and offset so it is upside down and back to front in terms of the text on the visible buttons.

David W.
March 31st, 2012, 02:27
Hi Tako_Kichi,

In first thank you to try to use my kit, and you are the first that gives me a return

And with my poor english, I will try to help you to use this package to reply on your bug.



Has anyone had any success with this unit yet?

Yes, me (Just a joke :d)



I just placed it my current model but when I went to export it the exporter complained numerous times about 'No definition found for animation XYZ' and 'Ending an animation that wasn't started.....'.

The XYZ is a generic name to use or the real message of Gmax ? It is possible to list the animations with problem ?

When you import the model, which fonction use on Gmax; "File > Merge ..."



The model shows up in the VC (with textures) but of course nothing works. I do have the XML file in the panel folder and I added the info to the panel.cfg file.

Do you have copy all lines of "modeldef.xml" into your "modeldef.xml" present in "...\SDK\Environment Kit\Modeling SDK\bin\modeldef.xml" before launch Gmax ?



I am guessing that I need to assign the animations to something but I am not sure what at the moment and I'm afraid my high school French (from 40+ years ago) hasn't helped me to find an answer on the French website linked to above for support.

No problem, I try with my english... :)


Edit: I just noticed that the image for the moving map (called I presume from the default GPS) is mirrored vertically and offset so it is upside down and back to front in terms of the text on the visible buttons.

Yes, a bug. I upload a new version (V0.2.1) go on http://www.danslesairs.fr/portail/index.php?/files/file/14-sdk-habillage-3d-pour-garmin-gps-500/


Sorry for this late answer

Tako_Kichi
March 31st, 2012, 14:39
Thanks for the prompt reply David and sorry it took me a while to answer but I have not felt well today and spent most of it ill in bed (and on my birthday too! :crybaby:)


And with my poor english, I will try to help you to use this package to reply on your bug.

Your English is way better than my French. :icon_lol:


The XYZ is a generic name to use or the real message of Gmax ? It is possible to list the animations with problem ?
The 'XYZ' was just my way of showing there were multiple error messages that referred to every animation call.


When you import the model, which fonction use on Gmax; "File > Merge ..."
Yes I used 'File>Merge' to import.


Do you have copy all lines of "modeldef.xml" into your "modeldef.xml" present in "...\SDK\Environment Kit\Modeling SDK\bin\modeldef.xml" before launch Gmax ?
This I think is where I went wrong. I copied the 'modeldef.xml' file into the panel folder as I thought (incorrectly) that it was a gauge XML file and not a part of the core XML file in the SDK. Can I copy and paste that data anywhere in the 'modeldef.xml' file (i.e. at the bottom or between other sections) or does it have to go in a specific place?


Yes, a bug. I upload a new version (V0.2.1) go on http://www.danslesairs.fr/portail/index.php?/files/file/14-sdk-habillage-3d-pour-garmin-gps-500/
I am glad I was able to find a bug for you and I will try the newest release as soon as possible.

Tako_Kichi
March 31st, 2012, 16:10
Do you have copy all lines of "modeldef.xml" into your "modeldef.xml" present in "...\SDK\Environment Kit\Modeling SDK\bin\modeldef.xml" before launch Gmax ?

This I think is where I went wrong. I copied the 'modeldef.xml' file into the panel folder as I thought (incorrectly) that it was a gauge XML file and not a part of the core XML file in the SDK. Can I copy and paste that data anywhere in the 'modeldef.xml' file (i.e. at the bottom or between other sections) or does it have to go in a specific place?
That was indeed where I went wrong and I just copied the correct bits of the supplied code into the 'modeldef.xml' file and I have a semi-working GPS unit now (see details below). I copied the data from AFTER the line <ModelInfo> and BEFORE the line </ModelInfo> and I pasted it into the 'modeldef.xml' file right before the final </ModelInfo> line. GMAX then compiled without complaining (it did take me a few attempts before I found the correct place to paste the data though).

The GPS unit is now working in sim with the map the correct way up (i.e. not mirrored) but I think I may have found another bug for you David. The rocker switch in the upper left corner only zooms in it does not zoom out and it does not appear to be animated in any way as it does not move, at least in FSX, although I can see it moving in GMAX when I move the animation slider.

While I am talking about animations I feel the movement on all the buttons is just way too small. You can barely see any movement on the buttons when you press them and they could easily move twice as far (including the rocker switch) which would look better as at least then you could be certain you had pressed the button in the VC. I just double-checked the animation travel in GMAX and it is a lot more than you see in FSX so there is something odd going on there and the travel distance is being reduced in the sim for some reason.

I also checked the unit at night and as it has no illumination on the screen or buttons it is very hard to see. Might I suggest some night lighting for the unit too David?

David W.
April 1st, 2012, 00:55
Hi Tako_Kichi,

I hope you feel better today;)

In first, you must keep the "modeldef.xml" structure when you add line.

See below a short exemple if a merge two "modeldef.xml":

File A


<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo>

<Animation name="rudder_percent_key" guid="D9C0B557-6EA8-4DAB-BB02-C7CCCCCDBB57" length="100" type="Sim" typeParam="AutoPlay" typeParam2="rudder_percent_key"/>


<AnimationGroup name="Exterior" guid="0xB331C7EF,0xE2BA4276,0x84C433B2,0xBA9781B3">
<AnimationRef guid="D9C0B557-6EA8-4DAB-BB02-C7CCCCCDBB57"/>
</AnimationGroup>


<PartInfo>
<Name>rudder_percent_key</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Sim>
<Variable>RUDDER DEFLECTION PCT</Variable>
<Units>percent</Units>
<Bias>50</Bias>
</Sim>
</Parameter>
</Animation>
</PartInfo>

</ModelInfo>

File B


<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo>

<Animation name="GPS_500_btn_fpl" guid="EEDE017F-DD77-4D85-A190-A4C68EB29EF3" length="100" type="Sim" typeParam="AutoPlay" typeParam2="GPS_500_btn_fpl"/>


<AnimationGroup name="GPS" guid="0xB331C7EF,0xE2BA4276,0x84C433B6,0xBA978103">
<AnimationRef guid="EEDE017F-DD77-4D85-A190-A4C68EB29EF3"/>
</AnimationGroup>


<PartInfo>
<Name>GPS_500_btn_fpl</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>50 (L:GPS_500_btn_fpl,enum) 50 * +</Code>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<MouseFlags>LeftSingle+LeftRelease</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
if{ -1 (>L:GPS_500_btn_fpl, enum) (>K:GPS_FLIGHTPLAN_BUTTON) }
(M:Event) 'LeftRelease' scmp 0 ==
if{ 0 (>L:GPS_500_btn_fpl, enum) }
</CallbackCode>
</MouseRect>
</PartInfo>

</ModelInfo>

Result merge A+B


<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo>

<Animation name="rudder_percent_key" guid="D9C0B557-6EA8-4DAB-BB02-C7CCCCCDBB57" length="100" type="Sim" typeParam="AutoPlay" typeParam2="rudder_percent_key"/>
<Animation name="GPS_500_btn_fpl" guid="EEDE017F-DD77-4D85-A190-A4C68EB29EF3" length="100" type="Sim" typeParam="AutoPlay" typeParam2="GPS_500_btn_fpl"/>

<AnimationGroup name="Exterior" guid="0xB331C7EF,0xE2BA4276,0x84C433B2,0xBA9781B3">
<AnimationRef guid="D9C0B557-6EA8-4DAB-BB02-C7CCCCCDBB57"/>
</AnimationGroup>

<AnimationGroup name="GPS" guid="0xB331C7EF,0xE2BA4276,0x84C433B6,0xBA978103">
<AnimationRef guid="EEDE017F-DD77-4D85-A190-A4C68EB29EF3"/>
</AnimationGroup>


<PartInfo>
<Name>rudder_percent_key</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Sim>
<Variable>RUDDER DEFLECTION PCT</Variable>
<Units>percent</Units>
<Bias>50</Bias>
</Sim>
</Parameter>
</Animation>
</PartInfo>


<PartInfo>
<Name>GPS_500_btn_fpl</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>50 (L:GPS_500_btn_fpl,enum) 50 * +</Code>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<MouseFlags>LeftSingle+LeftRelease</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
if{ -1 (>L:GPS_500_btn_fpl, enum) (>K:GPS_FLIGHTPLAN_BUTTON) }
(M:Event) 'LeftRelease' scmp 0 ==
if{ 0 (>L:GPS_500_btn_fpl, enum) }
</CallbackCode>
</MouseRect>
</PartInfo>


</ModelInfo>



The GPS unit is now working in sim with the map the correct way up (i.e. not mirrored) but I think I may have found another bug for you David.

Cool , but not for the new bug ;-)


The rocker switch in the upper left corner only zooms in it does not zoom out and it does not appear to be animated in any way as it does not move, at least in FSX, although I can see it moving in GMAX when I move the animation slider.

Indeed you right the zoom button it's not perfect but you can zoom in and zoom out. To zoom in use your left click and zoom out right click. The problem was in animation button is not perfect. For this moment I must found the good XML code to correct the bug.



While I am talking about animations I feel the movement on all the buttons is just way too small. You can barely see any movement on the buttons when you press them and they could easily move twice as far (including the rocker switch) which would look better as at least then you could be certain you had pressed the button in the VC. I just double-checked the animation travel in GMAX and it is a lot more than you see in FSX so there is something odd going on there and the travel distance is being reduced in the sim for some reason.

Ok, I must check the translate animation for all the button. ;) I'll consider your point and increase the value of movement of the button for the next release.


I also checked the unit at night and as it has no illumination on the screen or buttons it is very hard to see. Might I suggest some night lighting for the unit too David?

Yes, but this GPS is only for VFR (no VFRNight or IFR). Hihihi just a joke.
My knowledge of today does not allow me to add Self Illumination and night maps on texture. I can understand it's very problematic, I must learn about this feature. For moment it's not possible to add on this gauge. I'm sorry Tako_Kichi :(.
You must be patient.


I hope you have understood my explications ;)

See you soon or on the next bug :p

Tako_Kichi
April 1st, 2012, 10:03
Hi Tako_Kichi,

I hope you feel better today;)
I'm feeling much better so far today thank you. :icon_lol:


In first, you must keep the "modeldef.xml" structure when you add line.

See below a short exemple if a merge two "modeldef.xml":

Thank you for the info and I now have the XML file set up correctly.


Indeed you right the zoom button it's not perfect but you can zoom in and zoom out. To zoom in use your left click and zoom out right click. The problem was in animation button is not perfect. For this moment I must found the good XML code to correct the bug.
I can use it like this for now and I hope you will be able to find the code to fix the problem. I checked out the Real Air Beechcraft Duke earlier today and it has a 3D modelled GPS 500 and a very nice animation on the rocker switch. I don't know if you have that aircraft but if you do you may be able to get some clues from the way they programmed their unit. They also have a very nice animation on all their buttons too.



I also checked the unit at night and as it has no illumination on the screen or buttons it is very hard to see. Might I suggest some night lighting for the unit too David?

Yes, but this GPS is only for VFR (no VFRNight or IFR). Hihihi just a joke.
My knowledge of today does not allow me to add Self Illumination and night maps on texture. I can understand it's very problematic, I must learn about this feature. For moment it's not possible to add on this gauge. I'm sorry Tako_Kichi :(.
You must be patient.
Patience is not one of my better virtues I'm afraid! :icon_lol:

I had a quick play with the model/textures and came up with this after a short time.....

http://i1018.photobucket.com/albums/af305/Tako_Kichi/night_gps.jpg

The green 'lights' only show at dusk/night.

I am more than willing to share how I did this and I could even make the texture for you but I really need to know the name of the font you used for the text as I had some close but not exact and it needs to be an exact match for the effect to work correctly. Better yet would be if you were willing to share your original layered artwork (as a PSD file) and then I could be sure of getting it exact.

I haven't found a way of illuminating the map yet but I will make some enquiries.


I hope you have understood my explications ;)

See you soon or on the next bug :p
I understood perfectly and your English is very good.

David W.
April 2nd, 2012, 09:56
Hi Tako_Kichi,

I haven't the Realair duke, but today I have seen some Youtube videos about the VC. And after, read this pages about the aircraft (http://realairsimulations.com/duke09/intro.php?page=duke09_intro).

I have now some ideas to upgrade the switch. I must add XML code and test. Maybe a new gauge for the week-end "Easter", maybe ;).

Waouh the result of night texture is very cool. I send a email with forum system to give you the PSD file. Be careful, I don't use a text layer; just this image: http://www8.garmin.com/HiRes/aviation/gps500/gps500-taws.jpg

Sorry I don't which font you must use for the butom text :(.

I'm very impatient to know how you create and which gmax material option for this great result.

N2056
April 18th, 2012, 20:14
David, many thanks for the work you have done on this. I have been doing some refinements of my own that will simplify the way the display is done, along with some additions (power knob) that are forthcoming. Here is what it looks like in my current project...

http://farm6.staticflickr.com/5031/6946352870_d87c270734_b.jpg

David W.
April 19th, 2012, 13:25
Thank you N2056... !!! ;)

Two videos to present the futur release !!

Knob power with increase light:
http://www.youtube.com/watch?v=Q3OSViBQqgk

Update the button and zoom button (my environment test;) )
http://www.youtube.com/watch?v=hrswpxPkHK4

David W.
April 22nd, 2012, 07:39
News !!

h2cipIjDtPQ

David W.
April 22nd, 2012, 11:13
See below the fisrt documentation (french) for the SDK !!
SDK 3D Garmin GPS 500 - Readme (http://www.danslesairs.fr/data2/readme.pdf)

http://www.danslesairs.fr/data2/doc.png

The next release coming soon !!

David W.
April 25th, 2012, 03:31
http://img15.hostingpics.net/pics/905965Sanstitre.jpg

Now I try to increase the brigthness to have a LCD effect. If you have some idea you are welcome !

Tako_Kichi
April 25th, 2012, 09:45
David go to the link below and download the file....

http://rapidlibrary.com/files/fsx-emissive-textures-and-vclighting-zip_ulzt8yfeqmi89on.html

...that will explain how to add a 'back-light' effect to the GPS screen but you may have to change the way you made the screen plane and the materials you used as both Robert and myself tried to do this for you already but the way you have the model set up at the moment won't work.

David W.
April 29th, 2012, 11:28
http://danslesairs.fr/data/screenshots/monthly_04_2012/thumb-10dab3bd8a9839234e4e4e3557ee0764-.jpg


File Name: SDK - 3D Model for Garmin GPS 500
Author File: David W. (http://www.danslesairs.fr/portail/index.php?/user/1-david-w/)
Date Added File: April 29, 2012
Category File: Developer
Version Flight Simulator: FSX
MD5 Checksum: 518874409E4A7375C00CCE546C65AAFE

Development kit for adding a 3D model Garmin GPS 500 for Flight Simulator X


Click here to download this file (http://www.danslesairs.fr/portail/index.php?/files/file/14-sdk-habillage-3d-pour-garmin-gps-500/)


Support

Click here (http://www.danslesairs.fr/portail/index.php?/topic/10-sdk-habillage-3d-pour-garmin-gps-500/)

/!\ Reminder: No support will be made ​​on FS-Developer



[b] Update [/ b]

[quote] Versioning:
--------------------
0.3.0 / 29/04/2012

- Improved the code buttons
- Improved code knobs
- Added button "Logic" to reset variables
- Added the rotary ON / OFF
- Added a texture "Light Map" [/ quote]

I want to thank "FlipFlap" for taking the time to read the documentation in order to correct errors.

Tako_Kichi
April 29th, 2012, 11:44
Hi David, I just tried to download the file but when I click on the download button (telecharger) it takes me to a log in screen instead.

David W.
April 29th, 2012, 12:04
Retry, I think is okay now !!

Tako_Kichi
April 29th, 2012, 12:52
Retry, I think is okay now !!
It works now. :applause:

EDIT: There appears to be a problem with your exe package David as it shuts down automatically after being open for a few seconds. It doesn't even give me time to navigate to the folder I want to unpack it to. I think a zip file may be a better option especially for non-French speakers like me. :icon_lol:

David W.
April 30th, 2012, 00:31
It works now. :applause:

EDIT: There appears to be a problem with your exe package David as it shuts down automatically after being open for a few seconds. It doesn't even give me time to navigate to the folder I want to unpack it to. I think a zip file may be a better option especially for non-French speakers like me. :icon_lol:


Hello Tako_Kichi ;-)

It is possible to check the MD5 of the file, and look is the same of this 518874409E4A7375C00CCE546C65AAFE

Are you on Vista or Seven ? If yes, which level do you use on UAC (User Account Control) ?

Try with right click and select "Run As Administrator", to see is better.

I send (email) you a video how it's work, and a second exe file to try is better with.

I prefer today use a exe. If I can't correct this bug maybe I switch in a zip file, maybe :p

Tako_Kichi
April 30th, 2012, 08:45
Hello Tako_Kichi ;-)

It is possible to check the MD5 of the file, and look is the same of this 518874409E4A7375C00CCE546C65AAFE

Sorry I don't have a MD5 checksum program installed at the moment so can't check the value of the exe file.


Are you on Vista or Seven ? If yes, which level do you use on UAC (User Account Control) ?

I am on Win 7 64 bit and always run as an Admin.


Try with right click and select "Run As Administrator", to see is better.

Tried that and it still timed out.


I send (email) you a video how it's work, and a second exe file to try is better with.

I prefer today use a exe. If I can't correct this bug maybe I switch in a zip file, maybe :p

I did manage to get the new exe to complete the unpack process just once but nothing appeared on my desktop which is where I told it to unpack to.

David W.
May 1st, 2012, 04:42
Update !


Versioning: :
--------------------
0.3.1 / 01/05/2012

- Improved the textures


Tako_Kichi, it's possible to look if is the same bug with this new version ? Thank you ;)

Tako_Kichi
May 1st, 2012, 08:50
Update !




Tako_Kichi, it's possible to look if is the same bug with this new version ? Thank you ;)
The installer is still failing to complete and timing out before I can enter the location where I want it to unpack. I tried just clicking on the installer and running as an Admin, neither way worked.

David W.
May 1st, 2012, 09:41
The installer is still failing to complete and timing out before I can enter the location where I want it to unpack. I tried just clicking on the installer and running as an Admin, neither way worked.

I look to add "english" package on installer. Maybe this can resolve the problem. I hope !!

David W.
May 1st, 2012, 09:42
If some persons have some idea to the future of this gauge, you are welcome :)

Coming soon:

OHvybEx_IJM

David W.
May 2nd, 2012, 11:44
The version V0.4.0 is now available !!

http://www.danslesairs.fr/portail/index.php?/files/file/14-sdk-habillage-3d-pour-garmin-gps-500/


Panning the 2D gauge GPS
Correction of conditions for the Zoom button
Opening / Closing the 2D panel GPS
Adding "ToolTipText"
Adding condition for starting the GPS


TTdWUpwCyCw