Jump to content

Transparency fails no matter what I do?


CrashCrazE13
 Share

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

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

Recommended Posts

Hi, I'm fairly new to SL, but I'm assisting a client with their SL asset store (I'm a 3D game artist) and I am having an issue I've never had in any other engine or software:

No matter what format (32-bit albedo/color targa w/ alpha channel, PNG with transparent regions, all TGAs with alpha channel, etc) my meshes have no transparency. I've tried to find a solution anywhere from YouTube to any forum on the internet, but most commonly the issue is beginners not understanding alpha channels.

I use Autodesk Maya 2022 with Adobe Photoshop 2021. I have tried both Second Life Viewer and Firestorm build viewer 6.5.35 (Build > Upload > Mesh Model in both applications) and have the same issue. I've tried the asset in a game engine I'm more familiar with, Unity, and it works fine with alpha blending set to cutout. I do not see an option for alpha blending in the viewers. Aside from albedo with transparency, my other maps are a normal map, and a specular map. I have tried flattening images before exporting the TGA/PNG, but nothing was different. I tried having the 32-bit TGA albedo or the PNG albedo as the only texture associated with my mesh to see if specularity or normals were the issue, but nothing changed. I tried a simple cube  two ways, one a 32-bit TGA checkerboard pattern and the other a PNG, but both cubes were opaque in the viewers even though transparency was successful in Maya.

The predominant area with this issue is the fried egg white (black edges), but the tomato pulp should be semi-transparent as well.

Here is a Drive folder with images to help:

https://drive.google.com/drive/folders/1fGd-wsmtNOIWoKR2FFSizV9t8vbjZL5i?usp=sharing

 

Is there any solution? Has anyone had this issue?

 

Thank you in advance.

 

  • Like 1
Link to comment
Share on other sites

14 minutes ago, CrashCrazE13 said:

I do not see an option for alpha blending in the viewers.

If you have a 32 bit texture on your object, you will see the drop-down menu to select Alpha Blending or Alpha Masking on the Texture page in your viewer's editor:

28831a2a6c116a02d12948dee555ef1d.png Personally, I prefer to use TGA, but PNG will work just as well.  

Link to comment
Share on other sites

As @Rolig Loonand @Quarrel Kukulcan note this would seem to be confusion arising from unfamiliarity with the vagaries of SL. 

The shader that we use in the mesh upload preview is a very basic single pass shader that has no alpha support. Once uploaded and rezzed in-world then your problems should vanish.

Your have two ways to test this without incurring costs.

1) Use the beta/test grid Aditi (see here for how to connect there, https://wiki.secondlife.com/wiki/Preview_Grid) here you can upload anything without incurring real costs.

2) Use the local texture feature, this is more complex, but while the instructions to do it seem long-winded it is (I think) fairly obvious once you do it once.

Instructions for local textures. Upload the mesh asset, without textures, rez it inworld by dragging and droppping from your inventory, then right click it and select edit. From the dialogue box that appears, click the Texture tab and click the little thumbnail. in the texture picker You'll see a set of radio toggles Inventory/Local/Bake. Inventory shows the textures that you have paid to upload, Local shows the textures that you have imported locally for testing (nobody but you can see these). At first this is empty, pick "add" then find the texture on your hard drive and select it. That  texture will  now be listed on the right and can be clicked on to be applied to the mesh...phew. Now that you have this, every time you save/export that texture in Photoshop/Substance etc it will auto refresh inworld.

Note: these are local to you, anyone in world with you will not be able to see what you are working on.

The following gif shows the basic workflow up to the point of hitting 'add' for the local. Stupidly I picked an item with no transparency 🙂 . The gif is a bit sparse so the mp4 may be a little clearer https://i.gyazo.com/73e107ae9ca6b756d9716b2f7047a815.mp4

73e107ae9ca6b756d9716b2f7047a815.gif

Edited by Beq Janus
local textures...local mesh is in development.
  • Like 4
Link to comment
Share on other sites

19 hours ago, Rolig Loon said:

If you have a 32 bit texture on your object, you will see the drop-down menu to select Alpha Blending or Alpha Masking on the Texture page in your viewer's editor:

