• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

API Create Tutorial ?

Messages
36
Country
czechrepublic
Hi to all,

is anywhere a tutorial how to create own APIs ? If possible via free apps like EOD and so on ? And how to create API to be able to compile it via XML ? Thanx a lot, and sorry for this basic questions - I'm back in scenery design after 2 years and FS9 is absolutely strange for me at this time... :eek:

milan
 
Hi Milan.

In FS9, the structure of scenery objects has changed. Objects are now saved as an MDL file from Gmax, exported through the FS9 MakeMDL. There are no APIs for FS9 using XML placement, as XML places MDL files from Gmax.

Scenery designed for FS2002 can still be used in FS9, and that would include the older API files.

Dick
 
OK, so I have to make object in GMax - then apply texture (with transparency I want) onto it and compile the one into mdl file. Is this way right ? In case of people macros, for example, I made in GMax simply polygon with texture on it ?
 
Yes, you can make any object in the MDL format, just like you did before in the API format. It is just that the internal BGL format has totally changed and SCASM is not (yet) updated to the new format. Therefore it seems best to make your new objects in the Fs2004 format and thus use GMax.
 
Thanks a lot for your help, but it seems that it’s bigger problem for me that I thought ...... It doesn’t work... Little description... :stirthepo

First of all I had problem with exporting objects into .mdl from GMax (1.2).
I downloaded the latest makemdl.exe from MS Make BGL SDK and copied it with makemdl.parts.xml into GMax plugins folder . I created simply object in GMax - box without texture, just colour. I choose File/Export... and select Flightsim MDL file (*.mdl) and set file name experiment:

a) no option window was shown
b) and I got error message :
MakeMDL was not found, or failed to convert to model specified in “C:/...path” to a .mdl file. Check your system path to ensure MakeMDL is on it.

and second message
Export module failure.

c) Okay, so I found older MakeMDL.exe and copied it into GMax plugin folder and tried to export GMax object into .mdl again. No error message was shown as well as no option window.
d) So I installed MDL Commader using manual for installing this utility.
e) I exported GMax object into .mdl again and option window was shown – I choose “building”. Object was compiled into .mdl file (experiment.mdl)

Then I done :

1. I lunched library_creator.exe
2. Using New button I created exp.xml file
3. I added experiment.mdl file
4. Using Compile BGL button I compiled file exper.bgl
5. I created a new xml file including code

<?xml version="1.0"?>
<FSData
version = "9.0"
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation="bglcomp.xsd" >
<SceneryObject
lat="N50 12.09"
lon="E012 54.68"
alt="0"
altitudeIsAgl="TRUE"
pitch="0"
bank="0"
heading="0"
imageComplexity="NORMAL">
<LibraryObject
name="1B26A1C117197385D179AE64C114893A"
scale="1.0"/>
</SceneryObject>
</FSData>


Note: 1B26A1C117197385D179AE64C114893A is copied from library_creator
lat + lot is a position I choose in FS for my experiments


I saved this file as ex.xml
6. I draged and droped ex.xml onto bglcomp.exe and got ex.bgl file
7. I copied ex.bgl and exper.bgl file into Scenery folder I use for my experiments
8. I started FS9, added my experiment scenery, restarted FS, created flight and no object was in defined position. :banghead:

What I done bad ? Is there any mistake ? Uffff... thank you .. milan
 
Last edited:
Humm, that all sounds correct. Are you sure you are using the scenery MDL option and not aircraft MDL?
 
Now it works fine :rotfl: . I just changed MakeMDL.exe - version from 10.05.04 does NOT work with GMax so I used older the one (from 20.01.04). Thanks a lot for wasted time.
milan
 
ur saying there's a makemdl.exe that doesn't work with gmax? What would it work with then, thats the only job for makemdl.exe?

One of the annoyances of gmax..is that error message you quoted, about makemdl not being found on the appropriate path....its a catchall. It will come up sometimes when the only problem is something in the model being corrupt. had that happen recently when I tried to do some new trick with a shape...somehow got it to be corrupt...no idea how, but its presence caused that error message. Once I deleted that shape....gee now makemdl.exe IS found on the right path.....lol

