Jump to content

Objects behind partially transparent objects visible


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

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

Recommended Posts

Okay, a while ago I asked here in the forum how to make prims below 1cm, and became very helpful answers.

One thing I used very often was to make the outside of a hollowed prim transparent while texturing the inside, allowing me to make prims sized below 1cm.
This works very well, but some things look really odd.

When doing as described with a torus, then cutting the torus to insert another object on the side (in the hole), I the niserted object is visible through the textured inner surface of the torus.

In general I noticed that a torus hollowed and textured in the above described manner is always visible from the inside (from inside the hollowed part). What I would rather prefer is that the inner surface - which has a visible texture - is seen from the outside of it (like the viewpoint would be in the massive part of the torus instead in the hollowed out part of).

Not sure if it is understandable what I wrote, but maybe it sounds familiar to somebody. I will add a picture when I am at home on my computer and able to log in.

kind regards

 

Torus Hollow.jpg

 Torus hollowed out, inside textured, outside with transparebt texture

 

Torus Solid.jpg

Solid torus, textured

 

edited to remove spelling errors, inserted pictures

Link to comment
Share on other sites

I inserted two pictures to clarify what I mean.

@Chelsea:

The texture on the inside is .jpeg, although I don't know about the outside. It's a Torley texture called totally transparent.

The texture of the gem in the background is also a .jpeg, since it is a nano prim it has a transparent cube around it.

I am a noob when it comes to image processing, so I really have no clue about alpha layers and how the pictures are made/stored/whatever, but I have been told I am a fast learner.

I will gladly take up your offer to send you an IM inworld.

Link to comment
Share on other sites

Chelsea, it sounds like you've been misinformed on a few things.  Let's see if we can't clear it up. :)

 


Chelsea Malibu wrote:

First and foremost, I need to ask if the prims are textured.

I'm not sure what you mean by "if the prims are textured".  There's no such thing as an untextured prim.  All surfaces in SL have textures applied to them, no exceptions.

 


Chelsea Malibu wrote:

If so, are those textures a PNG, JPG or TGA.

You forgot BMP.

Anyway, you're listing the various source formats that SL can import, not the actual in-world textures themselves. When you upload a texture to SL, your local viewer makes a JPEG2000 copy of it, and it is that copy that gets uploaded to the SL servers for use in-world.  The actual source image never leaves your own hard drive.  All textures in-world are JPEG2000.

 


Chelsea Malibu wrote:

PNG and TGA inherently have alpha layers in them and even when they don't appear transparent, the behave like they are.

Absolutely not true. There are three incorrect items in this statement.

First of all, there's no such thing as an "alpha layer".  It's an alpha CHANNEL.  Layers and channels are entirely different things.  For some reason, which I haven't been able to figure out in nearly eight years of trying, people on this forum insist on using the two words interchangeably.  I have no idea how this started, or why it continues. I've never seen anyone completely ignore the definitions of words anywhere else in this way, just here.

On the old old forums, I had written a number of guides, some of which were stickied at the top.  One such post was an explanation of the difference between layers and channels.  If you'd like to read it, follow this link.  I would recommend it.