28831a2a6c116a02d12948dee555ef1d.png Personally, I prefer to use TGA, but PNG will work just as well.  

Why? I only use TGA if I have to, as the file is 4 x the size as png.

Also, I think we all need a definitive definition for SL regarding Alpha Blend vs Alpha Mask, since some of us see an alpha mask as having a BLACK background that will be clipped out by a program/engine, yet it doesn't seem to happen in SL, and alpha blending would be when needed partial transparency... Sorry, I've been working in different engines kinda overloaded lately with different uses of what were quite simple when not switching between proprietary engines all the time...

Images speak louder than words, would love to see more accurate content on SL Wikis on textures, formats, etc.

Edited by Codex Alpha
  • Haha 1
Link to comment
Share on other sites

28 minutes ago, Codex Alpha said:

I think we all need a definitive definition for SL regarding Alpha Blend vs Alpha Mask, since some of us see an alpha mask as having a BLACK background that will be clipped out by a program/engine, yet it doesn't seem to happen in SL, and alpha blending would be when needed partial transparency...

Yup, that's the way alpha masking and alpha blending work. As long as the mask is black and is in the alpha channel, it works.  And yes, if you want partial transparency, you want alpha blending.

As I said, my personal preference is for TGA, mostly because that's what I started using years and years ago and I am too lazy to change. ;) 

  • Like 2
Link to comment
Share on other sites

1 minute ago, Rolig Loon said:

Yup, that's the way alpha masking and alpha blending work. As long as the mask is black and is in the alpha channel, it works.  And yes, if you want partial transparency, you want alpha blending.

As I said, my personal preference is for TGA, mostly because that's what I started using years and years ago and I am too lazy to change. ;) 

OK good. I use TGA for all alphas, because even if I hear people can do it with PNG, I still haven't got it to work. So any image needing alpha, or the emission mask is in TGA. Photoshop seems to discard any of those alpha channels (not a 100% transparent level of course) and there is a convoluted way to do it, but ends up being like the TGA so I just use TGA :D

  • Like 1
Link to comment
Share on other sites

20 hours ago, Rolig Loon said:

If you have a 32 bit texture on your object, you will see the drop-down menu to select Alpha Blending or Alpha Masking on the Texture page in your viewer's editor:

28831a2a6c116a02d12948dee555ef1d.png Personally, I prefer to use TGA, but PNG will work just as well.  

I must not have the right menu. I can't get objects to upload because I don't have $L 

 

Can I not just see my mesh for free? I don't have any sort of edit menu. I only have Build > Upload > Mesh available

Link to comment
Share on other sites

15 hours ago, Beq Janus said:

As @Rolig Loonand @Quarrel Kukulcan note this would seem to be confusion arising from unfamiliarity with the vagaries of SL. 

The shader that we use in the mesh upload preview is a very basic single pass shader that has no alpha support. Once uploaded and rezzed in-world then your problems should vanish.

Your have two ways to test this without incurring costs.

1) Use the beta/test grid Aditi (see here for how to connect there, https://wiki.secondlife.com/wiki/Preview_Grid) here you can upload anything without incurring real costs.

2) Use the local texture feature, this is more complex, but while the instructions to do it seem long-winded it is (I think) fairly obvious once you do it once.

Instructions for local textures. Upload the mesh asset, without textures, rez it inworld by dragging and droppping from your inventory, then right click it and select edit. From the dialogue box that appears, click the Texture tab and click the little thumbnail. in the texture picker You'll see a set of radio toggles Inventory/Local/Bake. Inventory shows the textures that you have paid to upload, Local shows the textures that you have imported locally for testing (nobody but you can see these). At first this is empty, pick "add" then find the texture on your hard drive and select it. That  texture will  now be listed on the right and can be clicked on to be applied to the mesh...phew. Now that you have this, every time you save/export that texture in Photoshop/Substance etc it will auto refresh inworld.

Note: these are local to you, anyone in world with you will not be able to see what you are working on.

The following gif shows the basic workflow up to the point of hitting 'add' for the local. Stupidly I picked an item with no transparency 🙂 . The gif is a bit sparse so the mp4 may be a little clearer https://i.gyazo.com/73e107ae9ca6b756d9716b2f7047a815.mp4

