Jump to content
Sign in to follow this  
Guest GerrishGray

Object becomes a box from distance

Recommended Posts

Guest GerrishGray

Hi again LuisI have not checked them all, but at least some of the default library objects that existed in FS2000 have been re-coded for FS2002 using gMax-generated code, so they could well be affected by the 'aircraft texture' error.IMAGE POWERThe final parameter in an Area() call is correctly named 'image power', not 'range' as in the now-outdated SCASM documentation. Its units are apparently %, not kms, and in the BGLC macros this value defaults to 100% if not explicitly set. It is not clear, however, exactly what effect this 'image power' actually has, although it may still effect the range at which the object is loaded into the current object database? Generally speaking, using a value of 20 or 22 (% not kms) as in the traditional version still seems to work satisfactorily in most cases ...What I believe I have observed is that objects can still be displayed beyond their apparent maximum visibility range, if that range is set to a low value, but lose their texturing in the process. I don't fully understand this behaviour and haven't done enough testing to be sure of when it happens (or even to be sure that it really does happen!), but when sorting out some problems for a new designer, this was one of them and I got the impression that it was caused by setting the image power and/or the v1 value too low. I gave him a corrected code version that corrected several apparent errors at once, and so, unfortunately, I missed the opportunity to test it correctly and eliminate each possible cause one step at a time ... I should have known better, but I wanted to help the guy quickly without confusing him!RegardsGerrish

Share this post


Link to post
Share on other sites
Guest hefy_jefy

Hi,I can't pretend to have understood all of what has gone before, however do I get the message that scenery containing aircraft "parts" is not visible beyond 6km?I have been trying to figure why I can see the runway landing strobes beyond this limit, but my rotating gmax beacon (with landing lights) doesn't become visible until I am closer that 6km....Geoff

Share this post


Link to post
Share on other sites

Thanks Gerrish, some interesting things to know again :).Arno


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

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 GerrishGray

