Sign in to follow this  
Guest Claviateur

Light on object

Recommended Posts

Has anyone had success yet with letting a light (GMax landing light) shine onto a object of your scenery? I can only get them to shine on the ground. I want to light my building with it.I know they also can't light aircraft, so maybe they can only shine on the ground.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


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

I'm afraid we've run smack into one of the limitations of the FS2002 scenery engine. I hope I'm wrong, but I don't think I am. I've been experimenting with this for a while now, and can't make it work.Bill Womack

Share this post


Link to post
Share on other sites

Why don't they use the "Quake" engine instead ?Everywhere you hear how great it is?

Share this post


Link to post
Share on other sites

I think this sort of thing is more complicated to program, so there may not be any support for that.My guess is that light is done with lightmaps. Although, we can set 8 lightsources in FS2002, so they are probably used, but I wouldn't have a clue what's modelled as real light (opengl only has a max of 8 lightsources as well). Common lights are probably done as lightmaps though (ie light textures blended over the existing texture), and it is very possible that that's done only for ground textures...But who knows how the graphics engine really works...Cheers, Christian

Share this post


Link to post
Share on other sites

Hi Arno,btw, how did you got your light shining on the ground?I'd even be happy if getting my lights shining on the ground only (no matter for buildings, I'd use the classic '_lm' method).All the experiments I've had 'til now have been unsuccessful. Surely I did something wrong or I missed something, but I can't really wonder where the mistake is, at the moment.Thanks for any tip,

Share this post


Link to post
Share on other sites

This has been discussed before, if you search back on the forum yo should be able to find it.The basic idea is that you make 2 triangles and give them the material that has a name like "light_landing", see the MakeMDL SDK for all options. Then you link those two and it should work.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Thanks Arno,I've seen something about triangles and material's names yet (perhaps also some tutorial somewhere on the web), but I was trying to get the in-built Gmax lights to work into FS.Now - also after my failed experiments - I shall realize that's the wrong way.I'll try the 'triangle' method (guess any other shape should work too)and I'll let you know.

Share this post


Link to post
Share on other sites

Hi Arno,tried the 'triangle' method, but it doesn't work.I followed the tutorial step by step: the sole 'passage' I can't understand is why should I save my output file as 'Aircraft' file, thus getting an .mdl file that's unsuitable at all for scenery design purposes.Of course, I tried to save it as .bgl too, but without results. The Z axis points upward, so I should - as a mere hypotesis - see a lighted cone projected on the ground.I tried with different types of ground (SCASM ground polys, Gmax ground polys, default terrain), but I always get a stunning, uniform and solid BLACK.I checked the *_0.asm file (for the .bgl output); some BGL_LIGHT code is compiled, but it doesn't work anyway.Here's the piece of code, perhaps you'll able to see what's missing to me:testgnd1_Alpha label BGLCODE ; Node 3 - RotateAroundX transform: BGL_TRANSFORM_MAT 0.000000,0.000000,0.000000, 1.000000,0.000000,0.000000, 0.000000,0.000000,1.000000, 0.000000,-1.000000,0.000000 ; Node 6 - light_land transform: BGL_TRANSFORM_MAT -90.665771,1115.901001,-79.999626, 6.819318,0.000000,0.000000, 0.000000,6.819318,0.000000, 0.000000,0.000000,6.819318 BGL_LIGHT LIGHT_LANDING, 0.000, 0.000, 0.000, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 25 BGL_LIGHT LIGHT_LANDING, 0.000, 0.000, 0.000, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 26 BGL_TRANSFORM_END ; Transform light_land BGL_TRANSFORM_END ; Transform RotateAroundX BGL_END BGL_RETURNThanks in advance,

Share this post


Link to post
Share on other sites

Here is the code that GMax creates for my working example:[tt] ; Node 3 - RotateAroundX transform: BGL_TRANSFORM_MAT 0.000000,0.000000,0.000000, 1.000000,0.000000,0.000000, 0.000000,0.000000,1.000000, 0.000000,-1.000000,0.000000 ; Node 9 - Group01 transform: BGL_TRANSFORM_MAT -0.039576,-11.699116,-121.665611, 1.000000,0.000000,0.000000, 0.000000,0.984808,0.173648, 0.000000,-0.173648,0.984808 ; Node 10 - Light_Land_White transform: BGL_TRANSFORM_MAT 0.029298,-0.199160,0.259552, 0.781431,-0.005410,-0.004151, 0.000000,0.475723,-0.619974, 0.006819,0.619951,0.475705 BGL_LIGHT LIGHT_TAXI, 0.000, 0.000, 0.000, 20, 0.60, 0.40, 0FFC89B4Bh, 0.000000, 0.000000, 1.000000 ; source poly num = 1662 ; Node 11 - Light_Land_White transform: BGL_TRANSFORM_MAT 0.000000,-0.000002,-0.000004, 1.000000,0.000000,0.000000, 0.000000,1.000000,0.000000, 0.000000,0.000000,1.000000 BGL_LIGHT LIGHT_TAXI, 0.000, 0.000, 0.000, 20, 0.60, 0.40, 0FFC89B4Bh, 0.000000, 0.000000, 1.000000 ; source poly num = 1663 BGL_TRANSFORM_END ; Transform Light_Land_White BGL_TRANSFORM_END ; Transform Light_Land_White BGL_TRANSFORM_END ; Transform Group01 BGL_TRANSFORM_END ; Transform RotateAroundX[/tt]Maybe you can try to edit it into this form?Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

The problem is not the output code, the problem is HOW to get an output code like yours using Gmax commands. Anyway, reading the code you kindly posted, I understood that the two triangles needs to be GROUPED together, not only LINKED (since 'Link' and 'Group' are different Gmax functions).The tutorial I used was speaking about the 'Link' action only: that's likely why my spotlight wasn't working.Now it works (thanks! :-)), also if it doesn't appear as I was expecting. I just can see a solid white spot on the ground with blended edges, but I can't see the ground texture below it, unless I apply a normal '_lm' texture.Perhaps there's (here too) some prefix to be added to the part's (or material's) name to make the texture to show......(??)I've had some try with lightmaps and '_L' textures, but without success.

Share this post


Link to post
Share on other sites

Not sure what you mean with "I can't see the ground texture below". When I use it I see the light nice on top of the ground texture and I can see the ground through it (as the light beam has a different intensity going outwards).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Hi,I have worked on apron lights in gmax long time and I have positive results. My procedure for create it I put on gmaxsupport forum. I found that lights are looks very bad (not natural) in low visibility conditions (1,5 km) from long distance (5-10 km). In my opinion the best way for good looking lights is creating light with cone by editing bgls code (ligh_landing_1 command) with added ground _LM texture.Markhttp://members.chello.pl/m.sikorski/

Share this post


Link to post
Share on other sites

I understand, it's hard to explain with precision using words only.I mean I can't see the ground through the white light spot at the center of the light spot itself, while I can see it through the edges of the spot. I'm not sure if this's the way it's intended to be.I'll have some further try and I'll post a screenshot in case of some positive result.Thanks

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