73e107ae9ca6b756d9716b2f7047a815.gif

I think I need to request a ticket to use Aditi in Second Life, right?

Also I can't get to any texture options. As I just said in a response to Rolig Loon, I can't upload because I have no $L. Can I not load a mesh into my own account for free? My client has not informed me of any of this.

Link to comment
Share on other sites

18 hours ago, Quarrel Kukulcan said:

I notice your SL screenshots are both of the upload panel. Dumb question: do you still have the problem after uploading? Changing the alpha mode to blending or masking can only be done after you've uploaded and rezzed, in SL's object edit & build panel. (That's what @Rolig Loon's shot is from.)

That is a good point. I can't upload because I have no $L. I'm not supposed to be the one uploading anyway; my client is supposed to be doing that. But they want me to figure it out. Can I upload the mesh into my own account somehow?

Link to comment
Share on other sites

4 minutes ago, CrashCrazE13 said:

I must not have the right menu.

Right.  As Quarrel and Beq both said, the menu for setting you alpha options is in the edit tool in your viewer, and it only works if you are editing an object in world.  So yes, you have to upload the mesh first.

6 minutes ago, CrashCrazE13 said:

Can I not just see my mesh for free?

Only on the Aditi test grid.  And yes, you have to submit a support case to request access.

4 minutes ago, CrashCrazE13 said:

I can't upload because I have no $L.

So buy some.  That's how most people get L$.  Once you sell things in world and are paid in L$, of course, you have that source as well.

6 minutes ago, CrashCrazE13 said:

Can I upload the mesh into my own account somehow?

Yes, that's how it works. Whenever you upload an asset (mesh, texture, sound, animation ..) it appears in the inventory of your account.

  • Like 1
Link to comment
Share on other sites

2 hours ago, CrashCrazE13 said:

I think I need to request a ticket to use Aditi in Second Life, right?

Probably. Instructions are on the page at https://wiki.secondlife.com/wiki/Preview_Grid. You get something like 15,000 fake Lindens there that only work on that server, so you can fully upload and test things there. (Local textures let you test textures on the main grid for free but not objects.)

In either case, though, you'll have to pay real Lindens in the end to upload your final objects and textures to the main grid. You can't transfer things from Preview to Main.

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

17 hours ago, Codex Alpha said:

Why? I only use TGA if I have to, as the file is 4 x the size as png.

File size doesn't matter at all, it'll become the exact same JPEG2000 file on SL's asset servers in the end. Just use 24-bit png/tga/bmp(!) if no transparency is required, 32-bit png/tga if it is. 

17 hours ago, Codex Alpha said:

OK good. I use TGA for all alphas, because even if I hear people can do it with PNG, I still haven't got it to work. So any image needing alpha, or the emission mask is in TGA. Photoshop seems to discard any of those alpha channels (not a 100% transparent level of course) and there is a convoluted way to do it, but ends up being like the TGA so I just use TGA

This is caused by overzealous optimization, which Photoshop (among other programs) seems to be really good at. They see a transparent pixel, let's say RGBA 255, 0, 0, 0. Now this is clearly excess info that makes the file compress worse, right? It has 0 alpha, it's transparent, no one can see it! So it removes all the color info and all transparent pixels become 0, 0, 0, 0 (or something else) that compresses much more nicely. Except now it has destroyed crucial information SL (and many other game engines) might like to have, at least for proper blending, and in the case of using emission masks it's absolutely required info.

I have no idea how to prevent Photoshop from doing it but it probably can; I think Gimp has a checkbox on save to tell it not to do it; Paint.net won't do it in any case if you use a 32-bit format and Paint Shop Pro has absolutely no way to not mangle the alpha channel (spent hours trying to help a friend who insists on using PSP in a futile attempt to fix that).

  • Like 3
Link to comment
Share on other sites

19 hours ago, Codex Alpha said:

Photoshop seems to discard any of those alpha channels

Yup, Photoshop's PNG implementation is limited and doesn't take the alpha channel into consideration like TGA, and you lose color data for fully tansparent pixels.

Edit: Exactly what Frionil said.

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

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