Sign in to follow this  
misho_TerraBuilder

Self-Illuminated material for VC (NOT gauges!!!)

Recommended Posts

Hello,I am building a cockpit that is largely enclosed and has small windows, consequently there is very little light that gets in. Is there a way to assign VC interior material a self-illumination property, so that it stays lit with a uniform intensity (or, preferably, the texture with which it is textured does NOT get brighter or darger depending on how light is hitting it) no matter which way the sun shines? It looks very odd right now when the cockpit walls light up and there is no sun shining on them...Thanks,Misho

Share this post


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

I have never heard of a fix for this in aircraft.but i have 2 suggestions, maybe they can help you.1. I would try a really outrageous specular level, like max, or close to it, what's it go up to? 999. then assign a dark color for the specular color.2. Arno has a prog. called MDL tweaker, if i remember right, it has an option to do just what you want, but it is for tree polys. It might be worth a shot.let us know, cuz it bugs me too. ;-)joe

Share this post


Link to post
Share on other sites

Hi Joe,Thanks for the response... either option does not work. I'm not sure what option would do that in MDLTweaker, you're probably thinking the "rotate to viewer" tree option, which is not what I want to do.I've come across a few topics in this forum that deal with this and they all lead to dead end: not possible. There has been a suggestion to try to use VC light, but that doesn't have the desired effect either. It works with a non textured material (just a plain flat color) but not with a texture material.Any other suggestions, I would appreciate them...Misho

Share this post


Link to post
Share on other sites

This is possible and easily done in FSDS 2, but I don't know about GMAX. My recent Eclipse update is an example of the concept. I also apply a subtle backlight to my gauge poly even in the daytime so the gauges don't get washed out when flying into the sun. Our eyes can adjust to the effect in real life, but the sim doesn't model it so some backlighting is a compromise I use.-John

Share this post


Link to post
Share on other sites

Thanks John,Hmm... I definitely don't want to re-design in FSDS, I'm a very comfy GMAX user. I wonder if there is a ASM code hack for this, as there was a hack for a dynamic reflection in scenery files a while ago. Perhaps a tag BRIGHT="YES" that would have to be inserted in the material code...does anyone have any info on this, before I waste any time on it? :)Misho

Share this post


Link to post
Share on other sites

In FSDS 2, the property used in the material editor is referred to as the emissive color. I don't know if this is of help or follows the SDK naming convention for the material property or not. I know there's a tool--I believe it's called "Middleman", that gives access to certain material properties outside of GMAX.-John

Share this post


Link to post
Share on other sites

Try ticking off the box "Self-Illumination" in the Material Properties...

Share this post


Link to post
Share on other sites

this is what you want to fix right?when you face the sun, your panel is dark.http://forums.avsim.net/user_files/110805.jpgbut when you turn away, it reflects light.http://forums.avsim.net/user_files/110806.jpgI just tried Bill's trick on those pics, but it's still there. (assuming i did it right)Misho, youre right.. it wasnt MDLtweaker it was something else.. MDLC??I know i have seen it as an option on something.. come on brain!i'll check back if i remember...joe

Share this post


Link to post
Share on other sites

Tried - No joy!I can get it to work with non-textured objects - but the textured objects seem to want to get bright or dark depending on where the sun is.Misho

Share this post


Link to post
Share on other sites

Partially - but in general I am not talking about the panel in specific, I'm talking about the cockpit (VC) in general. Your shot illustrates the problem as long as the panel shows the part of the cockpit geometry, not the gauge backgrounds that have been treated for night illumination.OK, I'll try to illustrate:Suppose you are a weapons officer on B-52, tucked away somewhere behind cockpit, far away from the cockpit windows. Your station has all kinds of weapons systems, and it's fairly dark because the cockpit light doesn't reach you. Well, if you try to model this in GMAX for FS, your station's walls will darken/brighten miraculously by the sunlight outside, as if the light was penetrating the walls (depending on your position of course)A constant, non reflective texture property would fix this - I would like the interior texture to stay the same no matter which way the aircraft is facing. Some people call it "Self illuminating" which is a misnomer, because texture can represent a dark state of the aircraft (which is what "LM" textures are)or, a more general complaint:Dooes the sunlight EVER reach the nook under the instrument panel where the rudder pedals are? I don't think so, but in FS it does...Thanks for the input everyone,Misho

Share this post


Link to post
Share on other sites

After a bit of tinkering with ASM files, I am happy to report that I have cracked this problem. It is a simple easy fix and it does EXACTLY what I wanted.In order to make a textured material that does NOT react to sunlight in VC, you need to:- Compile your model with an option to keep ASM files- Go into the ASM file that represents your VC, in my case it was *_0.asm- search for a texture that is associated with a material that is not supposed to brighten/darken. This will help you identify the material ID associated with that texture. It will look something like this: MATERIAL 5,0 ; <255,255,255,255> MB_PADDING.BMP;;;Material ID is "5" in this case.- Go to the top of the file, where materials are declared. It is a section that begins with "MATERIAL_LIST_BEGIN"- Find Material ID #5: The line will look something like this:MATERIAL_DEF 1.000000,1.000000,1.000000,1.000000, 0.392157,0.392157,0.392157, 0.000000,0.000000,0.000000, 0.000000,0.000000,0.000000, 0.000000 ; 5- Count down 11th entry after MATERIAL_DEF tag and change it from 0.000000 to 1.000000- The line now reads:MATERIAL_DEF 1.000000,1.000000,1.000000,1.000000, 0.392157,0.392157,0.392157, 0.000000,0.000000,0.000000, 1.000000,0.000000,0.000000, 0.000000 ; 5-Repeat for every material/texture that needs to be treated this way.-Save the ASM file and use BGLC compiler to compile it. Look in the *.asm file at the top, there is an instruction on how to compile. It will read something like "compile with BGLC /MDL". Make sure you use MDL switch. Only *.asm file needs to be compiled, the rest of the ASM files are called for compilation from the main ASM file. THAT'S IT!I discovered this when I created a non-textured material that was exhibiting proper self-illumination. As soon as I added a texture, the numerical value in the 11th slot was overidden, even though nothing has changed under the texture. Looks like M$ got sloppy again - I see no reason to override these values. They are "self illumination" values in GMAX, BTW - it doesn't matter if they are set or not, MakeMDL wipes them out as soon as the texture is assigned. So, everyone that was interested to see if this was possible, here it is. I'm delighted to contribute something to the community!Misho Katulic, AuthorTerraBuilder

Share this post


Link to post
Share on other sites

congrats Misho, it takes some mighty stones to even LOOK in the asm of a complex model! My eyes were burning just thinking about it. You got me going the other night with this thread, and I was very discouraged with multiple attempts. I came to the conclusion it was not possible. as payment for your hard work, everytime i see a VC that is not "fixed" I'll have to say.. "they need to Misho it" :-lolthanks for sharingjoe

Share this post


Link to post
Share on other sites

Thanks Joe!ASM files are not all that complex IMHO, as long as they are ASCII you can sort of find your way through it (don't confuse them with assembly files, whaich are a #### to figure out)...A small addendum to the above crack:Depending on what your texture is, you can insert values in the positions #12 and #13 as well as #11... they will control the RGB components of the illumination!Misho Katulic, authorTerraBuilder

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