Jump to content

Makeup, ALM, and more than 6 point lights: Will mesh baking fix?


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

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

Recommended Posts

Yeah, I'm woefully late to mesh heads, so this must be an ancient problem, but I'm trying to wrap my head around it.

Suppose you're wearing a makeup layer on your mesh head in a club with many point lights, such that you're within range of more than 6 of them. Your makeup looks strange and doesn't seem to be lit the way the rest of your face is. What's going on?

I tracked it down a bit -- again, probably old hat, but news to me -- and found a simple repro, no mesh involved. Here, in an ALM-enabled viewer, are six cyan boxes radiating* cyan light, and a yellow hemisphere radiating yellow light. Between these sources there's a blank-textured surface overlaid with an alpha "eye makeup" surface at 0% blended transparency.
59d8bb0352a13_litmakeup.png.18baf80377e859e1e4a4573ce037131a.png

Set transparency of that eye makeup surface to 1% and it looks like this:
59d8bb67d2198_darkmakeup.png.72a510adeba4f49bb8c17d9917b67dee.png

Turn off one of the cyan light sources (keeping that 1% blended transparency) and you're back to the first image...

... or select the yellow light source and, in the viewer where it's selected, you're back to the first image.

So two questions for the texturing experts:

  1. Is there a jira associated with this effect that I can Watch, or should I open one?
  2. Is this the kind of thing that the "mesh baking" project will solve? If so, will mesh head creators expose the process to end users, so it works like an applier? Presumably that would entail a scripting API to this baking process, right? (sorry, I haven't followed this project at all.)

Okay, maybe a third question: What do mesh head makeup creators do about this right now? I first encountered this in an elaborately lit club, where my homegrown eye makeup looked alternately awful in different locations, and then replicated it with demo commercial products, but maybe there's another common fix I'm missing.

___________
*All the light sources here can use projected light or not, it doesn't seem to matter. (Also, I see the same effect in Firestorm and the Linden viewer, so I think it's just how the rendering engine works now.)

Edited by Qie Niangao
Link to comment
Share on other sites

I can think of one thing to check on, and the Lindens didn't explain it clearly. A mesh or prim surface can use three textures, Diffuse, Normal, and Specular, each with an alpha map that does different things

I posted this a few months back, summarising what the alpha maps do. Using the alpha channels for the normal and specular maps could make the eye area non-reflective, while the rest of the surface has some texture and specular reflection. It doesn't need a huge texture map

 

  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

This is (apparently?) a known bug for alpha textures and point lighting.

Jira here : https://jira.secondlife.com/browse/BUG-5852

 

I've been trying to track this bug down for a while, since it can be both highlighting the alpha texture, as well as making it darker in comparison to the non-alpha texture underneath. Eventually i found i could replicate what was happening with projected lights, specifically at the edge of the light range. 

I thought for the longest it was an issue in the normals of the mesh head i was wearing, but alas, it was not. Here's a picture of what it can look like at it's extremes:

vnRLefj.jpg

 

To note: The two meshes (head and makeup layer) have no other textures applied than diffuse, one with alpha and one without. The directional light shows differently on the alpha vs non-alpha texture. I was thinking of making a jira clone, to highligt the new ways this bug shows up on daily basis, but i'm lazy and i don't think it would contribute much to fixing anything. Hopefully baked textures on mesh will minimize this. You can also see the hair is affected in this image, since it has an alpha texture.

 

More additions:

In the image above, i'm using only two point light sources. It makes it show a little clearer, but the effect is still there with one lightsource as well, you only need to move to "sweet spot" at the edge of where the light takes effect.

 

Also of what head makers are doing about this? Absolutely nothing, none i have spoken to are aware of the problem and i've been berated, muted and generally treated like an idiot by CSR. 

On the other hand, there's actually nothing they can do. It's a rendering bug, so the only way to "fix" this is if skinmakers took one giant step back and did all makeup baked onto the skins.

Edited by Lexbot Sinister
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

On 10/18/2017 at 10:52 AM, Lexbot Sinister said:

a known bug for alpha textures and point lighting.

Jira here : https://jira.secondlife.com/browse/BUG-5852

Aha! Yes, indeed that explains it all for me, or rather, another jira linked from that bug made it all click for me: I should have paid more attention to my own footnote "the light sources here can use projected light or not, it doesn't seem to matter" because that's exactly what's happening: blended alpha is always lit by old-timey point lights, and those old rules apply. Notably, no more than the six "nearest" point light sources (which I noticed) dependent on avatar position, not camera position (which I knew, but spaced-off), and some function of the lights' radius and fall-off.

So trying again, I found that I couldn't always reproduce my own bug, depending on where my avatar was standing at the time, even though I wasn't looking at my avatar at all. All makes sense now.

In my little demonstration, I was only seeing the effect of the six light limit but of course projected light can be very different from point light in many ways, any of which can end up starkly contrasting blended alpha and non-alpha surfaces. So it's very true of head- and makeup-creators: "there's actually nothing they can do. It's a rendering bug, so the only way to "fix" this is if skinmakers took one giant step back and did all makeup baked onto the skins."

And there's hope for that, in the "Bakes on Mesh" project -- which unfortunately seems to be getting scant attention per Inara Pey's most recent project update:

Quote

People are looking towards the bakes on mesh project; Vir re-stated that it is a major project in total, and currently the only aspect being tackled is getting the baking service to comfortably support 1024×0124 textures. Where the rest of the work required to support baking on to mesh bodies and items, etc., lies on the Second Life development roadmap and time frames is still TBD.

Meanwhile, I wouldn't invest in many makeup layers, or anything else that relies on the lighting of a blended alpha surface.

And those mesh and makeup creators would do well to encourage the Lab to push resources on this, as it's tablestakes for them, even if they haven't realized it yet.

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...

Just as Qie concluded, LL cannot fix this problem for us. At least not until they introduce baked textures for meshes.

The problem here is that the makeup in question is a blended alpha texture applied separate surface over your skin. Blended alpha does not play well in realtime 3D rendering engines. One issue is the well known "alpha sorting glitch" people mistakenly believe to be an SL problem, another issue is what is shown here, that blended alpha textures look very different under local lighting than surfaces using masked or no alpha. (You will also frequently see this lighting problem occurring on surfaces that use "fast masking", such as an unrigged mesh headwith a skin that has an unused alpha channel present. People need to not upload textures with unused alpha channels and yet we see this more and more frequently.)

 You see this on all blended alpha surfaces. This is why mesh head/body "neck blenders" and tattoos also often look lighter or darker than the skin they're supposed to be blending and on mesh bodyparts using blended alpha for the skin/nipples/etcetera. Possibly less noticeable than mismatched skin or makeup, but you also frequently see this in hair (check out the blended alpha portions of the hair in Lexbot's image, you see the same problem that's affecting the makeup) and clothing. By clothing I mean both mesh clothing using blended alpha, and mesh body clothing layers. For this reason I was hoping the "baked textures for mesh" project would include materials support, since it will not these rendering problems will persist for everything forced to use non-masked alpha textures. Since most bodies are no-mod (for no reason, I might add) and SL defaults applied textures to "blended" mode, this problem will persist for the majority of SL users.

Videogame developers avoid blended alpha like the plague because of these, and other, issues (blended alpha also takes a huge toll on performance, for example). However when player created mod content for popular modern videogames attempt to use blended alpha textures you see the exact same problems we experience with it in Second Life.

Edited by Penny Patton
  • Thanks 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2324 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...