Sign in to follow this  
rhumbaflappy

Is there a tutorial on FSREGEN?

Recommended Posts

Now that I am done with our first scenery for FS, I am now trying to comprehend FSREGEN.It's totally greek to me.How do I change a GMAX model into an api using FSREGEN, so that it behaves as a Gmax bgl with a little frame rate hit in FSArchitech or any othe 3rd party program?Step by step please? I'm old............http://members.rogers.com/jkanold/jimlogo.gifhttp://members.rogers.com/jkanold/flyurl.gif

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

not too hard, but it does take some getting used to.Start with the latest makemdl.exe...so that you get two files, one is myfile.asm and the other is myfile_0.asmstart fsregen, and ignore everything except the stuff at the bottom.click on library tool (this is from memory so I might get a term wrong). It gives you windows to put the path to your .asm file, and a place to set the hexadecimal "call" id. You can also fool with scale here, but I don't. Once you like the settings, click on add file.Now highlight the file in the list, and click on make .api button. If you don't have this button, go back to George's site and download the latest version.Also click on Make library file, or something like that. This will create a new .asm file which will become your library bgl.The results at this point is a new .asm file and a new .api file. Take the new .asm file and compile it using bglc. the button in fsregen to do this is buggy, I do it manually.Save your file before you exit fsregen from the file drop down menu. That way you can load it later and add more objects to the same library.now your .api should work as you would expect. I find the scale must be normally set in my calling program to .5good luck,Bob Bernstein

Share this post


Link to post
Share on other sites

the bgl you have already created is a stand alone from gmax. You can use that if you want. I thought you wanted to learn how to make a macro. Whoever told you that macros are framekillers? That's bogus. The framekilling is done by giving fs2k2 framekilling instructions. A macro is just an organizational concept that allow one to group code in a useful way. by itself, the idea of macro has no better or worse impact on performance then if the code was just written in one big batch. macros enable simple reuse. These macros actually consist of nearly no code at all, just open one once you've done this method. You'll find very little except a calllibobj command. It simply invokes the library object that is coded in bglc. It does provide the opportunity to pass down some variables from Airport.If you want the convenience of gmax macros, and you want to store the macros as section 10 library objects, then the procedure I layed out will give you the gmax bgl (as you pointed out), that you discard.Now you are left with an api, that you'd call from airport or fssc, and a new bgl, which is called a library bgl. This is a great way to organize your work.

Share this post


Link to post
Share on other sites

I just re-read the thread. Several factors make the process I just spelled out framefriendly...one is that the new bgl you create is a library object, which is read by the sim differently than the standard bgl files. The other is that the instructions in the library bgl are coded in bglc. The .api is scasm and it just calls the library bgl, but it serves as an interface between the bglc code in the library bgl and the scasm code needed by most design programs.make sense?B

Share this post


Link to post
Share on other sites

>"Whoever told you that macros are framekillers? That's bogus." You stick in a single macro made by any third party program other than Gmax into a scenery and it will bring it to it's knees.It has something to do with the floating point method.Even third party airport layout programs kill framerates cause they don't work with this floating point method. In our next scenery project, EVERYTHING will be done in GMAX.There have been numberous tests on this very forum comparing a GMAX macro to that of any other type. Virtually no frame rate hit with a GMAX macro.I do appreciate your help and will attempt to make my first macro tonight when I get home from work. http://members.rogers.com/jkanold/jimlogo.gifhttp://members.rogers.com/jkanold/flyurl.gif

Share this post


Link to post
Share on other sites

of course, I was the one who suggested that test in the first place...but we don't want to draw the wrong conclusion. To say that our testing condemned macros is an errant conclusion. Our testing condemned the old fashioned code. macros or not macros in the code structure have nothing to do with it.these macros contain NO code (more or less), but they call the new floating point code from the library object bgl.

Share this post


Link to post
Share on other sites

<>Well Jim, may I ask why you bothered to ask the intial question then? You can imagine how fun it is to diligently help someone who has NO intention on using that knowledge.Well, burn me once....your fault, twice...my fault.B

Share this post


Link to post
Share on other sites

Boy oh boy, some people really read into things.I wanted to confirm that Gmax macros were the same as placing GMAX models directly.If they are, I may change my mind and simply use a 3rd party program to draw in the runways and excludes and then place all the GMAX macros. It sure would be easier.Sorry to catch you on fire.http://members.rogers.com/jkanold/jimlogo.gifhttp://members.rogers.com/jkanold/flyurl.gif

Share this post


