Git Product home page Git Product logo

minirender's Introduction

minirender

A useless software rasterizer for 3D meshes using a z-buffer.

Only requires the ASL 1.11.3+ library (automatically downloaded and built if needed).

It interpolates normals to produce smooth Blinn-Phong diffuse and specular illumination.

Sample output

(image rendered from the model attached to release 0.1.3 in around 30 ms.)

Current features

  • Rasterization of triangle meshes, using OpenGL-like modelview and projection matrices
  • Blinn-Phong illumination
  • Rasterization interpolates vertex positions, normals and texture coordinates (can create smooth shading)
  • Ability to save images in PPM format (very simple and not needing 3rd party libraries)
  • Triangle clipping at the near plane
  • Textures (PPM only)
  • Loaders for:
    • STL (binary or text)
    • OBJ/MTL
    • X3D (IndexedFaceSet and IndexedTriangleSet meshes with scene hierarchy and materials)
  • Simple hierarchical scene with meshes and transforms
  • Only one point light in world-coordinates

Possible future features

  • Additional loader(s) (maybe PLY)
  • Normals computation with autosmoothing
  • More lights including spots

Console output

The included sample can render on the console in real time. The -console option enables this, and -t indicates 10 seconds of animation.

render -console! -t 10 scene.obj

Console output

minirender's People

Contributors

aslze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

minirender's Issues

stl from stdin

Good day.
Is it possible to send data to minirender from StdIn ???

thumbnails

It can be very useful program to create thumbnails for stl models if add some options like:

  • set background color
  • set filename to save image or send image to stdout

Stl file with non ASCII letters in name

If try to convert stl with non ASCII letters in name get empty image.
minirender not send errors to stdout.

./render -o image.tiff -tilt 30 -yaw 20 -w 600 -h 600 "€.stl"
load ./render 0.000 s
t = 0.082 (t frame = 0.082)
t paint = 0.014

image.tiff is empty.

I can encode file name with non-ASCII letters before use minirender.
Or maybe it is possible to resolve this inside minirender code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.