[SOLVED] How to correctly make a light mask? (With Photoshop, paint.net, or GIMP)

Forum rules
SCS as a company do not wish to have paid mods on this forum. While we understand that not all paid mods use the Intellectual Property of other companies/people, it is very hard to moderate what is and isn't acceptable when money is involved. There are also concerns that it could look unfavorable to potential work partners going forward if SCS allow mods that may potentially use unlicensed branding.
Posting in the Mods forum (ATS and ETS2) is restricted to sharing free-to-the-public mods and providing support for mods. For more details, please check the Forum Rules.
ChiliBeef
Posts: 492
Joined: 27 Mar 2022 18:34

[SOLVED] How to correctly make a light mask? (With Photoshop, paint.net, or GIMP)

#1 Post by ChiliBeef » 09 Dec 2022 03:40

I'm surprised that there isn't a good tutorial on how to create a light mask correctly. I mean, I hardly found anything doing even a broad search for it and nothing was really up-to-date or entirely useful. There was one thread created in 2019 where someone provided a video that was in German (which I couldn't follow along) and there was Half Fast Gaming, whose video was over a year ago.

I'm using Photoshop 2021 and downloaded DXTBmp to follow along HFG's tutorial (he was using Paint.net and DXTBmp) but I honestly didn't find his video helpful for several reasons:
  • One, his end result showed a weird mismatch of varying degrees of darkness from the different channels. Now, every light mask texture I've seen always had the bright areas in (roughly) solid white and everything else in black (apart from the Color channel, naturally).
  • Second, my end result had the empty space around the lens textures light up my lights in Blender.
  • Third, towards the end of his video he then mentions, "Oh, by the way, you're probably going to run into this problem so you'll have to go back and redo some things." (Seriously, that is information you need before you're diving into everything.)
  • And finally, I've found his teaching style to be sloooow; I assume that's why his channel is called Half Fast Gaming?

Mini-rant over, how do I make my own light mask correctly? I'm sure I will eventually figure it out, maybe, but it's getting late so I'll have to resume tomorrow. In the meantime, I'm asking for help to be pointed in the right direction.

I've also downloaded Paint.net to see if it makes things a bit easier.
Last edited by ChiliBeef on 19 Dec 2022 14:56, edited 2 times in total.
You can write almost any way you want, and you might make yourself understood.
But, if you don't use standard English properly, you would also help people understand that you aren't well educated.
User avatar
PBandJ
Posts: 1296
Joined: 16 Jul 2019 22:54
Location: My computer chair...:)

Re: How to correctly make a light mask? (With Photoshop, Paint.net, and/or DXTBmp)

#2 Post by PBandJ » 09 Dec 2022 21:43

Half Fast Gaming shares videos on Blender quite a bit and he has videos on light masking that might help you. One is fairly recent and another one he goes over using Gimp to make a light mask that is a year old. His YouTube link is: https://www.youtube.com/@Halffastgaming/videos
ChiliBeef
Posts: 492
Joined: 27 Mar 2022 18:34

Re: How to correctly make a light mask? (With Photoshop, Paint.net, and/or DXTBmp)

#3 Post by ChiliBeef » 09 Dec 2022 22:14

@PBandJ I do not think you actually read my post as I did mention that I followed his one tutorial, followed by listing issues I had with it.
ChiliBeef wrote: 09 Dec 2022 03:40 ...and there was Half Fast Gaming, whose video was over a year ago.

I'm using Photoshop 2021 and downloaded DXTBmp to follow along HFG's tutorial...
You can write almost any way you want, and you might make yourself understood.
But, if you don't use standard English properly, you would also help people understand that you aren't well educated.
User avatar
PBandJ
Posts: 1296
Joined: 16 Jul 2019 22:54
Location: My computer chair...:)

Re: How to correctly make a light mask? (With Photoshop, Paint.net, and/or DXTBmp)

#4 Post by PBandJ » 10 Dec 2022 00:12

@ChiliBeef You may feel it necessary to be rude in your responses back to others, but yes I did read your post. There is more than one video there on light masking that I thought the others may help you. Sorry that somehow this has offended you, my apologies.
ChiliBeef
Posts: 492
Joined: 27 Mar 2022 18:34