the other thing you haven't learned is that microsoft intentionally wired the fs2004 makemdl to keep us from accessing the options. Believe it or not...but its true. Of course we found our way around that concept, but that's why the options don't show...its not becuase of a mistake you've made.

I never got comfy with mdl commander, but others say it works...sounds like you got there, but if you thought that problem was due to a makemdl error, just wanted to correct that impression.

My way around that problem is that I created a simple txt file called makemdl.cfg. In it I can specify my options. Works like a dream...I have a shortcut to it on my desktop....for any session that needs a changed option....click click....option changed and I never need to see that options box, so it works fine.

You'll find a handful of issues like this that you'll wonder about....what's cool is the list of these issues is fairly small...be a good thing is we jot down each one so the next guy could see it in advance. Once you hit each of the issues like this gmax becomes quite predictalbe. Most of the issues involve setup, so once your setup works, you're most of the way there.

ps...the issues I can think of right now for actually operating gmax are:

1. DON't use the toolbar "mirror" button. It corrupts the normals of the mirrored object. Rather, use "edit menu/clone". Then add a "mirror" modifier to the stack of the cloned object.

2. Don't rename a material upon assignment. crashes gmax. you can rename it later.

3. If you export with animation, you may see an error regarding scaling. the fix is to enter the hierarchy menu, select the animated object, click reset scale.


Having thought about it, Arno probably has these plus others posted somewhere in an FAQ. If so....c'est la vie. If not....perhaps we should extend this list with stuff I haven't thought of.

Best,

Bob Bernstein
 
Bob,
I just created simply box - no shapes, no materials ...
I took MakeMDL.exe, MakeMDL.parts.xml and MakeMDL.cfg from M$ MakeMDL SDK (downloaded yesterday). It doesn't work without MDL Commander and with the one as well.
Then I found older MakeMDL.exe (2001) and it seemed that it works fine (object was compiled into .mdl - no error message), but there's no sceneryFS9 selection. There's possibility to compile object like an aircraft, scenery (you must set LON/LAN/HDG), building and a vehicle. So I choose buliding, but nothing was shown in FS9 later (as I wrote yesterday).
Today I found another older MakeMDL.exe (from 20.01.04) and it works fine.
That's my experience with MakeBGL.exe up to now.
Milan
 
Create API

Hi, Milan
I know everyone is talking about gmax, but this is a general forum, so here it goes.

I find that EasyObjectDesign (EOD), even though much less powerful than gmax, creates reasonable scenery objects, depending what you want to create, and it is many times easier to use than gmax, including and especially the export part. Besides, creating APIs with gmax can drive you to drink.

By nature EOD creates objects that are "lighter" on the cpu than gmax objects are. You fill up an area the size of a village with gmax objects and it will bring many a good machine to its knees, no matter how fancy the video card is.

After a short I was surprised how complex an object can be created with EOD, how proper they look from a distance, and yet how much easier it was than with gmax. For landscape and skyline objects that look familiar, such as buildings, monuments, people, I find EOD actually better than gmax.

Now, EOD creates an API on the spot and it gives you some simple options right before your eyes, such as how to rotate the object towards de airplane (works great for trees, people, adornments on top of cathedrals, flags, etc), how to rotate horizontally constantly (such as a radar antenna) or how to make some parts transparent. Other options, if you ever figure out the language, can be entered in the AIP, as you probably know.

I find EOD a very handy tool and I have used it extensively to create all kinds of scenery objects.

Fern
 
Hi Fern,

Fern said:
By nature EOD creates objects that are "lighter" on the cpu than gmax objects are. You fill up an area the size of a village with gmax objects and it will bring many a good machine to its knees, no matter how fancy the video card is.

If you like a tool or not is always personal taste as well of course. But here I can not agree. The code EOD uses is old (Fs98/Fs2000 style) and testing has showed that this code is slower then the floating point code of Fs2002 and Fs2004.

So I theory GMax gives you smaller code. It can be that people are making their objects super complex with GMax more often, but if you compare similar objects GMax is certain better.
 
Back
Top