Sign in to follow this  
TheFiddler

(I'm?) too dim: FS2002 night textures for buildings

Recommended Posts

Hello,Disclaimer first: :-newbie Would someone be so kind as to clarify for me some questions about FS2002 night textures for buildings, please?Here is my problem: I have a freeware scenery, which has no night textures, so I wanted to create some for the buildings. But I have BGLs and textures only, no scenery source code (except the SCASM files obtained by decompiling). (NOTE: All this is strictly for my own private education; so is the BGL de-compiling which I did. I have no intention of sabotaging the author's excellent and freely available work! And re-compiling to BGL didn't work anyway in this case.)The graphics tool I am using is PSP 7.Originally I thought that making to each day texture abcdef.bmp a night texture called abcdef_lm.bmp would take care of everything, including automatic switching between textures according to time of day.Q1: Is it possible at all to get day/night switching just by adding a *_lm.bmp texture, or does one always have to modify the BGL also?In any case it didn't work here: This scenery uses object libraries, with TextureList statements for the objects in the library , and CallLibObj in the BGL using these objects. From other sceneries which do have night textures, I gather that the TextureLists have to include entries also for the *_lm.bmp files -- apparently these are not just automatically used. Moreover, it looks as if for the buildings, no LoadBitmap instructions are used at all (though they are used for some other objects using asphalt textures, probably runways or roads).Q2: Are these observations correct? Can buildings called from object libraries, with no LoadBitmap instructions (?), still switch between day and night textures? (Well, of course they can, I can see it, but HOW?)As a kludge, I decided to go ahead anyway, give the night textures the same filename as the day textures have, and then just to manually exchange them whenever I want to see the night view.But now I have some issues with the textures themselves: Basically, they do work OK, i.e. are correctly rendered in FS2002, and look fair enough (for a first try :-) ). The strange thing is that although I made the original texture for illuminated windows very bright (almost white), they still look very dim in FS2002. I still wouldn't have thought anything of it, until I saw that a very close-by autogen building has much brighter windows. I located the texture for this (blda2lm.bmp; a replacement for the original FS2002 one, though), and the strange thing is this: Looking at the textures directly (with Martin Wright's Show), my windows have RGB values of about 200-250 (with approx. R = B = G); the true night tex.s (*_lm.bmp) have only about 80-90.However, in a screenshot made from FS2002, my windows have RGB values of only about 90-100, while those in the autogen building (true night texture) have about 120..(Measured in the same screenshot, so any bias by taking the shot and processing it is the same for both textures.)In other words, it looks as if brightness and contrast of the *lm.bmp autogen texture have actually been increased by the FS2002 night-time rendering, whereas my would-be night textures (*.bmp) have been dimmed down.Q3: Why is this? Hypotheses:Q4: Are autogen textures handled differently from non-autogen textures by the FS2002 rendering?Q5: Are textures from xyz_lm.bmp files treated differently from xyz.bmp textures -- even if both are meant to be night textures? Do LoadBitmap and CallLibObj differ in this regard?Q6: Could different stretching of the textures be a factor? (They were stretched considerably in the autogen building, but not in mine).Q7: Is there perhaps any alpha channel trickery involved which I am missing (but in DXTbmp, I don't see any alpha variation at all for both these textures -- just a uniform area the same size as the texture).I would appreciate any enlightenment very much indeed :-coolThanks in advance!Martin The Fiddler

Share this post


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

I don't think you'll get this to work well. Normally night textures are activated with a switch in the BGL -- if no night textures exist, then the 'normal' texture is displayed at night, only darker. That's why your lighted windows aren't bright enough.If night textures do exist, then they are displayed as is -- not darkened. Obviously the scenery author wouldn't turn on night textures unless the textures exist -- at night all you'd get is grey shapes.

Share this post


Link to post
Share on other sites

Thanks for your reply!>Normally night textures are activated with a switch in the BGL -- >if no night textures exist, then the 'normal' texture is displayed at>night, only darker. That's why your lighted windows aren't>bright enough.Yes, that is clearly what is happening. And as far as I can make out, this switching in "normal" sceneries is handled by the LoadBitmap instruction.But what takes care of it in objects from libraries? I can find only the library BGL (with TextureList, which apparently must also list the *_LM.BMP textures), and then the actual scenery BGL using the library objects via CallLibObj statements.But I can't figure out where the "automatism" of the day/night switching is handled in these library-based cases. I am unable to locate (in the de-compiled SCASM files) any LoadBitmap instruction.Cheers,Martin

Share this post


Link to post
Share on other sites

Do you know what tools were used to create the scenery? A simple experiment using the same tool may solve this. For instance, if I compiled a simple GMAX scenery with and without night textures, it should be easy enough to find the switch by comparing the results.

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