Re: How to correctly make a light mask? (With Photoshop, Paint.net, and/or DXTBmp)

#5 Post by ChiliBeef » 10 Dec 2022 01:32

@PBandJ I was not being rude, but I cannot stop you from misconstruing the tone being portrayed when it comes to online text. If I was being rude, I would make it very obvious (such as, "Did you even bother to read my first post? I said it clear as day!"). Also, being passive-aggressive is not a healthy way to live.

These articles may help with a better understanding of why it's important to not assume tone of text so hastily.
Miscommunication in e-mail and text
Tips for Reading Emotions in Text


Also, your first response didn't convey that you did read my initial post; you made mention of HFG in a way as if I never heard of him before. A better alternative of a reply would've been something along the lines of, "I know you checked out his video with Paint.net, but have you looked at his one where he uses GIMP?" :)
You can write almost any way you want, and you might make yourself understood.
But, if you don't use standard English properly, you would also help people understand that you aren't well educated.
User avatar
KrysEmlyn
Posts: 477
Joined: 17 Mar 2017 12:32
Contact:

Re: How to correctly make a light mask? (With Photoshop, Paint.net, and/or DXTBmp)

#6 Post by KrysEmlyn » 10 Dec 2022 03:31

For light masks, you will need a program that will allow you to edit the color channels independent of each other.
I use GIMP for this purpose as it will allow me to decompose a light mask image file into 4 separate layers (Red, Green, Blue, and Alpha) that I can easily edit.
Once I'm done editing the layers, I can recompose them into a single image formed by a combination of the 4 layers.
GIMP will export into DDS format when saving files, too. When importing DDS files with GIMP, just make sure you don't import all of the mipmaps with it.
User avatar
PBandJ
Posts: 1296
Joined: 16 Jul 2019 22:54
Location: My computer chair...:)

Re: How to correctly make a light mask? (With Photoshop, Paint.net, and/or DXTBmp)

#7 Post by PBandJ » 10 Dec 2022 12:30

@ChiliBeef Always someone else' s fault..... :roll: Then a person who goes out of their way to truly help others with learning Blender you bash because you don't care for his style of teaching. I give kudos to anyone willing to sit down and try and pass their knowledge onto others and help them learn, especially free of charge. There is not much information out there that is up to date, so anyone willing to do this is awesome in my book.... :)

Oh well, hope you get your issue corrected. Have a good day.
ChiliBeef
Posts: 492
Joined: 27 Mar 2022 18:34

Re: How to correctly make a light mask? (With Photoshop, Paint.net, and/or DXTBmp)

#8 Post by ChiliBeef » 10 Dec 2022 13:55

@PBandJ What you're doing now is called projection. You saying that I'm blaming everyone else and have issues is merely you trying to hide your own shortcomings in that you might actually be in the wrong but won't accept it. And, all you're doing is being hypocritical to your own signature when you do that. :lol: If you want to play the victim card in a passive-aggressive, non-sensical way, that is definitely up to you, although it does make me laugh that you're acting so childish. :mrgreen:

I mean, the fact that you have a one-sided view on the tutorial shows you don't want to open your field of vision to understand the bigger picture; there are people who will simply not like one's teaching style as compared to another's and they have their reasons for it. I could get into the nitty-gritty of why that all is but you've shown me you're not one for logical thought, so I'll leave it at that.

PBandJ wrote: 10 Dec 2022 12:30 Have a good day.
I will definitely have a good day because your silliness has provided me some good entertainment. :D

-------------------------------------------------------------------------------------------------------------------------------------
KrysEmlyn wrote: 10 Dec 2022 03:31 For light masks, you will need a program that will allow you to edit the color channels independent of each other.
I use GIMP for this purpose as it will allow me to decompose a light mask image file into 4 separate layers (Red, Green, Blue, and Alpha) that I can easily edit.
Once I'm done editing the layers, I can recompose them into a single image formed by a combination of the 4 layers.
GIMP will export into DDS format when saving files, too. When importing DDS files with GIMP, just make sure you don't import all of the mipmaps with it.
Hmm, guess I'll have to look into GIMP, then! Thank you for also explaining why lots of people use it, I had no idea that it allowed that ability. I mean, I'm sure Photoshop can but probably requires doing a lot of other things to achieve the same effect. Last night I was trying to see if I could get the result in Blender with texture painting and nodes while following a tutorial, but that proved to be uneventful.
You can write almost any way you want, and you might make yourself understood.
But, if you don't use standard English properly, you would also help people understand that you aren't well educated.
User avatar
Outlaw Transport
Posts: 257
Joined: 15 Jul 2020 06:18

