Page 1 of 1

[Genhis][2.0.66] apply_runtime_tint breaks light_animation in additive blend mode

Posted: Sat Sep 13, 2025 3:17 pm
by TheKingJo
TL;DR
runtime tint breaks when using additive blend mode in the light_animation of a car prototype
Long Version:
In the following image one can see the comparison between the same layer definition of a car prototype's light_animation, the only difference beeing the apply_runtime_tint. (For simplification it is the only active sprite)
comparison.jpg
comparison.jpg (317.84 KiB) Viewed 458 times
Not tinted

Code: Select all

  {
    animation_speed = 2,
    apply_runtime_tint = false,
    blend_mode = "additive",
    direction_count = 128,
    draw_as_glow = true,
    draw_as_light = false,
    draw_as_shadow = false,
    flags = {},
    frame_count = 1,
    height = 1000,
    width = 1000
    max_advance = 1,
    repeat_count = 2,
    run_mode = "forward",
    scale = 0.5,
    shift = {0, 0.5},
    stripes = {
      {
        filename = "__kj_countach__/graphics/entity/countach_ground_mask_light_0.png",
        height_in_frames = 8,
        width_in_frames = 8
      },
      {
        filename = "__kj_countach__/graphics/entity/countach_ground_mask_light_1.png",
        height_in_frames = 8,
        width_in_frames = 8
      }
    },
  }
Tinted

Code: Select all

  {
    animation_speed = 2,
    apply_runtime_tint = true,
    blend_mode = "additive",
    direction_count = 128,
    draw_as_glow = true,
    draw_as_light = false,
    draw_as_shadow = false,
    flags = {},
    frame_count = 1,
    height = 1000,
    width = 1000
    max_advance = 1,
    repeat_count = 2,
    run_mode = "forward",
    scale = 0.5,
    shift = {0, 0.5},
    stripes = {
      {
        filename = "__kj_countach__/graphics/entity/countach_ground_mask_light_0.png",
        height_in_frames = 8,
        width_in_frames = 8
      },
      {
        filename = "__kj_countach__/graphics/entity/countach_ground_mask_light_1.png",
        height_in_frames = 8,
        width_in_frames = 8
      }
    },
  }
The spritesheet contains 128 rotations which look similar to:
preview.png
preview.png (20.49 KiB) Viewed 458 times
With colors being white with alpha gradients. The player color was the default orange yet the car underground light is black. I would've expected it to look orange.

When put into the animation property however, the result is as expected and shows up orange:
anim.jpg
anim.jpg (113.99 KiB) Viewed 458 times

Re: [2.0.66] apply_runtime_tint breaks light_animation in additive blend mode

Posted: Thu Sep 18, 2025 11:08 am
by Genhis
Thanks for the report. Can you share your mod for testing and explain why using animation is not a good workaround?

Re: [2.0.66] apply_runtime_tint breaks light_animation in additive blend mode

Posted: Thu Sep 18, 2025 11:33 pm
by TheKingJo
Genhis wrote: Thu Sep 18, 2025 11:08 am Thanks for the report. Can you share your mod for testing and explain why using animation is not a good workaround?
Uhh the mod is Lamborghini Aventador, but it is using a parent mod for entity setup and is also having a different sprite setup now, until this issue (if it is one) is fixed. But if you want I could quickly set up a proof of concept mod with the 4 version of working/not working graphics.

The reason I wanna use the light_animation is simply that I want the underground light of my car to only be active when it is dark ^^
Ofc otherwise I could just use animation

Re: [Genhis][2.0.66] apply_runtime_tint breaks light_animation in additive blend mode

Posted: Fri Sep 19, 2025 12:49 pm
by TheKingJo
I've made the test mod now. 4 cars in the unsorted crafting category
  1. shows the not working tinted additive light_animation (black)
  2. shows the working normal additive light_animation (white)
  3. shows the working tinted additive animation (orange)
  4. shows the working normal additive animation (white)

Re: [Genhis][2.0.66] apply_runtime_tint breaks light_animation in additive blend mode

Posted: Mon Sep 22, 2025 7:46 am
by Genhis
Thanks, it's fixed for 2.0.67. It wasn't related to additive blend mode specifically.

Re: [Genhis][2.0.66] apply_runtime_tint breaks light_animation in additive blend mode

Posted: Mon Sep 22, 2025 3:54 pm
by TheKingJo
Oh nice ^^

And sorry for not testing if it's even caused by the additive blend mode ^^