JTracer - Now Normal
I was indeed registering the incorrect ray hit on the mesh, so all normals are being calculated correctly now, laying the groundwork for proper shading in the very near future...
seen from Germany

seen from Malaysia
seen from United States

seen from United States
seen from United States
seen from United States
seen from Thailand
seen from Malaysia

seen from Australia
seen from Germany
seen from United States
seen from China

seen from United States
seen from United States
seen from Serbia

seen from United States
seen from China
seen from United States

seen from United States
seen from Malaysia
JTracer - Now Normal
I was indeed registering the incorrect ray hit on the mesh, so all normals are being calculated correctly now, laying the groundwork for proper shading in the very near future...
JTracer - not Normal
This week saw the addition of calculating normals at a ray hit, basic super sampling for anti-aliasing and a bit of a rebuilt of internal functions.
I’m currently outputting my surface normal values for bug checking. The spheres calculate correctly (red = +X, green = +Y, blue = +Z). However the bunny is all sorts of wrong. I believe this to be an issue with the intersect function not returning the proper ray intersection or possibly and error in the winding order of the polygons. While I fought that for a bit without solving it, it shouldn’t be too difficult to track down.
While I was ignoring that problem I implemented very simple super sampling. I render double size and then scale down with very basic pixel averaging. I do hope to implement a true sampler later.
Here you can see a comparison of output, super sampled image on top, previous result on the bottom, both with blowup inserts:
Internally I did a bit of a re-build of data handling inside the trace functions. As I was working this week, I realized some efficiencies in my method and went ahead and rolled those in. At the moment it doesn’t affect much, but it should make some features easier to roll in during the weeks to come.
I also finally implemented timestamps on my output filenames thus saving every render I make as I go along, which results in some good images to show all my odd results along the way - though some of these are definitely more compelling than my current “good” result - ha!:
Once those normals are fully repaired, I’ll implement Phong shading and point lights.. till next time…
JTracer - Now with color
Baby steps. The ray tracer now properly supports camera position, aiming angle - that was incomplete last time. Additionally I’ve added color to the object definitions and depth sorting on the trace intersections so I’m only shading the closest point and getting proper object overlaps now.
Like I said, nothing major. Next up, phong shading and point lights.