Re: How to correctly make a light mask? (With Photoshop, Paint.net, and/or DXTBmp)

#9 Post by Outlaw Transport » 10 Dec 2022 16:06

If you're even remotely comfortable with Photoshop, stick with that. (and that's the nicest way to describe paint.net)

The main problem with the lamp system is the documentation. I don't think anyone could describe it any worse if they got paid to do it. They've made up and thrown in these random words like "tiles" in there while simultaneously describing the RGB channels (the main thing) in the worst possible way.

To get to the issues you're describing first: this is 100% an issue with having alpha channels where you shouldn't and/or color bleed (see #3 below). Unless it's a marker light, make sure your texture and mask files don't have the white alpha channels Photoshop likes to add by default.

This is probably easier explained as a Youtube vid but I'll try:

1) For the sake of simplicity, I recommend using one texture file and one mask file. Save them as .tga so Blender can interpret and preview.
2) Think of the mask file as the one that controls opacity of your light texture when the light is on - that transparency is controlled using the different channels SCS assigned to each type of light. So if you have a texture file for your low beams, and the mask is just a square with 100% blue, it will be entirely white (along with some glare) with your lights on. That same blue square at 50% opacity and obviously 50% of the light texture will shine through.
3) Pay attention to the channels. All lights have their specific RGBA channel, and bleed is what causes most weird errors. e.g. if you're making a mask for an indicator light (red), it should not be visible at all in your green/blue/alpha channel.
4) Triple check that Photoshop actually saves/doesn't save the alpha channel you tell it to. I've spent many, many days trying to figure out why my lights don't work when it turned out Photoshop ignored the alpha -or created its own- upon save.
5) Create a second UV map for the mask file. It can just be a duplicate.
6) In edit mode, select the light and toggle the intended position in the SCS Tools shelf in Blender (front/middle/rear etc. This is what they call "tiles")

That's it.

Now, that is the basics. To actually make it look somewhat realistic, you want to incorporate some of the shape into the mask. Since obviously no light is 100% consistently bright top to bottom, but rather follows the curvature and/or shape of whatever light it is. I find these to be easy to do by hand with a brush.

Just to give you an idea; here's an old style halogen low beam with its corresponding mask (focus around the bulb, and fades from there), as well as a LED indicator (each bulb bright AF)
[ external image ]
User avatar
xXCARL1992Xx
Posts: 16524
Joined: 17 Aug 2016 12:18
Contact:

Re: How to correctly make a light mask? (With Photoshop, Paint.net, and/or DXTBmp)

#10 Post by xXCARL1992Xx » 10 Dec 2022 16:23

the word "tile" is not random

[ external image ]

this is a "tile" that is used in Blender where your texture is displayed, this is tile 0,0; the one next to the right would be 1,0; still right the next one 2,0 and then 3,0; 4,0 etc., those are the tiles used for the light mask texture, first and second (tile 0 and 1) are front left and front right, the 3rd and 4th tile is rear left and rear right respectively, the 5th tile is middle

[ external image ]

the same method is used for dashboard light, you have 16 tiles you can use for different color where the last one is permanently lit when you turn on your truck (Dashboard, GPS etc,) and all divided into tiles where the one you see in Blender is 0.0 + the next 3 tiles besides it on the right (1,0; 2,0; 3,0) and the next 3 underneath it (0.-1; 0.-2; 0.-3) and you have a square of 16 tiles you can use where 3.-3 is the one that is permanently lit up

[ external image ]
Last edited by xXCARL1992Xx on 10 Dec 2022 16:29, edited 1 time in total.
| !!!NO SUPPORT OR REQUESTS OF ANY SORT VIA PM!!! | Screenshot Thread | Steam Workshop | World of Trucks Profil |
[ external image ]
Post Reply

Return to “Help requests”

Who is online

Users browsing this forum: No registered users and 3 guests