Sign in to follow this  
misho_TerraBuilder

Light effects in GMAX - possible/how?

Recommended Posts

I've made quite a few custom buildings using GMAX for use in FS2002 (they so far also work fine in FS2004). For night-time I've simply use a darkened version of the daytime texture, with windows filled in with colour to represent lights on, etc. Works fine for windows, but is pretty boring for external lights, streetlights, etc.I've tried to use GMAX to add lights - but so far they have NEVER shown up in FS2002 after the BGL compile process. My basic question therefore is this: Can you add things like spotlight/streetlights in GMAX and get them to appear in FS? How?

Share this post


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

You absolutely can, and it is easy to do. I've been adding hundreds of stock or custom street lights through GMAX and they display fine.You must use AttachToolGMAX to attach an effect. I usually create a small box in GMAX, make it "transparent" in the settings, and then attach an effect to it. Keep the box as a "Box" GMAX primitive, don't convert it into "Editable Mesh". Now, since MakeMDL sees only "Editable Mesh" objects as compilable, this box won't show up in the scenery, BUT THE EFFECT WILL.The reason I have this box is that I can easily move it around and copy it. Caveat: Copying and moving the box will NOT move the effect along with it, unfortunately. This is because the name of the newly copied object does not transfer into the newly created effect tag (found under the "properties") - you must change this manually... (copying a lot of objects may get very tiresome, I have created a small MAxScript app for myself that properly copies effects objects)

Share this post


Link to post
Share on other sites

Thanks for the advice, and sorry if this sounds stupid, but how exactly do you "attach" an effect like this in GMAX? You may have to lead me through this the first time - but I'm a "quick read" ;-)!I'm pouring through the User Help guide and so far haven't found anything like this?! I've done a search for AttachToolGMAX too.

Share this post


Link to post
Share on other sites

Hi Jonathan,This is something FS specific, so you will not find it in the general help. Reading the tutorial from MS might help though (if I remember correctly they attack smoke to a chimney there).You can find the needed script in the scripts folder of the Fs2004 gamepack. After running it, simply select the effect you want to use and the object you ran the script on will no longer show up in FS. On its place you will see the effect.If you are working with the Fs2002 gamepack, this will not be possible, as attaching is a new feature in the Fs2004 gamepack. There is a work around though. As exampled in the MakeMDL SDK you can use special material names to get lights. For example LIGHT_NAV or LIGHT_LAND. After giving your material a name that starts with this, you will see a light at the location of the part that uses this material.PS. The GMax objects to create (spot)lights do nothing in FS, so forget about them. They are some of the GMax features that FS does not support.

Share this post


Link to post
Share on other sites

Darn! Guess I'll just have to upgrade to FS2004 then. I assume that this would have to be FS2004 Professional to include the GamePack? We actually do have a copy of FS2004 floating around here in the lab that isn't being used. However, I do have the latest GMAX (last download before Turbosquid was gobbled up by AutoDesk). This script (or scripts) are likely just MAXSCRIPTs which should work - assuming that FS2002 allows similar lighting effects. Actually, landing lights and nav lights on AC still do cast light on other objects in FS2002 so it should work.

Share this post


Link to post
Share on other sites

Hi,You can download the Fs2004 gamepack from MS, here is the link:http://download.microsoft.com/download/4/d..._gmax_setup.exeThere is only one version of Fs2004 btw. After you have installed it, you can start GMax with both gamepacks. The script is indeed a maxsript, but it will only work with the Fs2004 gamepack, as the Fs2002 MakeMDL simply does not understand the attached objects. So you need to export as MDL object with the Fs2004 gamepack.

Share this post


Link to post
Share on other sites

Hi Jonathan:Sorry to briefly pop into this thread... we are incurring inordinately long delays in processing of my 2 additional replies to you in a thread in the "Letters to the Editor Forum" in the G2K4 thread started by "nudata", so I wanted to let you know that I sent you a private message (PM) via the AVSIM Forum PM system.If you haven't set up your option in your AVSIM profile to receive PMs yet, please let me know back here and I will try to help further.Basically I wanted to let you know a fellow FS enthusiast who has UT Canada will be glad to provide some screenies for you to review the area around St. John's if you would like.Please excuse me for the digression off topic, Arno; I was getting a bit concerned about the lag time associated with submissions getting reviewed before posting in the other forum, and figured I'd best try to catch Jonathan's attention through a post where he might see my message on a timely basis.Perhaps we then can arrange to start a separate thread here in the Scenery Design Forum, as I think the subject matter may prove to be of interest to others as well. :-roll Cordially,GaryGB

