Sign in to follow this  
arno

How do I make a Gmax object solid?

Recommended Posts

Hi all, I have made a bridge in Gmax but was wondering how to make it solid so you can land on it. At the moment you pass right through it. Thought there might be something simple I am overlooking on export from Gmax.Daniel

Share this post


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

Hello Daniel,In MakeMDL, you will find an option called "Crash". Make sure to place a checkmark next to it and that should take care of the problem.Best regards.Luis

Share this post


Link to post
Share on other sites

I think you need to use FsRegen here. With that tool you can make hard surfaces. I think only turning the crash on gives the effect you want (as that will cause a crash once you hit the bridge :)).

Share this post


Link to post
Share on other sites

Hi Daniel, Another alternative is to handcode a hard elevated surface with scasm and M$ Notepad, once you have to co-ords its not difficult and i use this way but i leave crash detection off.I have found however that if there is another polygon under the surface ( ie: top of a cube and bottom of a cube ) the hard surface seems to not allways work.Maybe some of the others more knowing than i can help you .here is a sample code for a surface x m above a lake, allso, i think you can only use whole numbers for the altitude not fractional numbers.---------------------------------------------------------------------Header( 1 S26:53:26.9984 S27:53:26.9984 E152:26:37.0276 E151:26:37.0276 )LatRange( S27:53:26.9984 S26:53:26.9984 )Area16(a -27:23:27 151:56:37 5 5 )RefPoint( abs : 0.100000 -27:23:27 151:56:37 )SenseBorder( : -74 75 75 75 75 -74 -74 -74)SetElevation( 470 )End16---------------------------------------------------------------------rgds Jeff

Share this post


Link to post
Share on other sites

Hi Daniel.You can use zero-height advanced buildings ( SCASM ) to make a flat landable surface anywhere. Because it has no wall height, it is invisible.I haven't tested this in FS2004, but it certainly worked in FS2002... but crash detection must be turned ON for this to work right ( at least in FS2002 it did ).This "building" is independant of the object, and simply provides the solidity. If you want the walls of an object crashable, then some of the other suggestions could be used such as exporting the GMax object with the crash detection checked, or even building a SCASM crash-box around the bridge.FS2004 is still pretty new, so you might need to experiment.Edited:In fs2004 it appears this not only works, but crash detection can be turned off.Here's a big red Gmaxed cube with an advanced building on top:http://www.flatface.net/~rhumba/Zips/NewCube.zipYou may need to adjust the height of the advanced building for FS2004 or different mesh.The cube's location is:N42* 37.72' by W88* 36.73'Dick

Share this post


Link to post
Share on other sites

Hi Dick one question I am having a little difficulty with a bridge and crash detection I keep crashing into it at the hight of the lighting on the bridge in other words the octree seems to be to"thick". Can one adjust the "hight" by playing around with the valuefor the Z scale?. Or should I make the lighting a child of the bridge so that I will have the road bed as it's own mesh and adjust from there. Dan

Share this post


Link to post
Share on other sites

