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

*.asm compiling problem

Messages
4
Country
italy
Hi, all
My name’s Stef and I am a newbie in scenery design (this is my first post ever). I’d like to learn to tweak the source code to get better results.

In Gmax, I have created a simple sphere, applied a material to it and exported it as a Flightsim Scenery Object (*.MDL) in this folder:
Flight Simulator 9\Addon Scenery\scenery ; so in this folder the following files reside:

Sphere_0.asm
Sphere.asm
Sphere.mdl
Sphere.XML

In the same folder there are also BGLComp.exe and BGLC_9.exe

If I don’t want to tweak the sphere_0.asm file, I use the following sequence:
I simply open the Sphere.XML, remove the comments, save it, and drag’n’drop it over BGLComp.exe to get the desired Sphere.bgl; this way, the sphere appears at the default location included in the .XML file (at KSEA). So far so good.

Of course, I don’t need any sphere at KSEA; all this is just to learn the tweaking procedure.

If I want to tweak the sphere_0.asm file, I use the following sequence:
1) Open sphere_0.asm file in NOTEPAD to tweak its parameters (i.e. changing one of the rgb values for the diffuse channel in the applied material) and save it.
2) Erase the Sphere.mdl created by Makemdl.exe (I do this because I think that having changed even a single parameter in the sphere_0.asm the .mdl file isn’t updated)
3) In DOS I launch BGLC_9.exe to compile Sphere.asm (with the \MDL option) and get the new updated Sphere.mdl
4) I drag’n’drop Sphere.XML over BGLComp.exe to get Sphere.bgl file.

Nevertheless, in FS the sphere isn’t changed (I mean its color is unchanged). Obviously, the sphere appearance is not important, I just want to know if my sequence is correct. Maybe the sequence is correct but I can’t change the diffuse color this way I don’t know.

I have also tried to compile Sphere.asm (with the \BGL option this time, ignoring the .XML file)
to get Sphere.bgl.

But here is what happens;
I double-click FS 2004.exe icon and a warning window appears stating “Your computer has run out of available memory. FS will now exit. You may not have enough space on your hard drive ……. “, leaving me no other possibility than click OK and exit; but this warning is definitely FALSE because my HD is 49% full and 51% empty.

By the way, is it correct to tweak a *_0.asm file by means of NOTEPAD changing the parameters you want (of course if you know the BGLC code) and save it ? Or is there a special utility\tool\program for the tweaking task?

So, What is the right sequence to tweak the code of a Gmax modeled and exported scenery object?

I’m a bit confused; if I could have a clear step-by-step solution to this problem, I could begin to learn and put to practice the source code tweaking.

One last thing, I’m an expert in 3D modeling having used 3DS MAX for more than 3 years;
having discovered that Gmax is a much simpler tool than 3DS, I will be very glad to put my skills to anyone’s disposal in order to solve modeling issues

Any help to my problem will be very very appreciated, thanks in advance

Regards, Stef
 
Hi Stef,

STEFflyer said:
Nevertheless, in FS the sphere isn’t changed (I mean its color is unchanged). Obviously, the sphere appearance is not important, I just want to know if my sequence is correct. Maybe the sequence is correct but I can’t change the diffuse color this way I don’t know.

That all sounds correct, so it should work fine. Could it be that you make the changes at the wrong location in the ASM file?

Btw, you don't have to remove the old MDL file, it will be overwritten when you run BGLC_9 on the ASM files again.

STEFflyer said:
I have also tried to compile Sphere.asm (with the \BGL option this time, ignoring the .XML file) to get Sphere.bgl.

That will not work, as the ASM code is not for a valid BGL file. So the compiled product will have the BGL extension, but it still is a MDL file. When FS tries to load this, it will crash.

STEFflyer said:
By the way, is it correct to tweak a *_0.asm file by means of NOTEPAD changing the parameters you want (of course if you know the BGLC code) and save it ? Or is there a special utility\tool\program for the tweaking task?

Yes that is fine. Any text editor should do the job and I think most people use a text editor for the tweaking. There are not special tools for tweaking the ASM files, although you could try MDL Tweaker of course, as that can tweak the MDL file directly.
 
Hi, Arno

Thank you indeed for your suggestions.

I did as you wrote and in fact, compiling the *.asm with /MDL option rather than /BGL gave me no other crash (sorry, my mistake, but sometimes you have to try all possible alternatives).

To answer your question “Could it be that you make the changes at the wrong location in the ASM file?” ; yes, you were right once again: actually, I was not tweaking all the numbers I had to.

So, thanks to your help my first try at modifying the source code succeded. Now, I can learn more
about the code and try to solve some problems with my custom runway; In fact, on this runway are a number of different 3D objects (THR marks, TDZ marks, QFU, Aiming points, EDGE marks, etc.); although all of them seem to have no flickering problems, the CENTERLINE marks do have.
I used different zbias_..._ materials for the scenery, supposing that this should help FS know what to show in front and what in the background, but the zbias_10_ applied to the CL doesn’t prevent
them to be seen now and then. I even tried to remove the map from the CL, no exit.

Any solution from you or any other member ?

Thank you very much

Regards, Stef. :D
 
Hi Stef,

Making ground polygons with the Fs2004 gamepack is a bad idea, it is almost impossible to get them working without problems. It is much easier to use the Fs2002 gamepack and then tweak the ASM files to use the ADDCAT command to layer different polygons. Then you are really sure that you have no flickers (and you also get a shadow casted on the polygons).
 
Back
Top