1. Products
  2.   3D
  3.   Ruby
  4.   Mittsu
 
  

Open Source Ruby Library for 3D Graphics & Game Development

Free Ruby 3D library for Creating and Manipulating 3D Objects in OBJ & FBX formats, create Geometric Scenes & Game Development using Ruby library.

In the vast world of programming, creating stunning 3D graphics and interactive experiences has become increasingly popular. Mittsu is a robust open-source library specifically designed for 3D graphics programming in Ruby. The library is built on top of the OpenGL library and offers users a high-level interface for creating and manipulating 3D objects, handling lights, textures, cameras, and more. Mittsu's intuitive syntax and object-oriented design make it a favorable choice for Ruby developers looking to venture into the world of 3D.

Mittsu's API (Application Programming Interface) is very easy to use and is considered to be very flexible as well as intuitive, allowing software programmers to concentrate on their creative vision rather than getting lost in complex syntax. The library provides an object-oriented approach, with clear and concise methods for handling objects such as meshes, cameras, and lights. This simplicity not only speeds up development but also makes the learning curve for newcomers to 3D graphics and game development less steep. Mittsu embraces the ethos of cross-platform development, making it compatible with various operating systems and platforms.

Mittsu offers a comprehensive set of features that cater to various aspects of 3D graphics and game development. It provides support for loading and manipulating 3D models in popular formats such as OBJ and FBX, allowing software developers to import assets seamlessly into their projects. Additionally, Mittsu includes built-in collision detection, audio support, and a physics engine, enabling developers to create interactive and dynamic experiences with ease. Mittsu is undoubtedly a game-changer for Ruby developers interested in exploring the realms of 3D graphics and game development. Due to its dominant rendering engine, wide range of features, and strong community support makes Mittsu library an exceptional choice for creating immersive and interactive experiences.

Previous Next

Getting Started with Mittsu

The easiest way to install Mittsu stable release is using RubyGem. Please use the following command for a smooth installation.

Install Mittsu via RubyGem

$ gem install mittsu 

You can download the compiled shared library from Github repository.

Create Complex 3D Scenes via Ruby API

The open source Mittsu library has included a very useful features for creating and managing complex 3D scenes inside Ruby applications. The library offers a powerful scene graph that allows software developers to create complex 3D scenes by organizing and manipulating objects in a hierarchical structure. This makes it easier to manage transformations, group objects, and apply animations. It enables users to handle user input and interaction with 3D scenes through event listeners.

How to Handle 3D Scenes inside Ruby Applications?

require_relative './example_helper'

SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
ASPECT = SCREEN_WIDTH.to_f / SCREEN_HEIGHT.to_f

scene = Mittsu::Scene.new
camera = Mittsu::PerspectiveCamera.new(75.0, ASPECT, 0.1, 1000.0)

renderer = Mittsu::OpenGLRenderer.new width: SCREEN_WIDTH, height: SCREEN_HEIGHT, title: '01 Scene Example'

renderer.window.run do
  renderer.render(scene, camera)
end

Rendering and Shading Support

The open source Mittsu library allows software developers to programmatically render 3D drawings and scenes inside Ruby applications. At the heart of Mittsu lies a robust rendering engine that leverages the power of OpenGL and WebGL. This engine provides developers with the tools needed to create visually stunning 3D scenes, complete with lighting, shading, and texture mapping. By harnessing the capabilities of these industry-standard technologies, Mittsu ensures smooth and efficient rendering, resulting in lifelike and immersive graphics. The library supports various rendering techniques, including Phong and Lambert shading models, which can be applied to materials to achieve realistic lighting effects.

Loading 3D Models via Ruby API

The free Mittsu library offers a comprehensive set of features that can easily handle various aspects of 3D graphics and game development inside Ruby applications. It provides support for loading and manipulating 3D models in popular formats such as OBJ and FBX, allowing software developers to import assets seamlessly into their projects. Additionally, it also includes built-in collision detection, audio support, and a physics engine, enabling developers to create interactive and dynamic experiences with ease. Importing and utilizing 3D models, textures, and other assets is made simple with Mittsu library.

How to Handle Textures inside in 3D Scenes via Ruby API?

require_relative './example_helper'

SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
ASPECT = SCREEN_WIDTH.to_f / SCREEN_HEIGHT.to_f

scene = Mittsu::Scene.new
camera = Mittsu::PerspectiveCamera.new(75.0, ASPECT, 0.1, 1000.0)

renderer = Mittsu::OpenGLRenderer.new width: SCREEN_WIDTH, height: SCREEN_HEIGHT, title: '05 Texture Example'

geometry = Mittsu::BoxGeometry.new(1.0, 1.0, 1.0)
texture = Mittsu::ImageUtils.load_texture(File.join File.dirname(__FILE__), 'texture.png')
material = Mittsu::MeshBasicMaterial.new(map: texture)
cube = Mittsu::Mesh.new(geometry, material)
scene.add(cube)

camera.position.z = 5.0

renderer.window.on_resize do |width, height|
  renderer.set_viewport(0, 0, width, height)
  camera.aspect = width.to_f / height.to_f
  camera.update_projection_matrix
end

renderer.window.run do
  cube.rotation.x += 0.1
  cube.rotation.y += 0.1

  renderer.render(scene, camera)
  # break
end