Jump to content
Sign in to follow this  
Guest Patrick_Waugh

Several exteriors in one GMax model

Recommended Posts

Guest bookmark

Maybe this is old hat, but I would like to share it anyway:I needed to create four variants of one aircraft model, with small differences in exterior model as well as the VC. Creating four separate GMax files meant that I had to update all four during the development phase. Instead I kept all parts in one model and used "visible_in_range" flags in makemdl.parts.xml so that loading a certain variant made certain object trees appear or disappear. I used atc_airline for this purpose, but you can use any of the atc strings in Aircraft.cfg (although atc_id is a bad idea since that can be changed by the user in the aircraft dialog). Example:SomeThings (A:ATC AIRLINE,string) 'AirlineOne' scmp 0 == if{ 1 } (A:ATC AIRLINE,string) 'AirlineTwo' scmp 0 == if{ 0 } 1 There are endless possibilities in this, you can make it as simple or complex as you want. /Thomas

Share this post


Link to post
Share on other sites

Nicely done, Thomas... as long as the variations aren't huge polygon gluttons... ;)As a variation of that technique, I no longer have to produce "no-VC" models either, since it's easy to allow the user to select the LOD via a Preflight Utility gauge.I note that more and more developers are beginning to take advantage of conditional visibility in their projects. It certainly makes life much easier! ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest bookmark

Thanks Bill,I have used conditional visibility a lot in my models, but realising that I could trigger it from Aircraft.cfg was a revelation. It just never occured to me. Could you expatiate re the Preflight Utility gauge? Selecting LOD? I don't quite follow. Cheers /Tom

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Why would it matter if the user could change aircraft's by chaning the N number? Seems that would be really cool.Patrick

Share this post


Link to post
Share on other sites
Guest bookmark

Well, if I use a string condition to trigger an aircraft part or function it would really be disastrous if this string was arbitrary, right? It depends on the string being exactly this or that, so...Imagine the amount of email I would receive if one part of the aircraft was dependent on the one thing everybody could change at will... ;o)OTOH I get your point, Patrick. It would be cool to be able to customize the aircraft on load, and it is definitely possible by using conditional visibility in makemdl. Like in racing games etc. where you pick parts for your vehicle and trim it before starting the game. Everything is possible just using XML, never mind what the C++ jocks say... ;o)/tom

Share this post


Link to post
Share on other sites

>Thanks Bill,>>I have used conditional visibility a lot in my models, but>realising that I could trigger it from Aircraft.cfg was a>revelation. It just never occured to me. >>Could you expatiate re the Preflight Utility gauge? Selecting>LOD? I don't quite follow. LOD: Level of DetailAlthough "traditional" models use LOD to automatically switch a model's complexity based on viewing distance (all good AI a/c are built with four or more LODs), I'm using the term in a slightly different sense.For example, a popup gauge with options to "Show VC," "Show Cabin," "Show Passengers," etc. might be useful. All options of course set the state of an XML L:variable. The gauge may be coded in C or XML.It may also be used to control "eyecandy" such as wheel chocks, pitot covers, pilot's sunglasses, copilot, fuel truck, wing tanks, etc. The options are limitless.With a C gauge, one could also parse the aircraft.cfg file and show passengers based on weight: 170 lbs - male, 120 lbs - female, 90 lbs - child, etc.For Eaglesoft's SR20 and SR22 models, I coded an extremely complex parachute animation using C for the control gauge and XML for the model's animation and visibility conditions. ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest bookmark

OK, now I understand what you mean. I thought you meant selecting LODs in a model by means of a gauge. I use a simple logic for showing chocks and pitot covers, this is nothing new of course:parked (A:SIM ON GROUND,bool) (A:GENERAL ENG1 RPM,rpm) 10 < (A:GROUND VELOCITY,knots) 0.1 < and and and 1 Parsing the aircraft.cfg file in a C gauge is an idea, I have to start experimenting with that...

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Well, would be easy enough to program a "default" case in the situation the user tries to enter a non-sensical value into the string. The gauge just changes it.So, you could do some cool things and allow the user to select their aircraft by N number. They just get the default aircraft if they screw up.

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