Jump to content
Sign in to follow this  
Guest fbnweoghnwd

Self Illuminating Material

Recommended Posts

Guest fbnweoghnwd

Has anyone successfully created self-illuminating objects and gauges for FSX?I made a copy of the R-22's low-fuel annunciator, and replaced the graphics (on and off versions of the light) with my own. There's code in the XML that looks like it's telling the lit version to self-illuminate (I think it says "Bright = Yes, or something to that effect). But the light stays dark, even when the "on" version of the bitmap is displaying.The other thing I tried to do was make an object that should always be self-illuminated - day or night. I gave it an FSX texture, which has a copy of the diffuse texture in the Self-Illuminated slot. It looks great at night, dawn, and dusk, but in the daytime it doesn't self-illuminate. Any ideas?

Share this post


Link to post
Share on other sites

"Self-illumination" doesn't work the same way in FSX as it does in FS9. You got the first part right - placing an Instance of the diffuse color texture in the self-illumination slot, but...In the Material Editor, you need to set the "Emissive Properties" to "AdditiveUserControlled" or "Additive".The former is controlled by the panel lights switch, the latter is "always on"......however, it will NOT be bright during the daytime, despite what the SDK claims.Don't waste time trying the "BlendUserControlled" or "Blend" modes, they look like dog poop... ;)


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 fbnweoghnwd

Thanks for the info, Bill.So let's see if I got this right:In FSX we can now create a teapot with reflection, bump, and specular mapping, emissive bloom, and psychodelic colored fresnel hilights. But we can't make a light bulb.

Share this post


Link to post
Share on other sites

>Thanks for the info, Bill.>>So let's see if I got this right:>>In FSX we can now create a teapot with reflection, bump, and>specular mapping, emissive bloom, and psychodelic colored>fresnel hilights. But we can't make a light bulb.Well, we can make a light bulb easily enough, but it will only be "lighted" at dawn/night/dusk...


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 fbnweoghnwd

>Well, we can make a light bulb easily enough, but it will only>be "lighted" at dawn/night/dusk...That's right. So when I release my chopper, I will include a note instructing people not to engage the clutch, overheat, or run out of fuel in the daytime!:-newburn

Share this post


Link to post
Share on other sites

>>Well, we can make a light bulb easily enough, but it will>only>>be "lighted" at dawn/night/dusk...>>>That's right. So when I release my chopper, I will include a>note instructing people not to engage the clutch, overheat, or>run out of fuel in the daytime!:-newburn Ah, in that case a small 'gauge' would be the best option... 'cause you can make it BRIGHT in the daytime...Here's an example of me using a gauge as a light. Even in the daytime, the "light" appears "bright." This gauge represents the "logo lights" in the horizontal stabilizer of a Citation II SP/2:http://img443.imageshack.us/img443/2257/ci...tdaytimemy7.jpg


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 fbnweoghnwd

I tried the gauge method as well, but that has its problems too. Here's an image showing two different techniques I used:http://www.mickposch.com/Flight_Sim/Temp_Lights.jpgThe lighted annunciator on the upper right is a low fuel warning. It's a traditional gauge - using the code I posted at the beginning of this thread (same code as the default R-22, with custom graphics). It looks fine in the 2D cockpit, but as you can see, it's pretty wimpy in the VC.The one on the lower left is a fire warning light. The unlit version of the light is just a bitmap on the panel background texture; the lit version is not a gauge, but a polygon with a self-illuminated texture applied to it. When you press a fire warning test button, the lighted polygon - which is normally hidden just behind the panel - animates forward to a position just in front of the panel. This light looks correct in this image - which it always does at night, dusk, and dawn - but it's dark in the daytime when there's no light hitting it.So each approach has its own problems.

Share this post


Link to post
Share on other sites