Hi Dan.Arno or Gerrish would be better qualified to answer. But it seems to me you could make an object the size of the octtree you'd like, then a little cut'n'paste would join the new crash octtree to the the old object.The GMax *.asm code has the octtree and the code for calling the *_0.asm code ( the actual object ). So doing brain surgery on the *asm code could change the octtree without actually changing the object.I think that would work, and would be a relatively simple way to allow you to get the crash area you desire for any object, without having to study the octtree code.Here's some simple *.asm code that shows the crash code that could be replaced with another object's crash code:;compile with BGLC /BGL C:Documents and SettingsDick.LUDOWRDesktopNewCubeNewCube.asmheader label word dw 0001 ; 00 World set number dd 00048498AH ; 02 North bound dd 0004848FCH ; 06 South bound dd 0C0FCA5B9H ; 10 East bound dd 0C0FCA5B7H ; 14 West bound dw 20 dup(0) dd (offset OBJECT_DATA) - (offset header) dw 33 dup(0) OBJECT_DATA label word db 21 ;;LATBAND_REL dw 02424h ;;lat min (inclusive) 512M units dw 02425h ;;lat max (exclusive) dd (offset OBJECT_0) - (offset OBJECT_DATA) db 0 ;;EOL OBJECT_0 label BGLCODE db 12 ; NEAR_FAR_HUGE_OBJECT_HEADER dd 000484943h,0C0FCA5B8h ; latitude,longitude db 100 ; image power dd (offset OBJECT_0_END) - (offset OBJECT_0) OBJECT_0_START label word ADDOBJ OBJECT_0_SCALE SHADOW_CALL OBJECT_0_SCALEOBJECT_0_FAIL label BGLCODE BGL_JUMP_32 OBJECT_0_END OBJECT_0_SCALE label BGLCODE SCALE_AGL OBJECT_0_RETURN, 10000, 123, 131072, 000484943h, 068C5h, 0C0FCA5B8h, 09BB5h, 0, 0 BGL_CALL OBJECT_0_BEGINOBJECT_0_RETURN label word BGL_RETURNOBJECT_0_BEGIN label wordmodel_outside label BGLCODE BGL_CALL model_crashmodel_shadow label BGLCODELOD_0 label BGLCODE BGL_JUMP_32 LOD_0Lmodel_inside label BGLCODE BGL_RETURNmodel_crash label BGLCODE BGL_CRASH_START model_crash_end, 142 BGL_CRASH_OCTTREE crash_end_1 dw CRASH_FLAG_OBJECT ; crash type dw 1 ; nodes used real4 -100.000000,0.000000,-100.000000 ; Box x,y,z real4 200.000198,200.000198,200.000198 ; Box w,h,d dw 1, 1, 1, 1, 1, 1, 1, 1 ; base offset into node table, one for each top-level branch ; So if you take branch 2 (count from 0), you add 1 to indices you encounter on that branch ; Nodes (254=empty 255=full, else an index into branch) OCTTREE_NODE 255, 255, 255, 255, 255, 255, 255, 255 ; node 0crash_end_1 label wordmodel_crash_end label word BGL_RETURNLOD_0L label BGLCODE include C:Documents and SettingsDick.LUDOWRDesktopNewCubeNewCube_0.asmOBJECT_0_END label wordEOFDick

Share this post


Link to post
Share on other sites

Thank you Dick I will try the above should be simple to "cut and paste" the req'rd code from one object to the other(boy would I love to be able to use Maya Unlimted for flight sim) with it's tool set and it's ability to output ascii files for any object(or effect) that one can create with it's tools(like fluid dynmaics and many others)it sure would be nice to be able to use it for flight sim but alas I am digressing here. Anyway thank you for getting back to me!. Dan

Share this post


Link to post
Share on other sites

Thanks Dick, trouble is I'm a bit of a dummy at this scasm stuff - can use max and gmax ok and used airport 2.6 a while ago. Could you explain what I need to do and what extra programs I might need?Also are there any good tutorials for this sort of stuff out there?Thanks again... I hope...(scratches head, few remaining hairs fall out, Doh!)Daniel

Share this post


Link to post
Share on other sites

Yikes! Very sorry, Daniel. It is usually around dawn when I read this forum and I have not yet had my coffee. So, I misunderstood your question and gave a wrong answer. My apologies. And thanks to the guys for chiming in with the correct solutions. By the way, is the hidden runway a possible option?Best regards.Luis

Share this post


Link to post
Share on other sites

Hi Daniel could you post a pic of your bridge it might give me an idea or two. Dan

Share this post


Link to post
Share on other sites

Hi Daniel.The zero-height advanced building can be made with Airport. SCASM knowledge isn't actually needed.Dick

Share this post


Link to post
Share on other sites

Ok I can put a building in place but still not land on it. I must be doing something wrong, any ideas?DanielPS here's a couple of pics of the bridge

Share this post


Link to post
Share on other sites

Have you already tried FsRegen? I think that is the easiest option.Just make an extra polygon on the surface (with a correct material for FsRegen) of the bridge that must be hard and then process it with FsRegen. That should be all.

Share this post


Link to post
Share on other sites