Share this post


Link to post
Share on other sites

Hey GaryGB,Much obliged! Thanks for alerting me. I *believe* I have set my profile to accept private messages but then I'm a newbie so perhaps not. I'll check - Ah yes, I did get you PM. Doh. Now I feel sheepish...

Share this post


Link to post
Share on other sites

Hi Jonathan:I'm still learning lots of new things every day too!:-) Just send me a PM either here at AVSIM or at SimFlight Forums with the areas you want to see around St. John's, and I'll arrange for our friendly fellow Flight Simmer to send you some screenies in FS with UT Canada! ;)GaryGB

Share this post


Link to post
Share on other sites

Gary,I tried to reply directly to your PM, but it got bounced (I think off of the server at your end?). Here is the message I was trying to send:GaryGB,I *did* get your PM. It was buried amongst a bunch of work e-mails (I *am* supposed to be working on my PhD afterall ;-)!). Actually, this FS scenery stuff is not 100% unrelated to what I'm doing. We're researching the use of small UAVs like the Aerosonde for peaceful uses like maritime SAR, fisheries patrols, etc - just off the NE coast of Canada. Having better scenery for the coastline for our trainers/simulators would be a good thing - especially for St.John's (CYYT airport) and also Clarenville (CCZ3) areas.However, my immediate interest is the area around the Narrows (entrance to St.John's harbour) which is hopelessly inaccurate in the stock FS2002 scenery (and probably also FS2004). 1-4 km line vertices for a coastline and a 70m terrain mesh simply cannot capture the detail! The position of the harbour and coastline in the stock scenery is equivalent to a full LOD13 area to the west in several spots (likely the precise areas where I'm having problems in Ground2K). There is also a fairly major lake missing too - to the NE of the main harbour, called Quidi Vidi Lake, which is almost the same size as the harbour proper! Check it out in GoogleEarth and you'll see what I mean (there is now extremely high res satellite imagery of this area). The coordinates for the area around the narrows are (I've included the regular deg:mm:ss in case you want to use GoogleEarth):N 47* 33' 50" (~N47* 33.833')W 52* 40' 46.93" (~W52* 40.782')Note that there was an attempt several years back to upgrade the entire Newfoundland DEM to a finer mesh - I got it from Surclaro - by Samy Mesbah, but now I can't find it (seems all FS2002 scenery is gone?!) He used 30 arcsec data, so the improvement around St.John's was meager, and he did not correct the coastline position (my big problem).I'd be interested to see how good a job the Canada UT did for this area. If it's anything like their demo shots in the Hamilton, Ontario area, I may be sold!================================Jonathan D. Stevenson, M. Eng. (Aero)PhD StudentProject RavenRoom IIC-2010B, Inco Innovation CentreMemorial UniversitySt. John's, Newfoundland and LabradorCanada A1B 3X5Tel: 709-737-3771Fax: 709-737-6193E-mail: stevenson@engr.mun.ca================================

Share this post


Link to post
Share on other sites

Hi Jonatahn:I have some screenies being prepared for you courtesy of our "Friendly Canuck Flight Simmer"; I should have further confirmation on an availability time as early as today or tomorrow if all goes well. :-) I will post back here when I have further word.BTW, St. John's looks like it would make a nice photoreal scenery area too (as if you weren't already busy climbing the SDK learning curve already!) ;)GaryGB

Share this post


Link to post
Share on other sites

Hi Jonathan:Here's the screenies of St. John's I promised to forward to you (many thanks to Larry for his help).As you can see, Allen Kriesman's Ultimate Terrain Canada for FS9 has a rather good rendering of St. John's! :-) Let me know if we need to detail more of the area for you! ;-)GaryGB

Share this post


Link to post
Share on other sites

