Jump to content
Sign in to follow this  
rhumbaflappy

What is GMax View Distance Maximum

Recommended Posts

Guest

Hi Dick,Although I have a programming background, it has been a long time since I have done much coding. I am really not sure how to go about finding out what you are talking about.How do I read that header?What should I expect to find?How can I change it?Happy Flying!Bill MolonyAtlanta GA USAUnder the 27L Approach to KATL--the busiest airport in the world :)

Share this post


Link to post
Share on other sites

Hi Bill.You could use BGLanalyse to disassemble the BGL. That program will tell you the bounds in Latitude and Longitude that encloses your scenery.If that is the limitation, the bounds could be expanded NSEW to enclose a larger area. The FS2000 Scenery SDK explains the header section of the BGL.----------------------I looked in the SDK also for some type of limitation for viewing range. There is a BGL_SCALE command that does present a viewing range as an unsigned 16 bit integer... that would be a max of 65,535 meters. ( page 63 of the SDK ). I don't know if your code includes this command for the object, but that could also be the source of the limitation, and that would not allow a work-around. The 65Km limit would be about a 40 mile limit from the center of the object.If the project were split into fragments, the outer pieces of these fragments would have centers a bit more removed than the center of the original object... so an outer most piece would then be viewable by another 7-8 miles, perhaps.Take a look at the SDK, and see if anything rings a bell for you.Dick

Share this post


Link to post
Share on other sites
Guest

Hi Dick,RE: "unsigned 16 bit integer... that would be a max of 65,535 meters"---OUCH! That sounds like a terrible but very realistic probability with almost no work-around within the GMax Export routine. Sounds like my only hope is to do something outside of GMax to correct the problem. And I am not sure exactly what I can or should do.I had already considered--and quickly dismissed--the concept of dividing my graphic into several projects each with it's own center. But one of my primary goals for the project is to provide a method to view the entire graphic siumultaneously out to its full extent. That of course would mean being able to get out at least 50-60 nm from it in any direction. Parsing the graphic into separate entities would do nothing toward accomplishing that.Regardless, your first suggestion, "use BGLanalyse to disassemble the BGL", sounds like my only alternative at this time. The only problem with that is, although I have a programming background, it has been quite a while since I have done any real coding. And I was NEVER very good at "hacking". So I don't know whether I can do that or not. Guess I will have to just dig in and see what I can come up with.Some kind of "step by step" instructions would certainly be of some help. Or maybe even their is a good soul out there who would volunteer to take my project files and see if they can find a way to work around the problem.Any other suggestions you--or anyone else--can offer will certainly be appreciated.Happy Flying!Bill MolonyAtlanta GA USAUnder the 27L Approach to KATL--the busiest airport in the world :)

Share this post


Link to post
Share on other sites

Hi Bill.That possible 16-bit restriction on viewrange is not just for BGLC or Gmax... that's the sim's restriction ( hardcoded ) on all objects.Dick

Share this post


Link to post
Share on other sites

Hi Bill.There may be a work-around for your problem.How are you displaying the object? From the BGLC code derived from Gmax?Backup the BGLC code first!Somewhere near the top of your BGLC code, you may have a line that is like: NEAR_FAR_SMALL_OBJECT_HEADER 000550F18h, 00143C150h, object_end_0000, 100It actually should be like: NEAR_FAR_HUGE_OBJECT_HEADER 000550F18h, 00143C150h, object_end_0000, 100and that alone might work. The parameters are the Lat,Long,objectend label, and the "power" ( 100% ).-----------------------If you make that change ( please backup the BGLC code first! ), and the viewing range is not extended, then there may be one other solution:There is an old FS5.1 command that is called LARGE_RANGE ( might not even be a bglc macro for it ). This code may work for a macro:; ------------------LARGE_RANGE_HEADER macro latitude,longitude,object_end,low_range,high_range LOCAL opcodeopcode db 13 dd latitude,longitude db low_range,high_range dw object_end-opcode endm; ------------------ LARGE_RANGE_HEADER 000550F18h, 00143C150h, object_end_0000, 0, 255or possibly: LARGE_RANGE_HEADER 000550F18h, 00143C150h, object_end_0000, 1, 255or possibly: LARGE_RANGE_HEADER 000550F18h, 00143C150h, object_end_0000, 255, 255The sim might crash, it might show no difference, or it may be just what you need. I'm not sure of the values for low_range and high_range. It may even be a percentage like "power", but I think not. They are bytes, and so are limited to 0-255 ( 0h-0ffh ). ---------------------------Here's another possiblility... first the macro:;----------------------ALWAYS_LOAD_OBJECT_HEADER macro latitude,longitude,object_end LOCAL opcodeopcode db 14 dd latitude,longitude db 255 ;image power dd object_end-opcode endm;----------------------Note the opcode here is 14 (E). SCASM refers to this as Area(E). I found it in the FS98 SDK. So you would have to paste that Macro code in. Then the code should read: ALWAYS_LOAD_OBJECT_HEADER 000550F18h, 00143C150h, object_end_0000And that may work. Oddly, this code indicates that "power" is not limited from 1-100, but extends from 1-255, and may actually show a general misunderstanding of the power parameter. It was thought of as a percentage... but here indicates it's a fractional range from 1-255, as does the other macro range.Dick

