Jump to content
Sign in to follow this  
bob.bernstein

API Create Tutorial ?

Recommended Posts

Guest meiilaX

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...milan

Share this post


Link to post
Share on other sites

It seems the best approach here is to suggest you use gmax. This is free and the output is a mdl file that is easy to call from an xml file, as you request. Details are in the bglcomp sdk released from microsoft for how the xml should look. you need gmax with the fs2004 makemdl download, included on your fs2004 cd.The term api is kind of an anachronism, but the concept is suggested by the mdl file, in that both are code modules that can be used by an assembler code to create a bgl.Bob Bernstein

Share this post


Link to post
Share on other sites
Guest GCBarni

Just to add to Bob's thoughts and perhaps answer your question even further. We're discussing two different strategies here: API's need to be compiled into *.bgl files using SCASM as the compiler, whether directly or via a program like Airport for Windows; while XML files are compiled into *.bgl files using BGLComp and a program like SceneGenX can facilitate that. If you were designing using API's 2 years ago, not a whole lot has changed in that time. There is the perception, whether right or wrong, that future versions of FS will no longer support API-style objects; thus you will notice suggestions for doing your design in GMAX which can create MDL files for compilation via BGLComp which is supposed to be the preferred method of doing 3d objects.I would suggest you begin with EOD again, to get your bearings and then consider tackling GMAX which can be a bit of a steep learning curve.

Share this post


Link to post
Share on other sites

Gcbarnie, you make a point I've heard before. I do have an interesting question. Not having learned EOD, I can't comment on that specific proggy, but the people that claim gmax has "a steep learning curve" are dealing with both learning gmax AND unlearning a different progrry (fsds, usually) at the same time.Would GMAX have the reputation of "steep learning curve", if none of us had ever used anything else, and met gmax as our first 3d object cad design software?Its a question that likely can't be answered to anyone's satisfaction, but I do think that gmax and other proggys are different, gmax is the most powerful, and most likely to be supported in the future, and this user specifically asked for an xml based system, so I can't see any other alternative. Learning EOD first likely makes gmax harder to learn and stops the user from designing in the latest code? How is that a good idea?Just a matter of intellectual interest, clearly the user must do what he/she wishes.Bob B

Share this post


Link to post
Share on other sites

I second Bob here. For people starting scenery design I would strongly suggest to use GMax. If you first have to learn EOD and then have to relearn GMax again it will be frustrating. GMax requires some other thinking then tools like EOD and FSDS, so you do not really have an advantage when you already now FSDS when you start learning GMax.And about the formats. Internally the Fs2004 BGL format has changed completely. Although old scenery (API macros, Fs2002 GMax gamepack, etc) does still work it does not use the Fs2004 BGL format. So writing that not much has changes the last 2 years is not really correct. And for the future it seems most logical that MS will not keep supporting a lot of different version of the BGL, so it seems safest to keep with the latested technology. Although we know nothing for sure until the new FS is there of course. Another advantage of GMax is that MS does provide the gamepack, while an update of SCASM for the new format is still not finished.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest GCBarni

I meant to infer that not much has changed in 2 years with repect to creating *.api objects....and I stand by that assertion since this has been my sole method of designing scenery for the past 5 or so years. If the writer was confortable doing *.api object design a couple of years ago, it shouldn't take much to return to employing that format today.I have tried to use Gmax....when it was first made available with FS2002. And I found that it was powerful, yes, but also overwhelming. But then, I also found going from VOD to FSDS a huge step!I realize that proponents insist that Gmax is superior and that I should get off my butt and learn to adapt to Gmax, but after trying yet another tutorial, I find that I bog down and give up. My suggestion for learning to use EOD is to prepare the user for Gmax. FSDS also helps to recognize the use of shapes that I have to assume is necessary for using Gmax, but I wouldn't recommend FSDS as it is a comercial product.There's another aspect of design that doesn't get a lot of attention and that's texture use and preparation, which has chanaged dramatically the past couple of years. By getting started with a comparitively simple tool like EOD, more time can be devoted to honing texture creation skills.I think I recall Arno mentioning not too long ago that it would be quite interesting for a group of designers to create the same objects using the *.xml and *.api formulas and then placing them in the same scenery compilation to determine which method is more conducive to FS performance. I know that to be progressive, Gmax is the route to take, especially if support for *.api format is discontinued but I wonder if the 'test' above would prove once and for all if one way or the other is the more efficient on resources.

Share this post


Link to post
Share on other sites
Guest meiilaX

That's no problem for me - "classic" object (like terminals, buildings and so on) I ever created in GMax. I created only AIPs in EOD and used them as 3D objects in AWF, I remember. It was a long time ago and now I must remind how to work with GMax... Thanx milan

