Make meshes solid when using location based opacity

I have a blue print that is being used to create a sphere mask on a material. The sphere mask makes wherever the blueprint sphere is translucent on whatever the material is applied to. However currently the translucency makes the inside of the object appear hollow. Is there a way to make it filled and appear as though the sphere has been cut out of the object?

Sure, you just need to figure out the normals of the sphere at each point on the surface.

The material function “SphereGradient-3D” will help you get started.

If you dive inside there, look for a commented node called “WorldPos Ray EXIT”. If you do that position minus the center of your virtual sphere, and then normalize that, that will give you normals for the inside of the sphere. That will get you pretty close at least. What that won’t do is properly have an exit hole for the sphere if the other side goes through the other side of the object. You’d have to figure out an additional solution in tandem for that but there’s no automatic way to have the ‘exit hole’ conform to the geometry on the other side. You could have the exit hole flat and specify its height/normal though.