Jump to content

I want to make the alpha masking texture that never loses shape


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

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

Recommended Posts

Hello,

I have a problem with the alpha masking textures I made.
I noticed that the alpha masking texture lost its original clear shape when the camera is far a little from the object which the texture is put on. But I have seen some alpha masking textures that never break in other creator's items. I usually use photoshop to make my textures but is there a knack in doing it?

I am sorry my bad english, but what should I do to make an alpha masking texture that doesn't lose its shape even if I put the camera farther away?

Link to comment
Share on other sites

  • 2 weeks later...

I've been waiting for somebody else to reply to this thread since I don't really feel I know enough about this myself. But sinde nobody else has answered, here we go.

What happens is that when textures are viewed at a distance, the pixels are merged into fewer ones. That of course affects their alpha values and you may end up with more fewer transparent pixels than you want. You can usually adjust this with the mask cutoff. Try to find a good compromise between what looks good up clsoe and what looks good at a distance.

I'm not sure, but I believe that textures that are sharply masked to begin with are less prone to "blockiness". When you edit in  Photoshop, try to switch antialiasing off and set the Hardness (or whatever it is called in Photoshop - I use paint.net myself) to 100%.

  • Like 1
Link to comment
Share on other sites

On 4/24/2019 at 6:42 AM, ChinRey said:

I've been waiting for somebody else to reply to this thread since I don't really feel I know enough about this myself. But sinde nobody else has answered, here we go.

What happens is that when textures are viewed at a distance, the pixels are merged into fewer ones. That of course affects their alpha values and you may end up with more fewer transparent pixels than you want. You can usually adjust this with the mask cutoff. Try to find a good compromise between what looks good up clsoe and what looks good at a distance.

I'm not sure, but I believe that textures that are sharply masked to begin with are less prone to "blockiness". When you edit in  Photoshop, try to switch antialiasing off and set the Hardness (or whatever it is called in Photoshop - I use paint.net myself) to 100%.

 

Thank you so much for giving me the information! I had started to give up on getting some hint here... I'm really glad now.
Unfortunately today I don't have enough time to try your methods, but I will surely do it in a few days and update a comment whatever the results. I just wanted to thank you.

Link to comment
Share on other sites