Share this post


Link to post
Share on other sites

Hi Barney,Yes, you are correct. The process of making API macros has indeed not changed (and will probably never change anymore).Learning GMax indeed seems to give problem for some people. Problem like you indicate because GMax is a bit complex when you first start it. But I have also heard of designers who get into trouble because they try to work with GMax exactly like they did with EOD/FSDS before. This gives also trouble, as it requires a little bit of different thinking. That is why I recommend most people to start with GMax right away.But if you do not plan to make a lot of scenery it is probably easier to learn EOD and make the object you want. That is also true.I can't remember that we had discussions about a API vs XML test here, could be that is was on another forum. But I doubt it is really useful. Test with Fs2002 have shown that the floating point commands are better then the old commands (the ones EOD and FSDS1 still use). FSDS2 and the GMax gamepack for Fs2002 use the floating point commands.But personal I don't think it is useful to compare these techniques with the new RIFF BGL format. MS has chosen to use this format and it seems most likely that some of the old commands (probably the integer point commands) will no longer work in the next sim. So even if there is no clear difference, it seems logical to use the latest techniques.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest meiilaX

Is there any difference (FPS, object-view, texture blink, transparency, memory...) in objects created as API via EOD and compiled via AirportForWindows into bgl, and object created via GMax as .mdl a compiled to bgl ? m

Share this post


Link to post
Share on other sites

Yes, as has been written before in this thread the format of the BGL has completely changes.Few examples.EOD uses integer point, GMax uses floating points. This means that with EOD you need to use a small scale to get more detail. With floating point you don't have this problem.The framerate of objects made with these floating point commands is also better then using the old integer point commands. As discussed in my previous reply the exact difference between the Fs2002 and Fs2004 GMax gamepack is not yet known.For the textures the difference is smaller, as you can use the same textures in both programs (DXT with mipmaps is best for both). But the code internally to load the textures, map them on the polygons etc has changed a lot. This code is very similar to the code used by DirectX to feed the graphical card, meaning that less transformations are needed before it can be displayed on your screen.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest GCBarni

While I agree with most of what you say, your statement about trouble arising from attempting to do things in Gmax the way one does so in EOD, I find intriguing.In EOD, I work with pre-programmed basic shapes, depending upon how I wish to texture the item. Really simple things like a hangar can usually be done with a rectangle and a roof making tool. For more complicated items, like a terminal for instance, I tend to use a flat 2-sided plane and texture the 'front' side only, adding panels as required like one would make a quilt, e.g. Most of the pre-programmed shapes allow for rotation about all 3 axis and angling thru 180 degrees.With items that have extremely irregular shapes, especially curves, I use FSDS. With this program, I use a template, which is most easily described as a *.bmp live shot of the object and then employ an 'extrude' tool to create the 3 dimensions of the template.These are over-simplified examples and descriptions of my methodology, but I'm hoping they'll serve as some kind of beginning for you to compare with how things would be done differently in Gmax that would give me headaches, as it were.If you confirm that going to Gmax means I have to dump everything I now know and make a fresh start, it means I'm even worse off then I thought!!

Share this post


Link to post
Share on other sites

Saying that you need to forget everything when you learn GMax is not true of course. But if you keep thinking like the other tools, you will miss most of the fun of GMax.One of the most powerful parts is for example the use of boolean operations. If you want to make a whole in an object for example, why not just subtract another objects with the shape you want to remove?Of course you start with basic shapes like tubes and boxes, but I find that when I use GMax I am fiddling less with points, I am more adding and subtracting shapes from each other.Another nice feature is that you can extrude a side of an existing object. So if you have a cube for example, you could extrude the top polygon and use that as a basis for the roof (for example by welding the vertices together to form a peaked roof).It is just that thinks like this go a lot easier in GMax and that makes it a lot more fun I think.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Barni, you've demonstrated my previous point better than I could. If you had never learned to make templates (I'm an old fsds'r myself), and never learned to place one shape onto another, you'd have a much easier time creating that shape from a multisegmented primitive using extrude and then vertex collapse, which I assure you is a faster model to create, and much more precise, lower polygon count, and therefore will be more efficient for the sim to display. Add to that the word "template" is a really bad word to learn if you want to use GMAX well....cuz you won't find it, and you'll think you should find it.On the other hand "splines" wasn't a term you learned in fsds, but you can do way cool things with them and make them perform as "super templates".It would so much easier to learn to model the gmax way if you had never burdened yourself with other ideas.Best,Bob Bernstein

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...