Machine Learning – Is Image Raytracing Using Machine Learning Possible?

I start with a question.

Why does image of a glass ball on a surface look like it does?

To every complex question there is the network answer. It makes sense to a network.

So I will test if I can calculate a simple raytracing scenario using machine learning. The network looks as follows. The atoms are my weights with its parameters.

The idea is to put the output image as an internal layer just before the output layer neuron. The last output neuron is then a truth value.

For the truth I will have to test a little. But to simplify. All light from the emission input image should correspond to the value in the output neuron. Here I will test the sum( input pixel value energy ) = sum ( output image pixel value energy ). Here the internal image layer is bigger than the input image so the energy will have to be distributed. Another truth is that I got index of refraction for my object. So some of my parameter values are already given for my image layer in air and object as glass.

Further if I put a ”circular” layer around the raytracing network maybe I can use that as a similar truth calculation.

A truth calculation is just that you know the output for a given input. So all black input should give an all black or zero output.

From the last image of the spherical surrounding space layer. I guess that if the energy is to be distributed over an infinite amount of neurons. Then the energy on all neurons would get to zero amounts. Some equal split.

But the sum is to be equal to the input energy so here you get another truth maybe.

If there exist input energy above zero then the emission layer depending on the starting position. Some distance from the center point. Will have a distribution of that energy on the outer capture layer neurons. Like a ?normal distribution maybe.

Hmm if you place the object in the center point it could cause a problem. Equal distribution. So I wonder if you can take a second outer layer and generate some difference. Like two eyes are separated from each other. Here you got two separated outer capture layers at some random distance apart.