I kept your points in my mind and tried a texture. I painted it with a pencil tool of antialiasing-off, https://gyazo.com/cb73289dcabd53c854d10be1da433d10
When I pasted it on a prim, it looked like an alpha masking texture with the Alpha blending state. (When the texture's antialiasing is off completely, it happens by any chance...?) So I decided to compare three alpha conditions.

On the light ground: https://gyazo.com/a64ff61eb07c6f97e391082d9b57e7dd

On the dark ground: https://gyazo.com/3f206e388bf10a357776015de9ec3ed7

Left: What I said above... although applied alpha blending mode,  looks like alpha masking
Center: Having blur effect a little, and alpha masking and cutoff 50 applied
Right: Having blur effect a little, and alpha blending applied

As a result, I felt the masking textures kept a lot more details than ever. The three objects have the same patterns except for the blur effect, but I noticed only the center object was darker when the camera was far away, it especially can see clearly on the light ground. I don't like this darkening change... but it seemed to match most to the dark ground. Anyway, the problem is that I cannot control this change. As a whole, I reached a conclusion that the antialiasing-off one in the left is the best out of those.
The result might be differ depending on the texture's design so I feel that I need to test with some other textures too, but this test gave me a great hope. Thank you very much for your help, ChinRey! :)

Link to comment
Share on other sites

5 hours ago, coquelicat said:

IWhen I pasted it on a prim, it looked like an alpha masking texture with the Alpha blending state. (When the texture's antialiasing is off completely, it happens by any chance...?)

Yes, what you actually do, is hardwire alpha masking to the texture itself. The idea is to give you full control over which pixels are transparent and which aren't. I've never really tested the theory myself so it's itneresting to hear it actually does seem to be an improvement.

I have no idea is it matters whether such a texture is alpha blended or masked in-world. Somebody who knows the viewer source code by heart would have to answer that.  Maybe we could try to page @Beq Janus and @OptimoMaximo?

 

5 hours ago, coquelicat said:

but I noticed only the center object was darker when the camera was far away, it especially can see clearly on the light ground. I don't like this darkening change... but it seemed to match most to the dark ground.

A usual, I forgot the most obvious factor: what color are the transparent pixels? You don't see that up clsoe but their color will affect the result when the texture is scaled down. Ideally you want the same color as the nearest opaque pixel. That 's not very practical of course but a single color matching the overall palette for the opaque parts (probably pale green in this case) can do wonders.

  • Like 1
Link to comment
Share on other sites

In fact, I had never paid attention to the background colors in the transparent, so didn't doubt its possibility... I already joined the layers to a smart object layer and couldn't check the original colors of the transparent pixels anymore,  (or there may be a way to check it but I have no idea...) but I found it when I changed the texture alpha mode off in sl.
Left: https://gyazo.com/e06b5c69542ec6e2ccbeced7a6b85311
Center: https://gyazo.com/c5a5ea2f7fa21453139db889204cfb2d
All the actions that I did to make the middle one, is really only adding the blur filter to the left one, so I don't know why it changed to black background... But anyway, I'm glad that I could get that information, thank you! It looks like I need to pay attention to the color of the masked area from now on.

  • Like 1
Link to comment
Share on other sites

On 4/29/2019 at 11:55 AM, ChinRey said:

I have no idea is it matters whether such a texture is alpha blended or masked in-world. Somebody who knows the viewer source code by heart would have to answer that.  Maybe we could try to page @Beq Janus and @OptimoMaximo?

sorry, late to this, I've been ignoring everything until the Fantasy Faire was done and my RL time debt at least partly paid back 🙂

Alpha masking has a lower overhead in rendering because a pixel is either transparent or not, there is no colour mixing to be done, it is a  simple stencil (effectively). highly recommended for all plants and grasses and frankly anything and everything you can get away with it on. Of course, it leaves a lot to be desired when you truly need blending.

As @ChinRey noted, the averaging that occurs when the viewer produces the lower resolution versions of the texture for use at distance will indeed result in artefacts and the best way to avoid that is to solid fill the alpha channel. The result will be a blocky looking texture in some cases, but in reality, that is a true reflection of how it will be rendered.

Of course, on the edges of the masked areas you still have this issue and thus an appropriate diffues colour there makes sense. for those I would strongly recommend the kind of practice employed for alpaha blending (and UV islands for that matter) which is to blur the diffuse out into the "dead space". A great guide to this that has served very well for many years is Robin Sojourner's guide to alpha masks, which uses a set of free plugins for photoshop. You can find it at the following link Alpha Channels with No White Halo the section of most interest is on page 2.

 

Edited by Beq Janus
added the last paragraph
  • Like 3
Link to comment
Share on other sites

People really shouldn't let jaggy alpha maps in the middle distance put them off using them.

They are significantly better performing in the viewer than blended alpha textures (as in almost free vs one of the most expensive)

If you want them to look better, take a breath, appreciate that they look as bad as they can ever look now, and motivate viewer devs to do magic with the rendering engine.

  • Like 3
Link to comment
Share on other sites

Thank you so much for your comment Beq Janus,

In this topic, I could finally understand what the 'alpha masking' is...

On 5/3/2019 at 3:37 AM, Beq Janus said:

Of course, on the edges of the masked areas you still have this issue and thus an appropriate diffues colour there makes sense. for those I would strongly recommend the kind of practice employed for alpaha blending (and UV islands for that matter) which is to blur the diffuse out into the "dead space". A great guide to this that has served very well for many years is Robin Sojourner's guide to alpha masks, which uses a set of free plugins for photoshop. You can find it at the following link Alpha Channels with No White Halo the section of most interest is on page 2.

I didn't know this wonderful tool has existed for many years... I tried the plug-in, and then it worked very well. Thank you for telling me! :)
I want to make someday a high quality alpha masking texture that I can feel beautiful as much as the alpha blending texture. 
Again, ChinRey and Beq Janus, I really appreciate all of your helpful information!

  • Like 1
Link to comment
Share on other sites

On 5/3/2019 at 7:49 AM, CoffeeDujour said:

People really shouldn't let jaggy alpha maps in the middle distance put them off using them.

They are significantly better performing in the viewer than blended alpha textures (as in almost free vs one of the most expensive)

If you want them to look better, take a breath, appreciate that they look as bad as they can ever look now, and motivate viewer devs to do magic with the rendering engine.

Indeed, I like the vibe of the blending textures, but the performance is largely low down when it's in the screen.

I'm not quite sure about the rendering engine, but if it's possible for the developers to increace its quality, I deeply hope to update in future as I love sl. I don't think LL easily move for it but anyway once I will request them to consider it. Thank you for your comment!

  • Like 1
Link to comment
Share on other sites

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