• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Colored lines

Status
Not open for further replies.
Level 11
Joined
Aug 1, 2023
Messages
52
The attached map demos how to draw colored lines by abusing the splats\lightningdata.slk. It is filled with rows like [c0, textures, white.blp, 1, 1, 255, 0, 0, 255, 0, 0, 0, 0] for each color and line width combination. The splats\lightningdata.slk in the map uses these 216 colors, 5 different line widths, for a total of 1080 rows. The drawing then is just calling AddLightningEx with the appropriate lightning data name (c0 .. c1079).

lightnings seem to use some strange blending mode for their drawing. Colors like F00 (same as FF0000(red)) are drawn with slight transparency, the color 900 is more transparent, 300 even more, and 000 (black) is fully invisible. So the available colors are less than 216.
 

Attachments

  • colored_lines.w3x
    318.7 KB · Views: 8
  • colored_lines.png
    colored_lines.png
    262.2 KB · Views: 33
Level 45
Joined
Feb 27, 2007
Messages
5,578
Hahahaha that is astute and hilarious! I really want to add what you wrote to my signature quote, but without the context it really loses something. :'(

The forced (slight) transparency always messing visually with lines that intersect at a vertex or cross each other is, in my opinion, a true shame. This was almost perfect... until that messed it up.
 
Status
Not open for further replies.
Top