Semester 2, Week 05 Post - 62firelight/manimRT-490 GitHub Wiki
What's New
- Created test renders for the first two sections in the video
- Created a personal wishlist (which I could draw from for future additions to ManimRT)
- Identified issue with animating text in a 3D scene
Potential Quality of Life Features
After spending a bit of time on creating animations, I've created a list of things that would be nice to have in future versions of ManimRT.
These aren't intended to be added straight away, but they're more of a personal wishlist.
- Ensure camera can face towards a specific axis in a direction (e.g. face negative X axis instead of always facing positive Z axis)
- So I don't have to rotate the camera and re-render the image to test the rotation...
- Rotating the camera Mobject after it has been created still doesn't result in a "clean" rotation -- it gets shifted by a bit when rotated
- Add a method to quickly get a ray with a different length but with the same starting point and direction
- Adding a method to the RTPointLightSource to draw light rays (which could function similarly to shadow rays)
- Creating my own Mobject for the picture of the human eye rather than using the existing Mobject for images
- Blend two (or more) colours together to simulate a pixel that is created by tracing reflected ray(s)
Issue - Displaying Text in a 3D Scene
Animating text in a 3D scene can produce weird results, like in this example below:
self.play(FadeIn(unit_normal_text))
self.play(FadeIn(light_vector_text))
self.play(FadeIn(reflected_light_vector_text))
self.play(FadeIn(viewer_vector_text))
https://github.com/user-attachments/assets/6962c862-19fe-423a-8706-55b1ee89156e
However, this issue can be fixed by adding the text as a fixed orientation Mobject and then removing it, like in the example below:
self.add_fixed_orientation_mobjects(unit_normal_text)
self.add_fixed_orientation_mobjects(light_vector_text)
self.add_fixed_orientation_mobjects(reflected_light_vector_text)
self.add_fixed_orientation_mobjects(viewer_vector_text)
self.remove(unit_normal_text)
self.remove(light_vector_text)
self.remove(reflected_light_vector_text)
self.remove(viewer_vector_text)
self.play(FadeIn(unit_normal_text))
self.play(FadeIn(light_vector_text))
self.play(FadeIn(reflected_light_vector_text))
self.play(FadeIn(viewer_vector_text))
https://github.com/user-attachments/assets/882d864f-9a18-4402-8f44-3d67ca6ca5c9
This solution was adapted from https://www.reddit.com/r/manim/comments/lof0kq/how_to_combine_fixed_in_frame_objects_with/
This would mean that more code would have to be added to the animation to ensure that the text displayed correctly.
Maybe including a macro in an IDE could be a way to work around this?
Test Renders
I created low quality test renders for each section in the first educational video. I will eventually render them later at a higher quality (e.g. 1080p 60fps).
Parts of these will be edited together, but for now, here are the animations squished together. Assume that there is a black screen before each section of the video starts, and the objects on-screen will fade out at the end of each section.
There are some minor issues that I'll try to correct before rendering them at a higher quality.
What is ray tracing?
I could probably add labels for each object in the scene (e.g. Camera next to the camera when it appears) to make it easier to identify each object, though it could already be sufficient to just sync the addition of objects with my commentary?
https://github.com/user-attachments/assets/0e793fea-3b78-465f-88b7-90db174a01c7
Phong Illumination Model
The letters representing the unit vectors in the Phong model pop in quite suddenly, but I intend to edit them together during the video so that the letters fade in.
I'm also not sure why the Phong model shifts a bit to the right when it gets written. I'll look at resolving them before doing the high quality render.
Original
https://github.com/user-attachments/assets/fa5286d3-3626-478f-99bd-6e0ff3ec0ce3
Revised
https://github.com/user-attachments/assets/beff9b8b-cdbf-4af4-81ae-1d4e0f8f8d3c
Shadows, Reflections and Refraction
https://github.com/user-attachments/assets/9c273666-11a5-48a9-ae37-3ee044907cc5
Questions
- Would it be necessary to render the video in a higher quality? The test renders look readable enough, but I don't know if it'd be worth doing it in a higher quality.
- When should I do the high quality renders? I'm thinking of doing test renders and editing those together until I settle on something that looks good, then I can do a high quality render and simply just replace the low quality video files with the high quality ones.
- What quality would you recommend for rendering the educational video(s)? I'm thinking of 1080p 60fps for now.
- Should I add labels to the animation for "What is ray tracing?"
What's Next
- Polish test renders
- Edit test renders together into one video
- Write tutorial documentation
- Think about evaluation (could possibly happen end of August?)