Share this post


Link to post
Share on other sites
Guest

Dick,THANKS for answering further on this problem. I had given up on finding a solution that I could do and this message thread had gotten very old so I did not expect further responses either.Those all sound like great possible solutions! Unfortunately, I don't know how to do what you are discussing. :(At present, all I am doing is building the structures in GMax and then using the built-in GMax Export function that builds a BGL file that is automatically put in the ...Scenery folder.And that BGL file is strictly machine code--no text, BGLC code, or anything readable. There are no intermediate steps or files that I can find that I can read.Could you explain to me how to get that intermediate BGLC code to read?How about sending me an email at bmolony@bellsouth.net so we can discuss it further.Happy Flying!Bill MolonyAtlanta GA USAUnder the 27L Approach to KATL--the busiest airport in the world :)

Share this post


Link to post
Share on other sites

Hi Bill.We've got an impasse... I don't know GMAX very well.I'm thinking MakeMDL gives an option to save the BGLC code. There should be 2 ASM files created. One file places the object, and the other file ( much larger ) actually is the object.The code to play with should be in the smaller file.To compile that ASM code, you need both ASM files and BGLC.exe in the same folder. Then drag'n'drop the smaller ASM onto the BGLC icon. That should produce the BGL in that folder.If you get that far, could you attach both the ASM codes to your return post, as a TXT file? Then I can play with them as well.Dick

Share this post


Link to post
Share on other sites
Guest

There are no such files being created that I know of.But I will be happy to send you anything you need.Please email me about this:bmolony@bellsouth.netHappy Flying!Bill MolonyAtlanta GA USAUnder the 27L Approach to KATL--the busiest airport in the world :)

Share this post


Link to post
Share on other sites

Hi Bill.I've e-mailed you, and we'll continue that way.I'll post results of the experiment ( but not your private code ), at a later time.Dick

Share this post


Link to post
Share on other sites

Hi Bill.Bad news. There is no way to bump up the visual range limit of an object... I think it's actually 65535 meters radius from the center of the object ( about 40 miles ). With your scenery, I can see the "outer ring" from within the scenery's limit, but when I move out of the radius, ( just beyond the inner ring ) it all disappears! So perhaps to view the 65535 meters, you must be within 32767 meters of the center. :(Radius maximum size should be 65535 meters... allowing a diameter of 131070 meters... But again, that seems too high.. so maybe the SDK writers confused radius with diameter. Who knows.Anyways, your object is too big, and seems to be only viewable from the "inside".I know you don't want to break up the object, but that is the only way I can think of to extend the view limits.Dick

Share this post


Link to post
Share on other sites
Guest

Hi Dick,That is bad news indeed!And just when you were getting my hopes up too! :)Oh well....But thanks so much for trying!Happy Flying!Bill MolonyAtlanta GA USAUnder the 27L Approach to KATL--the busiest airport in the world :)

Share this post


Link to post
Share on other sites

A little more fooling around...I think you need to be within 16384 meters ( about 10 miles ). Beyond that, runways also disappear. I believe the object can be larger than 16384 meters... probably up to 65535 meters diameter. But I think it will still disappear as you go beyond 10 miles from the refpoint.The autogen thins, then disappears around 6-7 miles. An interesting thread in the mesh forum discusses the disappearance of higher LOD meshes at around 7 miles.Dick

Share this post


Link to post
Share on other sites

Hi all.The pyramids can be located at N 29* 58.42' E 31* 7.73'.The N-S viewing max distance seems to be around 17921 meters ( about 0.1616666* ).The E-W Viewing distance seems to be around 18964 meters ( about 0.1926666* ).The entire group of objects disappears simultaneously, so that seems to be a funtion not of the objects, but perhaps of the library call that places the objects, and the limitations of the sim.Dick

Share this post


Link to post
Share on other sites

If they all dissapear at the same time then they probably are placed as one object. Then they all have the same RefPoint and thus also disspear all at once.Intesting to see how MS has build their scenery :).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

Hi Arno.Yes, perhaps the same refpoint.Runways also "pop" on and off at these distances. So it seems to be a visual limitation of the sim.Dick

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