Creation of rays passing through a 3D model

Hello! I am new to three.js, could you please help to create “passing through rays”.
Initially, the lines are just a cross (cross each other), as shown in screenshot 0.
When the model reaches the lines, the lines turn into curves which begin to go through the model.
At the moment, I have what is seen in screenshot 1. The model simply goes through the lines.
It is necessary to get flowing lines, as shown in screenshot 2 and 3.

How is this possible to do?

Just an option from the scratch, not the ultimate solution, with the using of .onBeforeCompile() on materials of the model:


You are the best!
Thank you very much!
Spent almost the whole week trying to implement this, thanks)

1 Like

You’re welcome :beers:
Glad, if it helps :slight_smile:

1 Like

I’ve updated the shader, so now it’s possible to use THREE.Plane() with any normal, not only with [0, 1, 0].


Oh my God
Cool! Thank you)