[Solved] 1.1 draw_as_light, draw_as_glow, draw_as_sprite
Posted: Mon Nov 23, 2020 11:00 pm
Hi, would appreciate some pointers here pending wiki updates in time.
I am exploring some of the new rendering goodies in 1.1 and meeting with mixed success.
1.For vehicle lamps, there is a new light_animation prototype which contains a "draw_as_glow" parameter. What is draw_as_glow? I had pre-prepared some glowing lamp sprites for my vehicles but have only partial success with getting them working despite following the car prototype's example in entities.lua. Possibly I have messed something up but they work in the main animation as additive overlays. They barely appear in the light_animation for some reason. Some kind of premultiplication thing? Edited to add, in 1.1 it was a secondary layer order thing.
2. What is draw_as_sprite? I'm seeing it on the new furnace glows. It appears, if set to false in conjunction with draw_as_light, to stop the glow from appearing during the day. However I'm getting a significantly weaker result from draw_as_light = true with draw_as_sprite = false than I get with just draw_as_light. Not quite understanding this.
3. For the 1.0 working visualisations where you could set the draw_as_light property, I had a whole bunch of stuff which just ... worked. These were the kind of additive glows vanilla has used for some time in centrifuges and is now using on furnaces as well. For my labs, which don't have working_visualisations, I had prepared the same kind of additive glow and was just temporarily spamming them with a spotlight until 1.1 hit. Now I'm finding that these barely work at all as draw_as_light = true sprites in on_animation and off_animation. They do work exactly as expected if you "double draw" them - once as not a light and blend mode additive-soft, and again as a light. Looking at the vanilla's new lab sprites I can see that the lights are indeed drawn in the main non-light spritesheet as well as the extra glow overlay. But none of this doubling up is necessary for working_visualisations so I feel like there is some hole in my knowledge ...
I am exploring some of the new rendering goodies in 1.1 and meeting with mixed success.
1.
2. What is draw_as_sprite? I'm seeing it on the new furnace glows. It appears, if set to false in conjunction with draw_as_light, to stop the glow from appearing during the day. However I'm getting a significantly weaker result from draw_as_light = true with draw_as_sprite = false than I get with just draw_as_light. Not quite understanding this.
3. For the 1.0 working visualisations where you could set the draw_as_light property, I had a whole bunch of stuff which just ... worked. These were the kind of additive glows vanilla has used for some time in centrifuges and is now using on furnaces as well. For my labs, which don't have working_visualisations, I had prepared the same kind of additive glow and was just temporarily spamming them with a spotlight until 1.1 hit. Now I'm finding that these barely work at all as draw_as_light = true sprites in on_animation and off_animation. They do work exactly as expected if you "double draw" them - once as not a light and blend mode additive-soft, and again as a light. Looking at the vanilla's new lab sprites I can see that the lights are indeed drawn in the main non-light spritesheet as well as the extra glow overlay. But none of this doubling up is necessary for working_visualisations so I feel like there is some hole in my knowledge ...