DepthOfField visual bugs

The problem

The new DepthOfField creates problems when putting UI Elements on transparent objects, Note that these UI elements shouldn’t be transparent as their transparency = 0. The visual glitch happens upon approaching the objects. This problem only occurs on parts that have >0 transparency. DepthOfField also makes objects with >0 reflectance have strange reflections.


Strange reflections on objects that have >0 reflectance.


Decals become transparent when approaching.



The selected parts (red) are not transparent.

Reproducing the issue

  1. Create a big wall that has >0 transparency.
  2. Add a Decal onto the wall with transparency = 0.
  3. Create a part with >0 reflectance
  4. Add Depth Of Field to game.Lighting
  5. Run the game and look at the wall with the decal while walking towards and away from it

You should see the decal going slightly transparent, and might see strange reflections on the >0 reflectance part.

Expected Behavior:
I expected DepthOfField to not affect decals and make them go transparent. I also didnt expect it to create strange reflections.

Actual Behavior:
They go transparent, and DepthOfField creates strange reflections.

Currently theres no workaround.

5 Likes

Hello, we’d like to look into this issue. Can you please upload a repro file? If you do not wish to post it publicly, please sent it via DM to me. Thanks!

3 Likes

lighting bugs.rbxl (64.0 KB)
This place consists of an exact replica of our project’s lighting, as well as all the problems laid out on a baseplate

1 Like

Update on the weird part reflections

It reflects parts in the workspace at complete random, is what it looks like at least:
https://gyazo.com/17b5eb13d2f1847b58055c71494de60f

In this GIF, you can see the reflections change as I move my camera around.

1 Like

Thank you for the additional info! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

2 Likes

These reflections are from the new Dynamic Indoor Environment Map beta. Just to be 100% sure, I’ve turned the beta feature off and did not see any of these reflections.

Also, looking at your test place shows that you’ve got signs up that make it seem like Glass making objects appear invisible is a bug - it’s actually been known since it was added:

Warning: Non-opaque Objects - Non-opaque objects are currently not visible through glass. This includes, but is not limited to, transparent parts, decals on transparent parts, particles, and world-space gui objects. This behavior matches the refraction on high quality smooth terrain water. This was implemented so refraction wouldn’t have a large performance impact. This behavior may change. We do not recommend relying on this behavior for gameplay.

I do see some odd Z-indexing behavior in your test place, but I fail to see a relation. I also see some odd behavior in which DepthOfField causes some things to appear lighter and darker as you move towards them in your test place.

ForceFields at 0 transparency aren’t opaque - they always appear slightly transparent unless a negative transparency value is passed.

Beta on:


Beta off:

There obviously are some lighting bugs that are apparent in your test place, but I believe some of these are not related to DepthOfField.

1 Like

Sorry if we didn’t clarify, but we originally made the post when we found this bug, which we confirmed to be related to DepthOfField. Everything else just fell under the ‘lighting bug’ category, so we added it here instead of creating a new topic :slight_smile:

2 Likes