Hi GeoffTo try and clarify the 'aircraft texture' problem with gMax/makemdl.exe:-When you design a building or other similar scenery object with gMax, the compiled code created by makemdl.exe flags the list of texture bitmaps used as being for an aircraft model rather than a building model. This results in the textures not being used beyond a range of 6kms - the building (or whatever) is displayed with just it's underlying 'material' rather than textured surfaces when it is more than 6km away. There are several ways of curing the problem, e.g. :-[ol][li]Capture the .asm code from makemdl.exe and change the value of the parameters in the texture definition list from 1 (aircraft) to 6 (building). This is the CORRECT solution but admittedly needs a little knowledge of BGLC coding. I think you will find the details on Arno's very helpful web site though (is that right, Arno?) and it isn't too difficult.[/li][li]It has also been discovered that the building(s) will display correctly if you place a ground polygon underneath them with at least one very long side! But this is a crude and 'dirty' fix.[/li][li]Use an alternative tool such as FSDS2.[/li][li]Do your scenery design a different way altogether, such as coding in SCASM by hand (it's not really so difficult), or even use a free design tool such as EOD to do the basic 'drawing' of the model and then translate the old-fashioned SCASM code it produces into the up-to-date floating point version.[/li][/ol]For gMax users, solution 1 is the right way to go for the time being (i.e. until MS correct the mistake in makemdel.exe). Buying FSDS2 (or NovaSim once the full version is released some time early in the New Year) is the best choice for those wary of the gMax learning curve - and might produce even better (and quicker) models than gMax. My personal preferred solution (#4) of coding by hand, or translating code generated in some other way, is admittedly only for us 'codeheads' really, but quite a lot of guys find it fun and you can soon learn the rudiments by reading this forum and the various tutorials available, and then asking for help as necessary !!!Solution 2, however, is NOT recommended for anyone who wants to make a decent job of their designs and keep their self-respect!Hope this helps a bit!GerrishP.S. Hi Arno - hope you are keeping well and enjoying your travels between home and Belgium !

Share this post


Link to post
Share on other sites

Hi Gerrish,Yes, everything OK here :). Luckily they also have internet here :D, so I can follow all interesting discussion and in the evenings I can work on my PC here.Now back to the question/problem.Your point 1 should work this way, and it is not hard to change that piece of the code. Only open the _0.asm file and in the texture list (that's at the top of the document) replace the TEXTURE_AIRCRAFT types by TEXTURE_BUILDING. After that it should work fine.Arno


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

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 hefy_jefy

Hi Gerrish,Thanks for all the information, I will give it a try...Geoff

Share this post


Link to post
Share on other sites
Guest

Just last question. Make it two questions ..... What is the proper procedure (syntax) to recompile *.asm file by hand? Do both files need to be recompiled or just the one _0.asm with the change? Thanks Ted

Share this post


Link to post
Share on other sites

You need them both.Let's assume your project is called test.Then the first file test.asm contains the code for the placement of the object. This file includes the second file, test_0.asm, which contains the actual code for the object.So to recompile I type in DOS: "bglc test.asm" and then I get the new BGL file (I have put BGLC on my path to be able to compile easy, but you can also drop the file on BGLC if you prefer the windows way :)).Arno


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

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

On the original question of the Fire/Fuel truck objects.Unfortunately these are just bad objects. They were bad in FS2000 (switching to crude boxes at far too short a distance) and they have major scaling problems in FS2002. It is the same library in both cases and uses TexPoly for the objects rather than the newer code.FS2002 seems to have problems with library objects that have a scale of 1.0It gets confused and at some times displays it far too small or too large. Most FS2000 vehicle objects are scale 0.5 and don`t have any problem. The Firetruck and Fueltruck (and a couple of the ships) are 1.0 and have erratic display problems.These trucks only have 3 Lods but they are set to switch far too soon. About 6 pixels/m and 1.5 pixels/m

Share this post


Link to post
Share on other sites
Guest GerrishGray

Hi MartinThe original problem here was caused, I believe, by an incorrect calling sequence for the library object, omitting the essential PerspectiveCall() step.I do not think that there is any general problem with using scale 1.0 for library objects. There is no logic to this scale, rather than say 0.5, having any particular problem. I have created several thousand library objects with scale 1.0, used by tens of thousands of users, and have had no report of any problem like this.You are certainly right that some of the original FS2000 stock library objects were not quite as well designed as they might have been! I hadn't checked whether they had put this right in FS2002 but I am not surprised when you say not! Many of the other default library objects in the FS2002 scenery have been upgraded to floating point code - what a pity MS didn't put the stock vehicles, boats etc. right at the same time!Keep wellGerrish

Share this post


Link to post
Share on other sites
Guest

Excuse me my "ignorance", but hearing all the time terms "floating point code" I was always wondering is this type of the code related strictly to BGLC? Are there any other types of code (SCASM / MASM?) What are the major differences? Can someone list some basic programing fundametals and general informations how FS coding evolved over the years and how it had changed in many iteration of our beloved FS? Thank you in advance. Ted

Share this post


Link to post
Share on other sites

The lastest of SCASM also supports the floating point. So it makes no difference if you use BGLC or SCASM (MASM is basically also BGLC code).In this post Gerrish gives a nice overview of part of the evaluation of the scenery engine:http://ftp.avsim.com/dcforum/DCForumID10/1538.html#24The latest version of FSDS (FSDS2) also creates the floating point commands, but as far as I know there is no program like Airport or FSSC yet that supports it (I am working on a little conversion tool for my tool that makes also such code for ground polygons).Arno


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

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 GerrishGray

Hi TedFS4 was the first version of the sim to allow programmable scenery, but used a different scenery engine and language. From FS5 on we have been able to work with BGL files - BGL stands for the Bruce Artwick Organisation Graphics Language (Bruce Artwick was the original designer of Flight Simulator). The language has changed in each successive version of the sim as extra commands and functionality have been added to the scenery engine. Then FS2000 featured extensive changes to the scenery engine, introducing terrain mesh scenery in place of the former 'seed tiles', and now things are changing again with a new set of image-rendering commands (the so-called 'floating point' commands) that are going to replace the existing methods entirely in FS2004. FS2002 is a transition version that supports both the older style of image-rendering with commands such as Poly() and TexPoly(), as well as the new 'floating point' commands.By the way, the term 'floating point' refers to the use of 'real' numbers as opposed to pure integer values (i.e. whole numbers with no fractional part), but it is a very technical distinction. The real difference is that the new command set is designed to be compatible with the "DirectX" software used by modern graphics systems to display 3D scenes, whereas the older command set was originally designed for a different system.Along the way, CFS also appeared. The first two versions, CFS and CFS2, shared more-or-less the same scenery engine as MSFS, but the latest version, CFS3, seems to use an entirely different scenery engine and has apparently diverged from the main MSFS line completely.The most commonly-adopted approach to creating BGL files is via the SCASM 'scenery assembler' created by Manfred Moldenhauer. The current version of SCASM is fully compatible with the new 'floating point' command set. As Arno has explained, BGLC is just an alternative tool supplied by MS themselves for creating the same BGL files with the same end language and command set. BGLC is, however, more difficult to learn and use than SCASM, and one really only needs to use it for creating some types of terrain mesh scenery and for tinkering with the output from the gMax design tool - which uses BGLC code instead of the more usual SCASM.There is an alternative version of SCASM called FreeSC, but it is not as well supported and the author seems to have disappeared into the woodwork at present.There also used to be another language called FSASM which offered a third alternative method of creating BGL files, but that died a death a long time ago. There was a suggestion about 2 years ago that it might be upgraded and re-released, but it doesn't seem to have happened.Unless you want to create TMF 'decals' etc., or tinker with models created by gMax, SCASM can do everything you want. If you are not already familiar with SCASM, try http://mat@combatflight.de/html/scasm-tut/scasm1_eng.html for an excellent tutorial on the basic programming fundamentals. Once you have mastered the SCASM language, you will find it quite easy to use BGLC instead if you so wish, but I wouldn't suggest leaping into BGLC first. You could easily drown!Hope this tells you what you wanted to knowGerrish

Share this post


Link to post
Share on other sites
Guest

As usual many many thanks to you Gerrish and Arno for this enlighting piece of knowledge about scenery. Thanks guys, really thanks.Ted

Share this post


Link to post
Share on other sites
Guest

GerrishIt just seems to be a problem with this handfull of leftover FS2000 objects.Even though their internal scale is set as 1.0 I found I had to place them at 0.1 in order for them to appear the right size.It may just be an incorrect object header but the strange thing is that using them in FS2000 you need to use scale 1.0 to get them the right size. The library code is identical in both cases but FS2002 seems to handle it differently (for no logical reason...)

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