Skip to content

anshmendiratta/mamino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

273 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mamino Banner

mamino

A manim inspired 3D renderer that supports coordinate based object animation in Odin.

Table of Contents

  1. Why?
  2. Dependencies
  3. Usage
  4. Features/Goals
  5. For Maintainers

Why?

To explore and learn both Odin and 3D rendering and coordinate animation techniques (like those employed by manim) more deeply.

This project may be rewritten in Vulkan in the future if deemed necesssary.

Dependencies

freetype is imported from the shared/ directory -- this is located in ODIN_ROOT (to find out where this is, you can use odin root). Place your files inside the freetype/ directory after creating it, and things should just work. For this project, we used odin-freetype.

imgui is imported from the shared/ directory. Odin has imgui binds in progress, but for the time being, we've used the ones generated using https://gitlab.com/L-4/odin-imgui. Place the base imgui files in dear_imgui inside shared/ and create subfolders gl/ and glfw/ for the library specific imgui files. Don't forget to move your OS's static libraries too (such as imgui_linux_x64.a).

Example structure:

shared/
 dear_imgui/
    imgui.odin
    imconfig.odin
    imgui_internal.odin
    impl_enabled.odin
    imgui_linux_x64.a

    gl/
      imgui_impl_opengl3.odin    

    glfw/
      imgui_impl_glfw.odin

Of course, you may choose to edit the source of this library to match the structure of your shared/.

Usage

Add the project files to Odin's shared or otherwise a place to import the library from. Next, fill in the blanks and guess a way to use this library. Finally, execute odin run with no additional flags.

Features/Goals

Most important

  • Render vertices as points (respecting z-index).
  • Render cubes using indexed drawing.
  • Camera rotation with spherical coordinates.
  • Render edges as lines (respecting z-index).
  • Add perspective to renders.
  • Move to MVP translation matrices in shader.
  • Render coordinate axes (color-coded and labelled).
  • Translate meshes w.r.t the origin.
  • Render face normals (respecting z-index).
  • "Capture" frames from OpenGL/GLFW and composite them into a video.
  • Add configuration for video export.
  • Add debug panel with scene information.
  • Add sphere.
  • Add tiling textures on faces.
  • Add translucency to select faces.
  • "Spawn meshes" (and their spawn animation).
  • Smooth camera movements.
  • Allow a sequence of animations/movements to be programmed and ran.
  • Increase render and video resolution.
  • Add keyframe interpolation.
  • Import models.
  • Camera panning (and other sequences).
  • Camera mouse dragging behavior.
  • Allow the coloring of objects.
  • Draw points.
  • Draw straight/curved lines.

Quality of Life

  • Add "ambient occlusion" to mesh face colors to indicate orientation.
  • Make drawing aspect-ratio-independent.
  • Easing modes for animations.
  • Better shading and lighting.

Documentation

  • Think about and clean-up public API.
  • Add example mains.

Performance

  • Speed up frame extraction.
  • Add concurrency.
  • [?] Reduce draw calls.
  • Cache calculations (such as vertex calculations of spheres).

For Maintainers

Any and all Math in the repository follows the Math convention unless otherwise noted. Do not use the Physics convention if possible, but note it as such if used regardless.

About

A successor to slides

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors