Jump to content
Sign in to follow this  
Guest christian

Landable surfaces using FSRegen

Recommended Posts

Guest JTWhite

OK, I need help with something. Ive followed the tutorials on creating a landable surface using Gmax and FSRegen, and have readall the threads on Avsim under the word "landable", but it still doesnet seem to work.Here's what I do.1. Create a plane in Gmax.2. Add an editMesh modifier.3. Create a new material, make it pure blue. (0,0,255), and make sure the luminence or whatever is 100 percent so that the little mountain shows up on the right hand side of the editor. Click apply.4. Add a MapUV modifier.5. Export using Makemdl to the FSregen folder (making sure "save files" is checked and '"crash" is unchecked).6. Close Gmax, run FSregen.7. Load .asm file and open. (I get "1 material" needing processing)8. Step. 2, change to desired color.9. Step 3, pulldown menu to "landing area," change parameters to, oh 30 feet.10. Click process. Everything goes OK. (0 materials left to process)11. Click "Save"12. Click "Compile BGL"13. Copy to FS add-on scenery folder.When I run FS, the model is there, as is the plane I created, but I still sink through it.Question: When I set the height of the plane in FSregen, is that where the plane will appear or where I will encountera hard surface to land on???Anybody have any idea why Im still not getting a landable surface?

Share this post


Link to post
Share on other sites

The height you enter in FsRegen will be the height of the hard surface (this will not display anything visual, so it should line up with your visual model).The only reason why I think it could not work (when I read what you have done) is that you could have forgotten to put the new BGL FsRegen made in your scenery folder.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 JTWhite

Thanks for the quick response, Arno.I do go to the Fsregen folder and copy the .bgl file over to my add-on folder.I cant figure it out, either.I figure it's probably somewhere in the height parameter.Oh, well, Ill try again when I get home tonight.JohnW

Share this post


Link to post
Share on other sites
Guest christian

I'd actually like to do the same thing by hand editing the BGLC source code. Anyone got an idea how to do that? There are 2 things I don't know (and I can't motivate myself to play around)...1) The FS2000 SDK says the 'landable surface' part goes into the MISC section. Is that still true, or one of the many M$ mistakes?2) The height of the surface, can that be placed AGL (ie height above terrain), or is it 'total height' (ie height above 0)?Anyone knows the answers?Cheers, Christian

Share this post


Link to post
Share on other sites

Hi Christian,I haven't tried it BGLC yet, but from the SCASM code we use in our project I know the following:>1) The FS2000 SDK says the 'landable surface' part goes into >the MISC section. Is that still true, or one of the many M$ >mistakes? In SCASM it is Area16, where the normal scenery is Area. It could be that in the SDK that is called MISC, I don't know that.>2) The height of the surface, can that be placed AGL (ie >height above terrain), or is it 'total height' (ie height >above 0)?As far as I know it is total height.Humm, but now that I had a look at our macro, the altitude of that RefPoint is also set to 0, so it might also be AGL then (Netherlands is at sea level). Now you confused me, it can be both :). It would be more logical if it was AGL I think, but I would need to test it.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 JTWhite

Thanks for the info guys....I got it to work finally.I think the thing was I wasnt setting the "height above ground"parameter correctly.It really works nicely.John

Share this post


Link to post
Share on other sites
Guest christian

Hi JohnDo you mind posting the BGLC code that fsregen is producing? Or the bgl itself it fsregen doesn't produce any BGLC code?Cheers, Christian

Share this post


Link to post
Share on other sites
Guest ptwaugh

It appears that after applying the "edit mesh" modifier, you forgot to go into 'poly' sub-object mode and select the plane.

Share this post


Link to post
Share on other sites

Hi Christian.Header( 1 N38:10 N38:0 W081.0 W081.10 )LatRange( N38:0 N38:10 ); ----------------------------------------Area16( a N38:03.94 W81:05.30 12 )Call( :_Make_Surface )Jump( : ):_Make_Surface RefPoint( abs :_SetElevation_Surface_Fail 1.00 N38:03.94 W081:05.30V1= 20000 V2= 3000 E= 524 )RotatedCall( :_SetElevation_Surface 0 0 231 )Return:_SetElevation_SurfaceSenseBorder( :-24 150024 150024 -1500-24 -1500)SetElevation( 524 ):_SetElevation_Surface_Fail ReturnEndA; Microsoft Flight Simulator BGL Source File; decompiled with BGL2ASM © 2002-2003 Christian Stock dw 00001h ; world set numberdata_base label word; DATABASE HEADER dd 00040B84Ah ; North Bound dd 000406FF1h ; South Bound dd 0C6666667h ; East Bound dd 0C6543211h ; West Bound dd 0 ; VOR data dw 0 ; lowest VOR freq dw 0 ; highest VOR freq dd 0 ; seeds level 8 data dd 0 ; seeds level 9 data dd 0 ; seeds level 10 data dd 0 ; seeds level 11 data dd 0 ; seeds level 12 data dd 0 ; traffic data dd 0 ; minimum safe altitude data dd 0 ; terrain mesh data dd 0 ; object data dd 0 ; library data dd 0 ; facilities data dd 0 ; anchor point data dd 0 ; ATIS data dd 0 ; ADF data dd 0 ; dynamic object paths data dd 000000000h,000000000h ; minimum library id dd 000000000h,000000000h ; maximum library id dd misc_data - data_base ; miscellaneous data dd 0 ; title and description data dd 0 ; magnetic variation data dd 0 ; exception and exclusion data dd 0h ; magic number dd 0 ; compression switch dw 0 ; spare; MISC DATABASEmisc_data label word LATBAND_START LATBAND_REL 02037h, 0205Ch, object_list_0000 LATBAND_ENDobject_list_0000 label word PLATFORM_HEADER address_264, 05DA9h, 020h, 02EC9h, 020h, 00051h, 0C6h, 00051h, 0C6h BGL_CALL address_192 JUMP address_264address_192 label word SCALE address_262, 20000, 3000, 000010000h, 000408C72h, 0AE00h, 0C65651C6h, 00000h, 00000020Ch, 00000h INSTANCE_CALL address_236, 00000h, 00000h, 0A443h BGL_RETURNaddress_236 label word AREA_SENSE4 address_264, -24, 1500, 24, 1500, 24, -1500, -24, -1500 ALTITUDE_SET 524address_262 label word BGL_RETURNaddress_264 label wordaddress_264 label word EOLobject_end_0000 label wordYup, still Misc section... and this is tied to altitude, not to a surface of an object. ( thanks to your decompiler ).I would also like to see the BGLC code for making an object's surface landable. I've never seen it... and I'm not sure just what FSREGEN is doing.Is it making an actual suface landable... allowing us to rotate and tilt the object and still have the surface tied to the object? Or is it just an invisible, untiltable, sensed surface area set to an absolute elevation like the above code?Dick

Share this post


Link to post
Share on other sites
Guest

Speaking of the decompiler, Christian, is this work of art still available? I thought I you had givin it to me in the past, but now I can't find it? I also couldn't find it in the file libraries. Any chance I can still get it?Leland.>Hi Christian.>>>Yup, still Misc section... and this is tied to altitude, not>to a surface of an object. ( thanks to your decompiler ).>

Share this post


Link to post
Share on other sites

Hi Christian.Here's some code from ptwaugh's simple cylinder:MISC_DATA label word db 21 ;;LATBAND_REL dw 00000h ;;lat min (inclusive) 512M units dw 00001h ;;lat max (exclusive) dd (offset PLATFORM_0) - (offset MISC_DATA) db 0 ;;EOLPLATFORM_0 label BGLCODE db 065h db (offset PLATFORM_END) - (offset PLATFORM_0) db 002h, 000h, 000h db 0FEh, 0FFh, 0FFh db 000h, 000h, 000h db 0FFh, 0FFh, 0FFh SCALE PLATFORM_END, 10000, 7, 131072, 000000000h, 00000h, 000000000h, 00000h, 0, 0 INSTANCE_CALL PLATFORM_0_CODE, 0,0,0 JUMP PLATFORM_ENDPLATFORM_0_CODE label BGLCODE AREA_SENSE4 PLATFORM_0_CODE_END, 6, 6, 6, -6, -6, -6, -6, 6 ALTITUDE_SET 4PLATFORM_0_CODE_END label BGLCODE BGL_RETURNPLATFORM_END label BGLCODE dd 0 ;The endAs you can see, this is a simple area sense and altitude set under the misc. section of code.So George's FSRegen simply adds a standard elevated platform, just like the 2000 SDK states. It is not part of the object surface, and could just as easily be added as a separate BGL ( or coded in SCASM for that matter ). It can be rotated, but not tilted, as it is simply an elevation. I had hoped it would actually be part of the surface, but it is not.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...