Hi Daniel.Here's a 4000 x 4000 invisible advanced building at 1000 meters elevation centered at N42* 37.72' W088* 36.73'I drew a green poly at elevation to show the extents... but without the poly it is invisible. The building must be rectangular... but can be rotated to any angle... perfect for your bridge, as long as the landing surface is flat.Set( FSVERS 0x800 ) Set( BUF 1024 )Set( areamx 1024 )Set( LINBUF 2048 )Header( 1 43.12965 42.12965 -89.08991 -88.08991 )LatRange( 42.12965 43.12965 ); ========================== Here's the invisible building ============Area( 5 42:37.72 -088:36.73 10 ) IfVarRange( : 0346 1 32767 ) PerspectiveCall( :_S0 ) Jump( : ):_S0 RefPoint( 2 :_FailReturn 1 42:37.72 -088:36.73 E= 1000 V1= 40000 V2= 6000 ) RotatedCall( :_R0 000 000 000 ) Return:_R0 AdvBldg( NORMAL 4000 4000 LEVEL1 0 0 256 256 LEVEL2 0 0 256 256 256 LEVEL3 0 0 256 256 ROOF 0 256 256 ) Return:_FailReturn ReturnEndA; ===============================================Area( 5 42:37.72 -088:36.73 10 ) Call( :_DrawPoly) Jump( : ) :_DrawPoly RefPoint( 2 :_DrawPolyFail 1 42:37.72 -088:36.73 E= 1000 V1= 40000 V2= 6000 ) SurfaceColor( 6 F0 ) Points( 0 -2000 0 2000 ; 0 2000 0 2000 ; 1 2000 0 -2000 ; 2 -2000 0 -2000 ; 3 ) Poly( a 0 1 2 3 ) Return :_DrawPolyFail ReturnEndAIt's pretty simple SCASM, and the surface is as hard as a rock.Dick

Share this post


Link to post
Share on other sites

As I said, it's SCASM... just make it a text file, and drag'n'drop onto the SCASM icon. That will create the BGL.You'll need to study SCASM code a bit to use this.Give us the elevation of the surface, it's centerpoint ( where it is placed ), it's rotation, and length and width. We can make the code and/or BGL for you.Dick

Share this post


Link to post
Share on other sites

Thanks Dick The elevation is 1717 feet, position is N 38 3.94 W 81 5.30, heading 237, width 48m length 3000m. I presume you have to convert the lat/long for scasm?Thanks for your help.Daniel

Share this post


Link to post
Share on other sites

I'll attached a zip file with the SCA and the finished BGL for the invisible surface.

Share this post


Link to post
Share on other sites

Hi Daniel.Bad news.The zero-height Advanced Building trick does not work properly in FS2004. :(Header( 1 N38:10 N38:0 W081.0 W081.10 )LatRange( N38:0 N38:10 ); ----------------------------------------Area( 5 N38:03.94 W81:05.30 12 ) PerspectiveCall( :_Make_Surface ) Jump( : ):_Make_Surface RefPoint( abs :_ADV_Surface_Fail 1.00 N38:03.94 W081:05.30 V1= 20000 V2= 3000 E= 524 ) RotatedCall( :_ADV_Surface 0 0 257 ) Return:_ADV_Surface AdvBldg( normal 48 3000 LEVEL1 0 0 256 256 LEVEL2 0 0 0 0 0 LEVEL3 0 0 0 0 ROOF 0 256 256 ):_ADV_Surface_Fail ReturnEndAThis works somewhat... but the rotation is offset oddly to get a 237* heading.I'll keep hacking away, but it's obvious we need a different code as the zero-height advanced buildings are not right for FS2004.Dick

Share this post


Link to post
Share on other sites

Hi again Daniel.This code seems to work... it's based on Jeff's idea above: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.30 V1= 20000 V2= 3000 E= 524 ) RotatedCall( :_SetElevation_Surface 0 0 231 ) Return:_SetElevation_Surface SenseBorder( : -24 1500 24 1500 24 -1500 -24 -1500)SetElevation( 524 ):_SetElevation_Surface_Fail ReturnEndAThis can be copied to a TXT file, and drag'n'dropped onto the SCASM icon.The odd thing here is the heading is set to 231 to get it to align to 237* ( I'm assuming this has to do with the magnetic deviation somehow ).Dick

Share this post


Link to post
Share on other sites

Thanks Dick!That works, although I changed the heading back to 237 to align with the bridge.Only problem is that there seems to be gaps evenly spaced along the surface, kinda 50/50 surface-gap. Wonder if I need to adjust the elevation slightly or something ( elevation perfectly matches road surface now)Anyway, better than before!Daniel

Share this post


Link to post
Share on other sites

Hi Daniel.I haven't noticed the gaps. I did make a mistake with the heading... it was caused by my misunderstanding of our Shift-z Heading display ( I thought that was True heading.. but is Magnetic ).Dick

Share this post


Link to post
Share on other sites

OK, I've exported the bridge with an extra poly with material for FsRegen through middleman, and opened it in fsregen. How do I make the poly hard?Thanks,Daniel

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