Hello forum and graphic geeks ,
i just registered myself on this wonderful site where kind of everything is posted i am interested in (games, graphics, programming). So the christmas holidays are imminent and i am currently searching for some programming stuff i could learn in the free days off from work.
Because i am really into android programming currently and i also really love the idea of pathtracing (i did a lot of CGI with Blender and LuxRender) i thought about writing a simple pathtracer for mobile devices (it don't have to be fast! )
Sadly i am a complete math idiot. Some months ago i started the first project "Try to write a pathtracer". After reading documents for hours and trying to understand the math calculations behind the letters i gave up. So in the next weeks i hope i have enough endurance to go through this second try and finally understand it (maybe it helps me in the future).
Currently i am working with Android Studio and a Galaxy Note 2 with Android 4.4.3 (Cyanogenmod).
There will probably be a lot of questions and i hope you will answer them
So here are some points i already understood of programming a pathtracer:
1. I need an abstract class from which the basic objects inherit (such as a Sphere and a Plane). Every object has its own definitions (radius, center point, etc.) and its own "checkIntersect" function
2. I need different classes, such as a Vector3D and a Ray (which has a origion Vector3D and a direction Vector3D)
3. Then i have to loop through the pixels of the image and generate a ray. Now i will loop through all basic objects and check if the ray intersects with one of these objects
4. if an object is in front of the intersected one (no idea how i could check this?) i skip this ray
5. if the ray hits the object i have to calculate the reflection and the resulting color depending on the object color (i will start with just a diffuse material). From that i have to calculate a second reflection ray which will also travel through the scene (sadly no idea how to calculate that second ray
6. If a given MAX_BOUNCE is reached, the ray disappears
These are the rough points i have in my mind for the topic "pathtracing".
So any tips you may have for me? I really appreciate all your answers
I will try to keep the latest progress updated.