Animated Light Maps (aka Blinky Blinky Lights Effect)

Want to edit the game, build your own craft and missions? Here you'll find help, tools, guides and people to discuss with.
Post Reply

Animated Light Maps (aka Blinky Blinky Lights Effect)

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Wed Jan 20, 2021 7:37 am

https://youtu.be/Tf17eRBkFYg

It's a bit basic at the moment, but I plan to add more features later. It's all in the latest beta in the Downloads section already, so you guys can try it right away. It's also a bit experimental, so if you see stuff crashing, let me know.

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Wed Jan 20, 2021 8:40 am

Oh.
My.
God.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Wed Jan 20, 2021 1:35 pm

WOW! :)

Obviously I know it was showing off the effect, but the y-wing would need toned down for release :P

Now, can we use the lights to actually signify things? eg, landing gear lights etc

Love the casino sign

What other animations are possible? could the hangar have welders? (rapid flashing lights possibly casting shadows)

Trev

batuta
Cadet 1st Class
Posts: 155
Joined: Tue Oct 13, 2020 1:34 pm

Post by batuta » Wed Jan 20, 2021 3:09 pm

WONDERFULL

User avatar
Forceflow
Fleet Admiral (Administrator)
Posts: 7203
Joined: Wed Oct 20, 1999 11:01 pm
Contact:

Post by Forceflow » Wed Jan 20, 2021 3:25 pm

This is really incredible!
Murphy was an optimist! I am a pessimist!
And always remember that a smile is cheaper than a bullet! (District 9)
Webmaster of the X-Wing Alliance Upgrade Project

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Wed Jan 20, 2021 6:13 pm

Thanks for your comments guys. Yes, the effect is a bit exaggerated (otherwise it's a bit hard to tell in some cases), but it can be toned down.

@Trevor: At the moment, I think of this effect as turning lights on/off that are already there. So animated welders may work... or it may look a bit weird, like a neon sign (only one way to tell). Of course, this is the first version. The ultimate goal in the future would be to load MPG/AVI files to animate any texture, and then we can do whatever we want ;)

Here are the rules for the animated light maps:

* Textures in the original OPT must be illuminated already or the animation won't play.

* Animated Light Maps must have transparency for areas that aren't illuminated.

* Illuminated areas must have a high brightness. Don't use dark colors: they won't work.
If you want to tone down the bloom effect, use the "intensity" settings in the .mat file.
(more information below).

* All animated light maps must be PNG files under XWA\Animations.

* If there's an existing [TEX000XX] section in the .mat file, then add the animation data in
that section. If not, then create a new [TEX000XX] section with the animation data.

* To specify an animated light map, there are two options:

lightmap_seq -- will display a sequence of light maps and then repeat
lightmap_rand -- will randomly display the light maps

In both cases, the syntax is as follows:

lightmap_seq = <TexName1>,<seconds1>,<intensity1>, <TexName2>,<seconds2>,<intensity2>,...

Use the "intensity" field to alter the brightness of the bloom effect. You can set the intensity
to 0 to shut down the bloom, or you can use the provided "blank.png" image. See the sample materials
for examples on how to use this setting.

* All frames in the sequence must be specified in a single line. There's a limit of 512 chars for
the line, so you may want to use short names for the files.

User avatar
Forceflow
Fleet Admiral (Administrator)
Posts: 7203
Joined: Wed Oct 20, 1999 11:01 pm
Contact:

Post by Forceflow » Wed Jan 20, 2021 7:38 pm

Oh this sounds like it's actually quite easy to implement and very flexible in the design. Can it easily be implemented into existing opts or does the existing opts lighting map already need to follow the existing guideline?
Murphy was an optimist! I am a pessimist!
And always remember that a smile is cheaper than a bullet! (District 9)
Webmaster of the X-Wing Alliance Upgrade Project

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Wed Jan 20, 2021 7:52 pm

Forceflow wrote:
Wed Jan 20, 2021 7:38 pm
Oh this sounds like it's actually quite easy to implement and very flexible in the design. Can it easily be implemented into existing opts or does the existing opts lighting map already need to follow the existing guideline?
It can be added easily to existing OPTs. For the video above, the only OPT I modified was the X-Wing cockpit to enable illumination on TEX00028 (I think). None of the other OPTs were modified in any way. XwaOptEditor already exports illumination maps as PNGs with transparency, so you can use them as the basis to create animations. There's two more things to be noted:

* The transparency must be either 0 (transparent) or 1 (solid). Using values in-between may cause some artifacts around the edges of the effect. I'm trying to figure out a nice way to handle that.
EDIT: This has been fixed as of Jan 29, 2021. Transparency can now be any value between 0 and 1.

* The transparency of the illumination maps exported by XwaOptEditor are in the range 0 - 0.1 (something like that). So you'll probably need to apply a threshold to scale the transparency to the 0-1 range.

* The illumination maps exported by XwaOptEditor are grayscale. You'll have to add color manually for the animation.
Last edited by blue_max on Sat Jan 30, 2021 2:27 am, edited 1 time in total.

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Wed Jan 20, 2021 11:32 pm

This is great. Thanks.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
haui
Cadet 1st Class
Posts: 122
Joined: Mon Apr 15, 2019 9:29 am
Contact:

Post by haui » Thu Jan 21, 2021 10:02 am

I need a VR-Headset :-)
It's better to burn out than to fade away .

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7829
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Fri Jan 22, 2021 4:09 pm

I put together some rough gifs that show some of the new Animations in action.
So they can be viewed easily on the forum without looking at Youtube.

BaseGif.gif
CasinoGif.gif
YwingGif.gif
You do not have the required permissions to view the files attached to this post.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

Kampher
Cadet 2nd Class
Posts: 79
Joined: Tue May 09, 2006 11:01 pm

Post by Kampher » Sat Jan 23, 2021 1:56 am

This is amazing!

marcop000
Cadet 1st Class
Posts: 213
Joined: Fri Dec 27, 2019 7:08 pm

Post by marcop000 » Sun Jan 24, 2021 7:23 am

Very good job !!

Post Reply