How to prevent overlap with Transparent parts?

image
This is a lens object in my game. A sine based sequence of parts with 1 variable: depth

Problem is these render intersections between the parts in the sequence. Note that I cannot use union as it’s a light simulation and raycast’s normal and the glass part’s orientation is a needed property for the simulation.

Are there any other methods to prevent this issue without using unions?

1 Like

If you use a meshpart that does not have faces on the sides touching the other parts, it solves the issue.

image

On the right side, you can see regular parts, and it has the overlap. On the left, I used a meshpart, which looks like this in blender:

image

In order to prevent having a weird effect and seeing the inside, the normals face outwards. I am not sure if you are familiar with how that works, but essentially faces are one-sided, and are invisible from certain angles.

image

The blue is what you would see from the same angle in roblox (or with backface culling enabled in blender), and the red will be transparent, as shown below

image

Here is a .rbxm of the mesh I created, hopefully this helps!

4 sided cube.rbxm (3.0 KB)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.