Objects dissappearing

Hi

I’ve noticed some strange dissapearing of some of my objects. I don’t know what it is, but it might be related to me fading out/hiding the cover of the machine. See how the grid is still visible and the silhuette of the hidden mesh is sometimes visible as a white ghost aswell?

https://dl.dropboxusercontent.com/u/114792/ShareX/2016/12/2016-12-05_10-33-19.gif

Have a look at the grid and some of those metal connectors disappearing completely in some angles.

https://dl.dropboxusercontent.com/u/114792/ShareX/2016/12/2016-12-05_10-29-18.gif

Anyone have a clue?

Please have a go here:

1 Like

Looks like a draw order issue with multiple materials with alpha? The grill is still rendered as though the casing is still ‘visible’

Just spoke to @will and he says to fix it, when the case has completely faded out, disable it. Even though the case is completely alpha-ed, it is still being rendered to the depth buffer which causes this issue with other alpha-ed materials.

Thanks, that did the trick!

But what else is strange, when hiding the canopy, some meshes in it share a material with other meshes that are not supposed to be hidden. Somehow, those objects are still affected by my opacity changes:

What I’m saying is that I’m using the setParameter directly on the meshes and not the materials as described, but somehow, the materials on that mesh that are applied elsewhere are also affected.


            this.meshes[i].setParameter('material_opacity', opacity);

Look at the stainless steel elements on the interior components here how they’re affected. There is one mesh in the canopy which also has the stainless steel applied.

It is alpha sorting problem you have here.

Alpha blended entities will be sorted based on Z distance of their AABB to camera. It is not reliable way to sort, as it does not takes complexity of geometry in account. But alpha sorting is generally tough question out there.

So one way is to give developer a control over it, and there is few ways.

For example with blue circles you simply want to disable depth test all together. So they always drawn on top of everything else.

With different parts, you need to change drawOrder on meshes, so you could say what order they should be drawn. In most cases that is enough to control it. Make sure camera orientation and order will provide desirable results.
Other thing, is to do more mesh splitting, to clearly separate meshes of different walls for example. So their bounding boxes are more relevant to actually their location so sorting can be better here.

Then with geometry that shall not be sorted, do make sure you disable blending. Only blended geometry will be conflicting with other blended geometry. So in this case clearly your bolts shall not have any blending on them, as they don’t fade.
If you do need to fade, then simply switch the right blending, fade, and then hide or switch back to none blended.

2 Likes

How does an artist disable blending?