Semester 1, Week 06 Development - 62firelight/manimRT-490 GitHub Wiki
The following animation was developed with the same "wrapper" code used to develop the proof of concept in the previous post.
RayObjectIntersectionsSketch.mp4
A couple of obvious issues can be seen here. Namely, they are:
- As discussed in the previous post, the blue lines in the camera's NumberPlane component still overlap with the camera's Line components (along with the red and blue rays), causing the illusion of depth in the 3D scene to be lost. This lost depth is a fairly big problem, as it also makes it more difficult to see exactly where the rays shoot out of the camera's image plane.
- When the red ray shoots out of the camera at 0:08, it overlaps the green sphere (similar to the blue lines in the camera's NumberPlane component) for a moment before it settles and shows itself as actually intersecting the sphere.
Based on these results, it's reasonable to conclude that ManimRT should not continue to function as a wrapper over Manim. The limitations of this approach have been shown to be fairly obvious, and are likely to make ManimRT less effective at teaching ray-tracing. It seems like it would be difficult to work around those limitations, as they seem to be a result of hard-coded behaviour (e.g., the NumberPlane always behaves as if it was in 2D as it was not designed to be used as a standard Manim 3D mobject).
It would be preferable to actually have ManimRT integrate into Manim's source code, so that these issues can be addressed more easily. Therefore, further development on this version of ManimRT will be halted in favour of a new version that will aim to resolve these issues.
As discussed in the above section, the ManimRT wrapper prototype has done its job. It is a rough version of ManimRT that technically works, but has some major issues that can't be addressed easily without starting from scratch. I will halt development on this prototype (including the planned calculation of intersections) for now.
Now, I will develop a new version of ManimRT from scratch that will attempt to replicate the same functionality as the prototype while being more natively tied into Manim's internal code, but hopefully without these issues.
A bit of an awkward place for this, but I wanted to document this idea that's been floating around in my head. The camera could be remade as its own mobject that is descended from the Axes object, so then it would have its own coordinate frame (which will allow you to use the coords2point method for easy conversion to the camera's coordinate frame).
To further align this project with software development principles, I have defined requirements in the form of user stories. These user stories will follow the format of "As a <user role> I want <goal> so that <reason>." The user stories will replace the to-do list that was in my previous post and can be found in the spreadsheet linked here.
You can probably think of these wiki posts as something akin to a SCRUM meeting (or just a SCRUM) where key questions get asked (what's been done so far, what should be done in the future, what obstacles could prevent things from moving along, etc). I say SCRUM here as it's an agile software development methodology that I have used before in a couple of my past courses. It's a little awkward as it's team-based, but these analogies will work for now until I find a better alternative.
The "sprints" (periods where development of the software happens) can then roughly be defined as such (dates will come later):
- Sprint 1 - Ray-Object Intersections
- Sprint 2 - Lighting Computations and Shadows
- Sprint 3 - Reflections and Refractions
Below is a screenshot of the currently ongoing user stories. The key parts here are the user stories highlighted in yellow (what will be worked on from this post onwards) and the note next to the Priority heading (clarifying what High, Medium and Low means in this context). These user stories will be implemented differently to the wrapper prototype, and hopefully the new version of ManimRT will have at least these features by the end of this week.
Also see this note next to the "Story name" heading that clarifies the definition of user and developer in this context.
You can see these notes by hovering over the headings in the spreadsheet.
Finally, I still hope to add user stories for people watching videos (for example, "as a viewer, I want to watch a video depicting the intersection between a ray and a sphere in a scene."), but the priority for this is unclear at the moment. Perhaps these videos would be more useful if they came in the form of feature showcases for ManimRT.