Link to post
Share on other sites

I think it is better to draw the airport polygons not with GMax, but with an other design program.I did some tests with placing the concrete and asphalt polygons for Schiphol in GMax and the framerate was worse then when I used my old ones (those were made with the old SCASM commands, but not using Airport or so, but with my own converter). For some reason GMax wasn't better in this case.At the moment I am rewriting that converter so it can produce the floating point commands and I hope to get some extra fps from that :D.PS. I hope I didn't throw some extra oil on the fire :D, just sharing my opinion.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

I'm fine, it just felt like after the first post Jim was starting to make a case against using a macro to place gmax objects...at which point it seemed he was kind of turning on the very concept he asked to be taught...but I'm ok...after Thunder Bay, Jim earned chits with me!interesting your test, I am just about ready to test a small airport made totally in gmax, myself. be interesting to see....only problem is, its a very small airport (Elma), it might be kind on frames no matter how I modelled it.Bob B

Share this post


Link to post
Share on other sites

Hi Bob up late I see! blame me for Jim's remarks about macros!.It's just that every time we use one our frame rates go into the tank.(if I take the the one macro out of our scenery up go the frame rates) so it's not my models that are the "problem" (the macro involved has custom ramp textures in it that's all) no models at allI get around 18-20 fps with out the above macro and as low as 4 with it!!(on a PII 400mhz). So what we(I) am looking for is a way to uselibrary objects (made by something other than gmax) WITHOUT the aboveimpact on frame rates!! so far I have not found any non gmax objectsthat do. In short it's not meshes that are the problem only "airport"ground textures(tarmacs etc) that are the "problem" and they are donewith the "old" tools Architect in this case. Thanks for your commentson our scenery BTW!. Dan

Share this post


Link to post
Share on other sites

Bob, Jim,I think this is the critical point here, FSRegen created macros only call the library object and nothing else so they have no impact on fps AFAICS. I use it and it is way easier than direct GMAX.Try it...Shez

Share this post


Link to post
Share on other sites

Interesting, you are talking about macros with custom ramp textures that are giving problems. Most object design programs (just like GMax) don't create the right code for ground polygons (like ramp textures), they make code that is much to complex. So I can imagine that such code can give a performance hit. Although I think the difference you name is very big (compared to the default scenery scenery never gave such a drop while using a lot of macros).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Yep, I agree. The code that is in the macro (Area, RefPoint, etc) are also there when you produce the standalone BGL with GMax and that code is almost the same for both cases. So that can't make a performance hit.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Yup please note the the above were not done with gmax of course but with Architect(we would not use gmax for the above) and while putting our models into a library will make many things easier I am not sure that it will solve the FPS problem with non gmax(non floating point) models(nor "ground type airport textures" such as add-on ramps as it's those that kill frame rates. I don't beleve that"ramp textures" being simple poly's use floats do they?. Again Arno,Bob and Shez for your constant help to everybody. Dan

Share this post


Link to post
Share on other sites

With the new commands you can also make macros with the floating point commands of course. But a lot of macros still use old code (sometimes even code that is origional for Fs5/98, but still works, but of course if not as efficient as can be for Fs2002).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

That is interesting because I have just placed quite a few ground polys all over my DCA without any significant (0.5fps) hit on performance. These are FSDS1 simple planes with the appropriate z bias adjustment. I tried a similar technique with a simple GMAX plane and it flickered on the ground. When I made a very thin box (0.01) and placed it on the ground as a polygon the flicker disappeared but the edge of the box was showing even at the extremely small height parameter.RegardsShez

Share this post


Link to post
Share on other sites

Hi Jim.I e-mailed George about 6 weeks ago. He is fine, but his personal circumstances have prevented him from doing anything with FS2002... he doesn't even visit forums anymore ( told me to let him know when FS2004 comes out ). He is fine, healthwise.You could try to contact him, but just don't expect much, as his circumstances may not allow much.george@nhreas.comDick

Share this post


Link to post
Share on other sites

Both methods you mention are not really the solution.Both GMax and FSDS make an object with the PerspectiveCall, while you should use a LayerCall for placing ground polygons. With the polygon you can also give a layer number and that will stop the flickering. As I have said before :), the programs that make 3D objects never give the correct code for ground polygons.For a GMax object I have explained on my site how to make the changes to the ASM file. For the SCASM file it would required replacing the PerspectiveCall with a LayerCall (and you can also remove the ShadowCall as a ground polygon casts no shadow). I want to write a short how-to-do about this some day :).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

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