How to Create Light Refraction through Thick Windows

i used translator

Hello, community.

I have reviewed many samples and experimented with various codes, but I have not made any progress, so I am seeking help.

This is my goal (designed in Blender).

  1. The central object should have a glass-like material that refracts the elements behind it (the current problem).
  2. The central object should rotate, but its shape should remain recognizable regardless of the angle.

I am currently in the testing phase to achieve the first goal.

Inside the checkered sphere is an object that is supposed to refract light like glass, affecting the objects behind it. Below is the method I found for object refraction.

const mainMaterial = new StandardMaterial("main", scene);
mainSphere.material = mainMaterial;
const probe = new ReflectionProbe("main", 512, scene);
mainMaterial.diffuseColor = new Color3(1, 0.5, 0.5);
mainMaterial.refractionTexture = probe.cubeTexture;

The objects that are completely separate show light refraction, but the objects within (overlapping?) do not show light refraction.

I have uploaded a video. (The video above is my work, the one below is a sample)
The sample also fails to show light refraction when the objects merge.

Do I need to implement a water-like material to achieve what I want? (A material where both internal and external elements are visible through refraction?)

Thank you in advance, community.

cc @PatrickRyan

1 Like

@XIYO, I’m going to make a suggestion here since you are already using Blender. Can you make use of the Khronos Transmission extension for the mesh your central mesh? If you set up the material as transmissive as outlined in the Blender manual the importer will set up the scene for you to handle transmission correctly.

If you need to create the material in the scene instead of importing through glTF, this thread may give you some insights. But I think the easiest way for you to do this would be to author your materials in Blender as transmissive and let our importer handle setting up the transmission for you.


Thank you for your response.

Since I am not familiar with the tool, it will take some time to apply it, but I will show you great results after applying it.

1 Like