Jump to content

Emissive Masking with Paint Tool Sai-- is it possible?


You are about to reply to a thread that has been inactive for 1377 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Lately I've been trying to mess with Emissive Masking for the first real time after discovering masking is indeed a thing I can do in Sai. 

K7k0PW9.png

 

The issue, however, is that it doesn't actually seem to do anything, unless I'm doing it backwards? Any and all info I've found on how to do proper masking doesn't seem super clear.

The end result there is the entire tail I'm trying to add glowing stripes to being 100% full bright. The "black for no bright, white for bright" thing doesn't work and it's either:

Z1rCPCD.png

Completely bright through-and-through, or:

 

azNUGcJ.png

Everything not meant to glow ending up solid black when it should normally look like this.

 

V3PeYyO.png

 

I will add that I'm not too terribly bothered if this program just can't do emissive masking; I have no intention of downloading extra stuff just to make a glow mask, I mainly just want to know if the program could actually mask this properly and if it's just user error or what.

Link to comment
Share on other sites

I don't have to enable glow to activate emissive masking, at least in the default client.

OP: If SAI can export PNGs with transparent areas (and it looks like recent versions can), you can use it. Make sure you're producing 32-bit PNGs, not 24-bit.

EDIT: For this particular piece you could also just click "Full Bright", since every part of the original texture is either black (which won't emit anyway) or something you want to be fully bright (judging from your alpha mask layer).

MORE EDIT: I don't see a difference between your first and second pictures. I also don't see a problem with emission levels. They look like I'd expect them to with the mask you're showing. (Dark blue will stay dark even at full emission. "Emission" is really "what would this look like if it were in the game's brightest possible external lighting", not "what if this object gave off its own light".)

Edited by Quarrel Kukulcan
  • Like 1
Link to comment
Share on other sites

9 hours ago, Quarrel Kukulcan said:

OP: If SAI can export PNGs with transparent areas (and it looks like recent versions can), you can use it. Make sure you're producing 32-bit PNGs, not 24-bit.

Png is limited to 24 bit because it doesn't support a dedicated alpha channel, the alpha is emulated by lack of rgb values in the transparent areas. The only option to make this work is to use a tga, which can be 32 bit and has its own alpha channel, preserving the rgb data where the alpha is black. 

9 hours ago, Quarrel Kukulcan said:

Emission" is really "what would this look like if it were in the game's brightest possible external lighting", not "what if this object gave off its own light"

Wrong, emission is exactly an object that emits light from the surface, therefore the only way to appreciate the effect is to enable glow.

Link to comment
Share on other sites

PNGs can absolutely have an alpha channel. My copy of Photoshop CS4 from 2008 can make alpha PNGs just fine.

Quote

Wrong, emission is exactly an object that emits light from the surface, therefore the only way to appreciate the effect is to enable glow.

Glow and emission masks enhance each other, yes, and if there is an alpha channel in your texture it will affect the glow brightness (regardless of how you use that channel, too, at least in Linden Lab's viewer). That's nice because it lets you limit the glow to certain areas instead of putting a nimbus around the whole object. You don't need to turn glow on to make emissive areas look brighter than normal in dark areas, though. Plus SL's glow feature adds "fuzz" as well as brightness, and you don't always want that.

And, technically, neither of these features actually "emit" light in the sense of illuminating nearby objects. You have to flag the prim as a light source, which is yet another setting.

Here's a quick experiment I ran. The texture is a solid color with a simple 0%-100% alpha gradient.

 

emissionshots.jpg

Edited by Quarrel Kukulcan
  • Like 1
Link to comment
Share on other sites

On 7/14/2020 at 12:29 PM, OptimoMaximo said:

You have to add glow in the texture tab. Then the white areas will start to be emissive

Not the issue I'm having really, and doesn't work.

 

On 7/14/2020 at 1:15 PM, Quarrel Kukulcan said:

I don't have to enable glow to activate emissive masking, at least in the default client.

OP: If SAI can export PNGs with transparent areas (and it looks like recent versions can), you can use it. Make sure you're producing 32-bit PNGs, not 24-bit.

EDIT: For this particular piece you could also just click "Full Bright", since every part of the original texture is either black (which won't emit anyway) or something you want to be fully bright (judging from your alpha mask layer).

MORE EDIT: I don't see a difference between your first and second pictures. I also don't see a problem with emission levels. They look like I'd expect them to with the mask you're showing. (Dark blue will stay dark even at full emission. "Emission" is really "what would this look like if it were in the game's brightest possible external lighting", not "what if this object gave off its own light".)

Look at the first and second pictures again to see the issue I'm having-- if I use emissive masking, it either makes the ENTIRE tail fullbright (which is no different than just clicking fullbright, when I only want the stripes to be fullbright and not the rest of the tail) or if I redo the masking by painting everything else black like tutorials tell me, it literally makes the parts black instead of non bright.

Here, I'll rearrange the pics and show what's different/wrong with them.

 

r1H3gGl.png

EBTO1Hz.png

w1tb7P0.png

 

So I'm either doing something completely wrong by masking it like this:

K7k0PW9.png

Despite every tutorial showing something similar, or something else is wrong.

 

I'm uploading it as a png with transparency so that shouldn't be the issue.

Link to comment
Share on other sites

On 7/14/2020 at 12:29 PM, OptimoMaximo said:

You have to add glow in the texture tab. Then the white areas will start to be emissive

Not the issue I'm having really, and doesn't work.

 

On 7/14/2020 at 1:15 PM, Quarrel Kukulcan said:

I don't have to enable glow to activate emissive masking, at least in the default client.

OP: If SAI can export PNGs with transparent areas (and it looks like recent versions can), you can use it. Make sure you're producing 32-bit PNGs, not 24-bit.

EDIT: For this particular piece you could also just click "Full Bright", since every part of the original texture is either black (which won't emit anyway) or something you want to be fully bright (judging from your alpha mask layer).

MORE EDIT: I don't see a difference between your first and second pictures. I also don't see a problem with emission levels. They look like I'd expect them to with the mask you're showing. (Dark blue will stay dark even at full emission. "Emission" is really "what would this look like if it were in the game's brightest possible external lighting", not "what if this object gave off its own light".)

Look at the first and second pictures again to see the issue I'm having-- if I use emissive masking, it either makes the ENTIRE tail fullbright (which is no different than just clicking fullbright, when I only want the stripes to be fullbright and not the rest of the tail) or if I redo the masking by painting everything else black like tutorials tell me, it literally makes the parts black instead of non bright.

Here, I'll rearrange the pics and show what's different/wrong with them.

 

r1H3gGl.png

EBTO1Hz.png

w1tb7P0.png

 

So I'm either doing something completely wrong by masking it like this:

K7k0PW9.png

Despite every tutorial showing something similar, or something else is wrong.

 

I'm uploading it as a png with transparency so that shouldn't be the issue.

 

Edit bc of this specific bit and more clarity.

On 7/14/2020 at 1:15 PM, Quarrel Kukulcan said:

EDIT: For this particular piece you could also just click "Full Bright", since every part of the original texture is either black (which won't emit anyway) or something you want to be fully bright (judging from your alpha mask layer).

MORE EDIT: I don't see a difference between your first and second pictures. I also don't see a problem with emission levels.

 

fF0w2qz.png

gnXquoz.png

Link to comment
Share on other sites

5 hours ago, LilithServil said:

I'm uploading it as a png with transparency so that shouldn't be the issue.

This is the issue. To retain rgb values, color and patterns, you have to paint the alpha white for full glow and black for no glow and the gradient in between will be an according percentage of the glow setting in the texture tab. Fact is that if you export as png it won't work no matter what. It needs to be exported as tga 32 bit with alpha

Edited by OptimoMaximo
Link to comment
Share on other sites

Just to clarify: full bright equals to say it's an unlit surface, therefore the external lighting won't affect the surface which will look like fully exposed to light regardless of what surrounds it. 

Emissive surfaces oth, as the word says, are surfaces that emit light. The only setting in the texture tab that simulates that is the glow. 

  • Like 1
Link to comment
Share on other sites

3 hours ago, OptimoMaximo said:

Just to clarify: full bright equals to say it's an unlit surface, therefore the external lighting won't affect the surface which will look like fully exposed to light regardless of what surrounds it. 

Emissive surfaces oth, as the word says, are surfaces that emit light. The only setting in the texture tab that simulates that is the glow. 

Unfortunately I'm still not home for the day so I may be talking completely out of my butt, but emissive alpha doesn't have any relation to glow. From the Material Data page on the wiki regarding alpha modes:

Emissive
The value is used to encode how brightly the pixel appears in the absence of light (ambiance): 0 = no additional ambiance (default); 255 = full brightness
 
I interpret this as what we call "fullbright," not glow.
Edited by Wulfie Reanimator
Link to comment
Share on other sites

2 hours ago, Wulfie Reanimator said:

may be talking completely out of my butt, but emissive alpha doesn't have any relation to glow.

Try it and you will see. I've been making emissive materials since the first implementation and it works with glow, not full bright. With glow at 0, the texture has no change whatsoever, no full bright at all. With glow above 0, the unmasked areas glow. 

  • Thanks 1
Link to comment
Share on other sites

13 hours ago, LilithServil said:

fF0w2qz.png

Ahhh. I think what you're seeing is interference from your bump & shiny settings. Those can interact poorly. (In general, the shinier an object is, the darker it will be overall, and I've just discovered that if I use a system-standard bump pattern but a custom shininess texture, my whole object turns solid black. Just, black. All of it. The textures doesn't matter.)

Where is that fur pattern coming from? It's not in your texture.

Are you using any kind of shininess?

(Mathematically it's impossible for the emission mask to darken anything, since 0% means "display it normally" and anything higher makes it brighter. That fact plus the quirkiness of SL's advanced lighting combinations makes me suspect it's not the emission mask itself causing your issues.)

Edited by Quarrel Kukulcan
Link to comment
Share on other sites

7 minutes ago, OptimoMaximo said:

Try it and you will see. I've been making emissive materials since the first implementation and it works with glow, not full bright. With glow at 0, the texture has no change whatsoever, no full bright at all.

1. If your diffuse texture has an alpha channel at all, it will affect glow intensity, yes. This is true regardless of whether you set the face's alpha mode to None, Alpha Blending, Alpha Masking, or Emissive Mask.

2. I just tried Full Bright with glow and SL still only put the Glow effect on the high-alpha parts (plus made the underlying texture bright everywhere). I don't know if this is a Firestorm vs. LL viewer thing, or a Test Server vs. Live thing, or what, but I don't get your result.

3. Emissive masks require Advanced Lighting to be on. Full Bright and Glow always work.

Link to comment
Share on other sites

1 hour ago, OptimoMaximo said:

Try it and you will see. I've been making emissive materials since the first implementation and it works with glow, not full bright. With glow at 0, the texture has no change whatsoever, no full bright at all. With glow above 0, the unmasked areas glow. 

With the textures you gave me to test with (p.s. thank you), what I said here is apparently accurate:

9 hours ago, Wulfie Reanimator said:

I'm not at home to double check, but use the mask you've created in Gimp to select all the unwanted areas, then take an eraser and remove 99% of the opacity in the texture. If I recall, transparency is what defines the intensity of the emission. The texture will be fully opaque

4 hours ago, Wulfie Reanimator said:

Unfortunately I'm still not home for the day so I may be talking completely out of my butt, but emissive alpha doesn't have any relation to glow. From the Material Data page on the wiki regarding alpha modes:

Emissive
The value is used to encode how brightly the pixel appears in the absence of light (ambiance): 0 = no additional ambiance (default); 255 = full brightness

I interpret this as what we call "fullbright," not glow.

  1. On the left is the original texture as-is. It's transparent except for the 4 "lights" on the road.
  2. In the middle is the texture set to "alpha mode: none" which makes it fully opaque with no loss of color.
  3. On the right is the texture set to "alpha mode: emissive mask" which causes the (non-transparent) lights to appear fullbright.

867fc69a92.jpg

That is your texture without glow. If I add glow, only the 4 lights will be affected, which is where you're correct and it's what I already knew.

The same applies to the official viewer, Firestorm, Black Dragon, and any other proper viewer.

Edited by Wulfie Reanimator
Link to comment
Share on other sites

...or the OP's problem may be a bug related to the Environment Enhancement Project that was supposed to be fixed in early February but wasn't.

https://jira.secondlife.com/browse/BUG-228172

That said, I can't reproduce it with the texture in the bug report ("a8c3bdcc-6a98-0947-457f-4cee2520020f"), so...

Edited by Quarrel Kukulcan
Link to comment
Share on other sites

4 minutes ago, Quarrel Kukulcan said:

...or this may be a bug related to the Environment Enhancement Project that was supposed to be fixed in early February but wasn't.

https://jira.secondlife.com/browse/BUG-228172

That said, I can't reproduce it with the texture in the bug report ("a8c3bdcc-6a98-0947-457f-4cee2520020f"), so...

No, that Jira concerns a very different thing. If you look at the two cubes in the Jira screenshots, the other is significantly darker than the original.

This is the way it has always worked. I recall this from trying this stuff years ago. I believe your screenshots of the "alpha gradient" demonstrate the exact same effect.

Edited by Wulfie Reanimator
Link to comment
Share on other sites

21 minutes ago, Quarrel Kukulcan said:

I mean the "emission mask of 0 makes colors darker" problem that we're trying to solve.

I believe the reason why the tail is showing up with pitch-black stripes is because their actual alpha mask isn't working and it's being uploaded with the solid-black colors still in the texture. We haven't been shown what the texture looks like in-world. (As in, the diffuse itself before being applied.)

Edited by Wulfie Reanimator
Link to comment
Share on other sites

10 hours ago, Wulfie Reanimator said:

I'm not at home to double check, but use the mask you've created in Gimp to select all the unwanted areas, then take an eraser and remove 99% of the opacity in the texture. If I recall, transparency is what defines the intensity of the emission. The texture will be fully opaque. 

I've tried doing that in SAI but it just erases the texture itself for whatever reason and leaves me with the same "most of the texture is gone and completely black" result. I don't know if SAI just handles masks super poorly or what.

 

9 hours ago, OptimoMaximo said:

This is the issue. To retain rgb values, color and patterns, you have to paint the alpha white for full glow and black for no glow and the gradient in between will be an according percentage of the glow setting in the texture tab. Fact is that if you export as png it won't work no matter what. It needs to be exported as tga 32 bit with alpha

That's... Not the issue. I have the exact same problem with tga, and tga seems to be even MORE finicky-- i.e sometimes it won't even recognize it as being saved with alpha, and when it does, I still get the png issue along with it.

 

3 hours ago, Quarrel Kukulcan said:

Ahhh. I think what you're seeing is interference from your bump & shiny settings. Those can interact poorly. (In general, the shinier an object is, the darker it will be overall, and I've just discovered that if I use a system-standard bump pattern but a custom shininess texture, my whole object turns solid black. Just, black. All of it. The textures doesn't matter.)

Where is that fur pattern coming from? It's not in your texture.

Are you using any kind of shininess?

(Mathematically it's impossible for the emission mask to darken anything, since 0% means "display it normally" and anything higher makes it brighter. That fact plus the quirkiness of SL's advanced lighting combinations makes me suspect it's not the emission mask itself causing your issues.)

The fur pattern is on the texture itself as seen in this snippet here.

ZhbbQrc.png

There IS a spec map on the tail right now in-world, however I've tried using the emissive mask with and without the spec map and I get the exact same result either way. The first pictures shown in the thread were made both before I drew fur and before I added any kind of spec map, back when it was still a big WIP.

 

26 minutes ago, Wulfie Reanimator said:

I believe the reason why the tail is showing up with pitch-black stripes is because their actual alpha mask isn't working and it's being uploaded with the solid-black colors still in the texture. We haven't been shown what the texture looks like in-world. (as in, the diffuse itself before being applied)

k8otWDQ.png

4xnoAnZ.png

 

Pdssz0B.png

 

And this is how the layers look right now.

pzstnrA.png

???? I seriously can't tell if I'm doing something wrong or what.  x_x I've never really attempted emissive masks before because all of the explanations/tutorials just don't make sense to me so I dunno. It LOOKS right from what I've seen in visual tutorials but I don't get the result I want still, no matter how much I fiddle with it.

Edited by LilithServil
Link to comment
Share on other sites

2 hours ago, Wulfie Reanimator said:

With the textures you gave me to test with (p.s. thank you), what I said here is apparently accurate

Alrigth, now try to save the basecolor texture as png to desktop, and re-upload it. With alpha mode set to none, is the color preserved outside of the lights areas? 

This is where the problem sits, the OP seems to neglect the details I listed when they say they get same results with tga: it Needs to be saved as 32bit with alpha, and usually the softwares that support tga export have export options to set carefully. Because if the type is not set to 32 bit BUT alpha is exported, you get EXACTLY the same file type of a png, 24bit. The 2formats differ in this detail. 8 bit per channel but png doesn't have a dedicated alpha channel, tga does. Png handles alpha by marking the transparent pixels with no color data, as you can witness from the obliterated detail in your texture attempts. Tga retains that color data also in the transparent areas, as testified by Wulfie screenshots. 

Edited by OptimoMaximo
Link to comment
Share on other sites

2 hours ago, LilithServil said:

???? I seriously can't tell if I'm doing something wrong or what.  x_x

Here, I created a random texture.

  • On the left is the "base pattern" I want to be emissive. I drew it on its own layer which was transparent to begin with.
  • Then I disabled the black  layer (it was there only for clarity), added the background texture I actually "want" and set that background layer's opacity to 0.1.
  • Then I export it as PNG with default settings. (I'm not familiar at all with Gimp so I won't even pretend effort.)

It's also worth mentioning that setting the background layer to 0.0 opacity would result in all the transparent pixels appearing black, but I don't think that's a fault on SL's end, but rather because the color data is lost during the exporting.

686a7a089d.jpg

Settings: 

a399fb95fc.png

In-world, alpha blending against a black sky:

ea742464f3.png

Emissive mask with 50% glow to show it works:

cd3b090e51.png

Late edit: I now realize OP was talking about Paint Tool SAI, not Gimp...

Edited by Wulfie Reanimator
  • Like 1
Link to comment
Share on other sites

1 hour ago, LilithServil said:

I've tried doing that in SAI but it just erases the texture itself for whatever reason and leaves me with the same "most of the texture is gone and completely black" result. I don't know if SAI just handles masks super poorly or what.

That varies from program to program. Some programs, when you save to 32-bit w/alpha, will change all your 0% alpha pixels to black. They do this because A) large areas of solid color compress to a smaller file size, and B) the program assumes the alpha channel always means opacity and figures you don't need to save the color of completely transparent pixels since no one will see them. (Obviously, this messes things up if the alpha channel means something unusual like emission level.) Other programs might always retain transparent pixel colors. Some programs (like GIMP) let you do either. Unfortunately I'm not familiar with SAI in particular, but I can give you two general pointers:

1. Don't mask off non-glowing areas with pure 0 alpha. Use something very low but still positive, like 1 or 2 or 5. This should trick your program into retaining all image data without making those areas glow bright enough to notice.

2. If your masked-off areas are black when Emission Masking is on in SL but they show details & color when you're at Alpha: None, then your problem isn't blanked textures. If you really lost texture areas, they'd be black under all settings.

Edited by Quarrel Kukulcan
Link to comment
Share on other sites

1 hour ago, Wulfie Reanimator said:

added the background texture I actually "want" and set that background layer's opacity to 0.1.

And from your pic it looks like that it is black, not grey. With a background of, say, a landscape picture, does that work?

Link to comment
Share on other sites

1 hour ago, OptimoMaximo said:

And from your pic it looks like that it is black, not grey. With a background of, say, a landscape picture, does that work?

The black layer is disabled, it does not get saved with the picture. Doesn't the green-and-blue gradient count as a "landscape picture?" That layer is enabled, it's just 1% opacity. There's nothing there besides the red pattern. The left-side screenshot in my previous picture had the black background for clarity of what the pattern was. The right-side screenshot is the one I exported.

Here I've done the same process in Photoshop, making the sky emissive:

4ed3363c43.png

The mountains are 1% opacity, with the ones in the background increasing from 30%, 50%, 70%, to 100% for the main sky.

Again, I saved the images as PNG with the absolute default settings. (Yes, it's obviously a 32-bit PNG.)

811d57db4a.png

The point I'm trying to make here is -- don't paint the unwanted areas black or white.. ignore the color and make them transparent.

Same in Paint Tool SAI finally, it even specifically asks which type of PNG to save:

b63d0f0f3a.png

Although it looks like the background is solid white -- it isn't. It's trasparent except for the glowy bits, and the background is 1% opaque.

5398ef603f.png

Though, curiously the wall looks nothing like the original texture I used. It looks extremely harshly saturated, the color levels are all over the place. I think we're onto something now. Merging the two layers before saving didn't help at all, so this might actually be a problem with SAI rather than anything @LilithServil could've messed up.

Edited by Wulfie Reanimator
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1377 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...