GaryGB,These look great. Looks like the coastline at least is right, and all the major lakes/ponds are visible. I think I may be investing in UT Canada afterall. I wonder what would happen if I combined this with my high-res (0.75 arcsec ~ 15-19m LOD) DEM data for this area?Also, I've just upgraded from FS2002 to FS2004. So far, all of my older GMAX buildings are working fine in FS2004. I haven't gotten lighting effects working (yet) but then I haven't spent much time on the SDK so far (spent most of the weekend transferring/porting stuff over from FS8 to FS9).-Jon

Share this post


Link to post
Share on other sites

>>I wonder what would happen>if I combined this with my high-res (0.75 arcsec ~ 15-19m LOD)>DEM data for this area?>>-JonHi Jon:Glad those pix helped!:-)I believe you would see an even better rendered St. John's area with your higher detail mesh. Since you only have lower altitude terrain variations in the hills around that area, you would want to use that mesh in order to have FS show a more dramatic interpretation of the area. The UT Canada data being based on a mix of sources higher than the default FS data sampling interval should align nicely with your higher resolution terrain mesh project and make th area look better; I would say by all means try it out! :D It is generally best to work with the highest resolution source data before requesting a particular LOD output from Resample when making mesh, as one will likely achieve a more accurate rendering of the source data, and hopefully thereby, of the "real world" terrain shape when seen in FS.Since FS9.1 cannot render the full visual shape detail of an LOD higher than 11 (19.1 meter), but can still show very nicely enhanced alternate sets of slope textures for mountain sides and steeper rocky terrain with an LOD12 (9.6 meter) mesh, the extra size of the LOD12 mesh data footprint may be worth having resample output at that resolution.Personally, I prefer the higher LOD 12 mesh resolution because I like flying in higher altitude rugged mountainous terrain in FS, and I like the resulting alternate "rocky" slope textures that FS chooses to display when it has an underlying LOD12 mesh available.And with most modern computers, the impact of the extra datapoints from the LOD 12 mesh on FS is negligible. Those who feel a little impact from a higher (ex: LOD12) terrain mesh reportedly can simply back off their FS Terrain Mesh Complexity slider to 96%, and thereby reduce approximately 15% of the mesh data processing hit on the FS rendering engine (while still getting a more "true-to-life" rendering of the terrain shape than they would by using a lower LOD terrain mesh) if I correctly remember posts I have read by both Justin Tyme and Steve Greenwood, both notable authorities on FS terrain mesh.If you are planning to distribute your mesh to others and your target user base may be less inclined to appreciate the extra detail, you might wish to have resample output at LOD11, as the data footprint size will be substantially less than that for the LOD12 mesh.However, since disk space is now cheaper, bandwidth speeds are improving for many FS users, and because FS8/FS9 format terrain mesh BGLs are still usable in FSX, I would personally be inclined to make the LOD12 (9.6) mesh knowing I could also use it at its full resolution in FSX!If you do migrate to FSX (more demanding on one's computer, but yet another level of FS visual delight!), the FSX Deluxe version SDK resample outputs multi-LOD (buffer mesh) as well as one's target LOD resolution for the mere cost of a couple of very simple command line parameters, and even allows for use (or non-use) of compression when it all writes out to a single, bigger (and presumably more memory/loading-efficient) BGL per processing run.A few interesting references on the issue of mesh-making and display ability in FS8/FS9:http://visualflight.info/info/fs2002-fs200...ain_resolution/http://www.visualflight.co.uk/forums/topic.asp?TOPIC_ID=1742http://www.home.earthlink.net/~smgreenwood/resolution.shtmlHope this helps with your project... let us know how it progresses! :-coolPS: Do you need any more screenies of St.John's, or are you OK now?GaryGB

Share this post


Link to post
Share on other sites

I've just completed upgrading FS2002 to FS2004 and I used the AttachTool SDK to walk me through the (new) process of attaching effects for FS2004. I can now get the default/stock effects (eg. fireworks displays!) to appear.The next thing to figure out is - how/where do I find effects for simple lights (eg. Porch Lights or StreetLights) or even spot lights? I couldn't find anything in the FS9/effects directory that seems suitable. However, I noticed that these FX files are just ASCII text files that seem to be easilly editted (if only I knew the syntax). Any pointers/ideas?

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