>So each approach has its own problems. In the example I posted, I've combined both methods... ;)The gauge's "lighted bitmap" has a BRIGHT tag applied (it is a C gauge, but XML's BRIGHT works the same).The gauge is applied in the VCockpit entry applied to two polygons: one with normal $texture and the other with lighted $texture. XML model code wiil display the appropriate lighted/nonlighted poly as desired. ;)


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

Hi... (insert your name here)I used the very same method you described there (switching/animating the lit/unlit buttons behind the panels), but I took it a step further... there is a way to hack ASM code (in FS9, Haven't tried in FSX) to make material be bright at all times, and it works well. The button is lit brightly in the daytime, even if it's against the sun and shaded by the console.I can't believe they didn't fix this in FSX...sigh...


P3D SpacePort Team

Share this post


Link to post
Share on other sites

>Hi... (insert your name here)>>I used the very same method you described there>(switching/animating the lit/unlit buttons behind the panels),>but I took it a step further... there is a way to hack ASM>code (in FS9, Haven't tried in FSX) to make material be bright>at all times, and it works well. The button is lit brightly in>the daytime, even if it's against the sun and shaded by the>console.>>I can't believe they didn't fix this in FSX...sigh...Well, I am familiar with the FS9 .asm hack...FSX does not use .asm files at all, going directly from GMax to .mdl (via Direct X files which unfortunately are "hidden" from the modeler).Exporting from Max8, the export module does leave the Direct X files. In fact the modeler must "manually" drag-n-drop the .X file on XtoMDL.exe to compile the .mdl file.The "daytime emissive" feature is supposed to be working, but unfortunately it is now... ;(


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

Hi Bill!I was under the impression that X files and ASM files are one and the same. ASM is usually abbreviation for assembly file, and the code that's spewed out is farthest form anything assembler would understand. I thought that MS FSX team decided to call the output for what it really is, (X file) but that the structure hasn't changed. Pardon my ignorance, I am busy on a FS9 project and haven't had time to dive into FSX development. If the structure hasn't changed, then the "hack" would still work. Even if it has, I'm sure I can track down the code in X file and give it emissive properties ("the hack" ;) ).RE: you comment... "but unfortunately it is now"you meant... "but unfortunately it is noT" ?


P3D SpacePort Team

Share this post


Link to post
Share on other sites
Guest fbnweoghnwd

If the structure hasn't changed, then the "hack">would still work. Even if it has, I'm sure I can track down>the code in X file and give it emissive properties ("the hack")That would be very cool if you could pull that off...

Share this post


Link to post
Share on other sites

>Hi Bill!>>I was under the impression that X files and ASM files are one>and the same. ASM is usually abbreviation for assembly file,>and the code that's spewed out is farthest form anything>assembler would understand. I thought that MS FSX team decided>to call the output for what it really is, (X file) but that>the structure hasn't changed. Pardon my ignorance, I am busy>on a FS9 project and haven't had time to dive into FSX>development. If the structure hasn't changed, then the "hack">would still work. Even if it has, I'm sure I can track down>the code in X file and give it emissive properties ("the hack">;) ).>>RE: you comment... "but unfortunately it is now">>you meant... "but unfortunately it is noT" ?Indeed, that was a typo. I did mean "not..."FS9's export module conversion path is like this:.gmax => .x files => .asm files => .mdl or .bgl files.Note that the first "conversion" is to DirectX files (with a lot of custom Meta-data added). Next, the DirectX files are converted to assembly language files (.asm). Finally, MakeMDL.exe takes the .asm files and builds either a .mdl or .bgl file, depending on the option chosen.The new FSX export module (which unfortunately has the same name as the FS9 version!) takes the .gmax file and converts it to even more heavily customised DirectX files, the XtoMDL.exe takes them and compiles a .mdl file for either aircraft or secenry.Because of their licensing agreement, ACES has taken great pains to make the process "unbreakable" so it's not possible - or at least no one has found a way yet - to "keep the .X files" for modification... :-bang So, even were it possible to find the "hack" for the .X file(s), not being able to capture them makes it a moot point. :)


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

I see...So, none of the intermediate files are available for scrutiny? I'm a little confused, I thought you could read the x file if you could see the Meta-data added.And the ASM file - are we talking the FS9 ASM or the "real", hex code? Again, if those can't be captured, it's a moot point.Perhaps I will set some time aside and go through the FSX design process myself before I start asking more questions...As a footnote - aren't FS9 models compatible with FSX? Why not stick with MakeMDL?


P3D SpacePort Team

Share this post


Link to post
Share on other sites

Hi Bill,A bit of off topic, but do you know if it is possible to create MOVABLE landable platforms in FSX? I haven't tried this yet, but I saw an "adventure" where you have to land Piper Cub onto a school bus... and I would call that a movable platform, so it looks promising...


P3D SpacePort Team

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