Author Topic: Transparency LUTs  (Read 4573 times)

Offline RSSwizard

  • Commander
  • *****
  • Posts: 793
    • View Profile
Transparency LUTs
« on: November 02, 2016, 10:32:11 pm »
Code: [Select]
transparencyLUTs: #done
  - colors:
      - [  8,  8, 12, 2 ] # "white"
      - [ 16,  8,  0, 2 ] # orange
      - [  0, 12, 12, 2 ] # cyan
      - [  4, 16,  4, 2 ] # green

What format is used for these?
I would like to add more of them but I dont know what they mean.
(I do know they dictate vapor color for underwater shots, I want to add more colors)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Transparency LUTs
« Reply #1 on: November 03, 2016, 01:30:20 am »
[ R, G, B, A ]
red, green, blue, and alpha
red, green and blue are obvious, the higher the alpha value is, the more "opaque" the colour becomes
16 is about the upper limit for any given colour value, and it's best to stick with low alpha values (1-4)

so for a nice purple vapor, you could do something like:
[ 14, 0, 16, 2 ]

remember, however, that this is all restricted by the actual TFTD palette, so some colours may not be fully achievable.
the algorithms do a "best match" according to the data in these fields and the colours available in the palettes.
(and now you know why "white" is written in inverted commas)
« Last Edit: November 03, 2016, 01:37:21 am by Warboy1982 »

Offline RSSwizard

  • Commander
  • *****
  • Posts: 793
    • View Profile
Re: Transparency LUTs
« Reply #2 on: November 03, 2016, 09:42:03 pm »
Wow thanks, I never would have figured that out (usually color values are 0-255 not 0-16).

I was thinking "these numbers must mean stages of the vapor trail, the colors it goes through based on how dense it is like for every 5 density . . . the colors must be a 16 color range of the palette, like 4 for green must mean that 4th range after the first one since its green . . . but 16 is completely off the palette by that logic"

I digress...

Yeah purple is on my list.

Also a kind of Dark Blue with a stronger alpha that looks kinda like squid ink (or dark blue laundry detergent) being shot in a line.

Tentaculats will shoot this with bio-spines for 50 damage each and they will autofire like crazy. Not much danger to ion armor and just annoying but their melee does 140 so its still death even without the zombies. Flying seed spitter.
« Last Edit: November 03, 2016, 09:49:07 pm by RSSwizard »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Transparency LUTs
« Reply #3 on: November 03, 2016, 11:46:01 pm »
xcom uses the VGA standard 256-colour palette with 4 bits per colour channel (hence 16 values instead of 256, or F instead of FF if you know hex)

the more you know *rainbow*
« Last Edit: November 04, 2016, 10:42:57 pm by Warboy1982 »

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Transparency LUTs
« Reply #4 on: November 04, 2016, 11:04:00 am »
??? VGA has 6 bits per colour channel (0-63), not 8, and I don't see how this relates to this piece of data being expressed with 4 bits per channel (0-15).

The_Funktasm

  • Guest
Re: Transparency LUTs
« Reply #5 on: November 04, 2016, 12:09:14 pm »
So I apologize if this isn't related enough to ask in this thread, but is there a plan to backport, or open the new/TFTD specific features into regular vanilla OpenXcom in XCOM 1, once it's past a certain point of reliability? Like to be specific, opening things like trails, variable battlescape palettes, and certain TFTD specific behaviors up to modding usage so long as it's practical? Or is that just a matter of course with how the project works?

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Transparency LUTs
« Reply #6 on: November 04, 2016, 07:57:51 pm »
So I apologize if this isn't related enough to ask in this thread, but is there a plan to backport, or open the new/TFTD specific features into regular vanilla OpenXcom in XCOM 1, once it's past a certain point of reliability? Like to be specific, opening things like trails, variable battlescape palettes, and certain TFTD specific behaviors up to modding usage so long as it's practical? Or is that just a matter of course with how the project works?
There is nothing to backport because both game use exactly same engine. Most of this behavior is not available in normal XCOM only because there is no underwater missions. Thing that you want is removing that restriction.

Offline RSSwizard

  • Commander
  • *****
  • Posts: 793
    • View Profile
Re: Transparency LUTs
« Reply #7 on: November 04, 2016, 11:26:43 pm »
This could be solved with a simple boolean switch, or more, but a boolean would do it also:

Code: [Select]
     alwaysVape: true# defaults to false, false means it only generates a vapor trail in an underwater mission
# true means it always generates a vapor trail... a l w a y s

the non-boolean version would be like:
Code: [Select]
     vaporbehavior: 0, 1, 2, 3, 4# 0 is only during underwater missions
# 1 is only during land missions
# 2 is only during cydonia
(or t'leth, but I dont see why, but maybe somebody wants to mod that t'leth is actually a teleporter array that goes to some place on ganymede and the water is funky there)
# 3 is only during normal missions (land & underwater)
# 4 a l w a y s