Second, TGA and PNG are both incapable of containing layers. They are flat image formats.  So, even if there were such a thing as an "alpha layer" (which, I repeat, there isn't), it would be impossible for a TGA or a PNG to utilize it.

Third, assuming we are indeed talking about alpha channels, it's not accurate to say PNG and TGA files inherently have them.  Both formats can be saved with or without them.  An alpha channel can only come into being if the user creates it, and it can only be saved in a file if the user includes it in the save.  Alpha channels don't just spontaneously generate on their own. 

Now, if a user inadvertently includes transparency data by mistake when he or she saves the file, then the ill effect you're talking about can happen.  But that's user error.  It's got nothing to do with any inherent property of either of those two file formats.

 


Chelsea Malibu wrote:

When you put one if front of the other, you often get what many refer to as Alpha Bleed which makes it look weird.

More properly, it's called alpha sorting, or more specifically, the alpha sorting glitch.  Yours would be the first reference to it as "alpha bleed" that I've encountered. 

Here's where the term comes from.  The process by which the computer determines the order in which to draw various scene elements is called "sorting".  Since the behavior in question has to do specifically with the sorting of images that contain alpha channels, we call it "alpha sorting".

There's actually nothing weird about it, once you understand what you're looking at.  It happens in just about every single real-time 3D simulation there is, from freebies like SL to commercial video games to professional 3D modeling platforms that cost thousands of dollars.  Let me explain how it works.

When two or more surfaces (8-bit) alpha channels for overlap, the renderer can't always know the correct order in which to sort them for drawing.  This is because computers don't define concepts such as "in front" and "in back" the same way human observers do.  The computer has only a very finite set of mathematical principles from which to define its world. 

One of those principles states that when the center of Object A is physically closer to the camera than the center of Object B, then Object A must be "in front" of Object B.

In the real world, there are countless scenarios in which Object A's center might be closer to you, even though Object B is actually the one in front. For example, say you're sitting at a glass kitchen table, and across the table from you is a clear plastic cup.  Since the cup is near the far edge of the table, the table's center is closer to you than the cup's center. Since you're human, and not a computer, you don't make your decisions based on center points, and you know full well that the cup is in front of the table's far edge, even though it's further away from you than most other parts of the table.

The computer wouldn't see it that way, though.  To the computer, the table is in front of the cup, and that's that.  When the frame is drawn, the cup will be drawn first, and the table will be drawn second.  The cup will appear as if its behind or under the table instead of on top of it.  Until you move the camera to location where the cups center is closer than the table's center, things will continue to look wrong.

Again, this phenomenon is present in every real-time 3D simulation.  The main reason you don't see it in games is because professional game artists are well aware of it, and go to pains to design around it.  We just don't overlap surfaces that have 8-bit alpha maps in their transparency channels.  If that means certain scene designs can't be made, we simply don't make them.  The reason you see it in SL so often is primarily because most SL content is made by amateurs who simply don't know what not to do.

Another principle states that if the centers of Object A and Object B are both equidistant from the camera, then whichever object is most directly facing the camera is "in front".   Game artists take advantage of this one all the time for creating things like trees, fire, chandeliers, and other objects that can be expressed far more efficiently with textures than with full geometry.  SL artists do the same.

There are other principles involved as well, but those are the two main ones.  The behavior is all perfectly predictable, once the why's behind it are understood.

 

That said, from what the OP described, alpha sorting does not seem to be the problem in question in the first place.

 


Chelsea Malibu wrote:

Try to remove the textures completely.  You do this by selecting Texture then click the Blank button.  This will render it white with no texture and no alpha layer.

That's not enirely accurate.  Yes it will be white, but that's not because there's no texture on it.  It's just got a white texture on it.  The name of that texture just happens to be "Blank".  It's a 32x32 pixel image, if you're curious.

You're correct that there's no alpha channel in the Blank texture.  (You're also correct that there's no alpha layer, because there's no such thing as an alpha layer. :) )

 


Chelsea Malibu wrote:

If that works, then you know the texture you are using is not a JPG.  You can take the texture (if its full perm) and save it to your PC, open it in a graphics program (even paint will work) and save it as a JPG.

JPG should really never be used at all for texturing.  It's a lossy, low quality format, a relic from the days when hard drives were so small that file size was infinitely more important than image quality.  Nowadays, the only places it continues to be of good use are in cheap digital cameras that can't do RAW, and on the Web.  The Web, after all, is really the only place left where the quality of the content isn't nearly as important as how quickly it can be delivered to you.

SL's implementation of JPEG2000 is lossy for nearly all images.  So, when you upload a JPG, you lose quality twice.  It's basically the "copy of a copy" effect.  The results aren't always pretty.

For best results with texturing, always use a lossless source format.  BMP, TGA, and PNG are all lossless.

If you're worried about accidental inclusion of an alpha channel, use BMP.  That format doesn't support alpha channels.

 

 

  • Like 2
Link to comment
Share on other sites


MasoDevotina wrote:

 

In general I noticed that a torus hollowed and textured in the above described manner is always visible from the inside (from inside the hollowed part).

Yes, this is how it's supposed to work.  When you hollow an object, the surface of the hollow faces inward, not outward.  If it faced outward, you wouldn't be able to see it under usual circumstances.

 


MasoDevotina wrote:

What I would rather prefer is that the inner surface - which has a visible texture - is seen from the outside of it (like the viewpoint would be in the massive part of the torus instead in the hollowed out part of).

That would defeat the purpose of what hollows are for.  In RL, if you bored out the inside of an object, you would expect to be able to see the inner surface from the inside, right?  That's the logic that applies here.

 

A piece of additonal logic that does not come in from RL, but is unique to the computing world, is that light only reflects in one direction off of a surface.  So, all surfaces in SL are invisible when viewed from behind.  In computing terms, it's called "back-face culling". 

This is why you can't see the outside of the holow.  Tthe back-faces of the hollow surface face outward toward the exterior of the object.  So, from the outside, those faces are always invisible.  The front-faces of the hollow surface face the object's interior, which is why they're all visible when you move your camera inside the hollow space.

The direction in which light reflects off a surface is called a "normal".  To make the back-faces visible, and the front-faces invisible, you'd have to reverse the normals.  That's not a feature that is offered for SL prims.  For that, you need to make a mesh model in an external modeling program like Blender, Maya, 3DS Max, etc., reverse the normals there, and then upload the model to SL.

If you're wondering why it is that surfaces are only visible from one direction instead of both directions, the answer is entirely related to rendering speed.  This is how nearly all real-time 3D simulations work, including every video game in the world.  Double-sided polygon rendering drastically slows down the speed at which any renderer can operate.  If SL had it, your FPS would drop like a stone.

 

If your intent is to make some sort of very small jewl-studded ring, you're not going to be able to do it with the method you've chosen.  I'd suggest you do it with a mesh model, or a sculpty.

 

Link to comment
Share on other sites

An alternative method to create a small ring that might work?  Rez a torus, hollow it to 95%, then use profile cut (not path cut) to carve away the unwanted portion of the prim.

ETA: I meant this as a replay to the OP.  Thought the reply to button at the very top would reply to the OP, seems it replies to last post.

Link to comment
Share on other sites

Still waiting for you to post a link to your work in world.  I disagree with most of what you say in practical application though your technical knowledge is impressive.  I would like to see your work where I can compare to mine with my clearly off-track technical knowledge to see what in fact looks the best however, I really don't think you are up for that challenge.

Link to comment
Share on other sites


Chelsea Malibu wrote:

Still waiting for you to post a link to your work in world.  I disagree with most of what you say in practical application though your technical knowledge is impressive.  I would like to see your work where I can compare to mine with my clearly off-track technical knowledge to see what in fact looks the best however, I really don't think you are up for that challenge.

Why the hostility, Cheslea?  Where's this need to compare your work with my own coming from?

The technical facts don't become any more or less true, based on who makes the coolest stuff.  As a great man once famously said, facts are stubborn things.  They are what they are, and they are indisputable.

Look, all that happened here was you were unfortunately misinformed on some technical points, and I volunteered a not inconsiderable portion of my time to try to help you out.  Why you seem to want to turn that into some kind of "challenge" now is beyond me.

As for my in-world store, if I had one, I'd be happy to steer you there.  But I don't.  I don't sell off-the-shelf products in SL.  I only do professional 3D work for clients who can afford me, for SL and for other platforms. 

I have no desire to sit here and toot my own horn for you.  Since, for some reason I'll never understand, you seem to require some kind of indication that I'm a big-shot or something before you'll just accept the technical facts for what they are, let's just say I've been doing this for a living for more than a couple of days now, and leave it at that.  If that's not good enough for you, I'm sorry, but I have neither the time nor the desire to step into a "who's work looks better than whose" game.  If you want to interpret that as my being "not up to the challenge", go right ahead. 

Either way, I hope you'll still accept the information.  At the very least, I'd ask that you kindly refrain from spreading incorrect information, now that you know it was indeed incorrect, even if your only admission of such has to be stubbornly sarcastic, again for reasons I can't pretend to understand.

I'm not here to critique your work, or tell you where you should have turned left instead of right in your creative process.  My only purpose, as far as these forums go, is just to make sure the correct information is out there, and available to all.

Take that as you will.

 

 

 

 

Oh, and by the way, just so you know, you'd do well to wait just a wee bit longer than two hours and three minutes, before you announce you're "still waiting" for a reply.  Responses on forums can take days.  If you're looking for real-time conversation, I'd suggest you talk to people in-world, or jump on an IRC channel or something.  Forum communication is inherently slow.

Link to comment
Share on other sites

Thank you both for your answers, now I got an explanation why it is like it is. I started to twist prims to make them small because I never used any 3D program, and even if it would be interesting learning to use a program like Blender it defeats my primary purpose of heaving fun inworld. Not to mention that it takes some time which I can spend learning other things which make my living in RL easier and help me make my living much more than learning 3D designing (maybe that changes somewhen, and then I will learn it).

I solved my problem now by tweaking a torus in a different way and it turned out that I can make it even smaller than by simply hollowing it.

 

Thank you both for your answers :)

 

Edit: removed spelling errors

Link to comment
Share on other sites

Looking at the picture, you are after a very small cylinder. If you aren't, just ignore this post. I'd advice to use a ring instead of a torus. Not only will the result be a real cylinder shape, it will have a fraction of the rendering cost. As far as I can think of without starting up the viewer, all deformations work the same as for a torus. ( to make it very small, hollow it and cut path, you can make 0.25 mm thin cylinders I think , with a point at one end though)

I'm not a big fan of these micro prims, but that's off topic and rather irrelevant here:)

Link to comment
Share on other sites

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