Moggen.org

Menu
* Main
* Graphics
  - MRend
* Programming
  - Threads
* Links

© 2000-2003
Moggen

MRend

I'm working on my own graphics renderer when I have some time over. The idea for my renderer is to combine both ray tracing and scan-line rendering together. The reason for mixing them together is to be able to render very realistic pictures while keeping the rendering time low. The ray tracing provides realistic reflection and refractions as well as shadows, while the scan line renders diffuse light and textures at high speed.

My own rendering software under development is called MRend (short for Moggen render). The file format used for input is NFF, the format used in the ray tracing test package SPD. NFF is soon to be replaced in favour of the Renderman RIB file format.

The rendering package is written in Java to be platform independent. Java maybe isn't the fastest language around when it comes to run time performance and it is quite heavy on the memory consumption too, but the benefits of platform independence and the fact that hardware memory is quite cheap nowadays makes it fair enough to use. The Java platform continues to improve in performance, both run time and memory footprint. Old programs will become faster without re-compiles and I really like that. Not all software comes with open source code.

MRend development

The MRend developing originally started in 1998 as a pure ray tracer and was then written in C++. Later it was to become a bachelor's thesis project to study optimizations in ray tracing, but unfortunately I didn't have time to finish the project. During year 2000 I decided to rewrite the renderer and at the same time convert to Java. At the end of the year I decided to aim toward a hybrid scan line - ray trace renderer.

Here you can see how far I have got in the development. When the software is enough complete I will release it.

Features

  • 2 Rendering modes, ray trace and scan-line
  • Primitives: triangles, smooth triangles and spheres
  • Sphere tesselation in scan-line mode
  • Diffuse light calculation
  • Reflection with ray tracing in scan-line mode
  • Input file format: NFF with some restrictions and extensions
  • Image output in JFrame window
  • Differential mode that compares the ray trace and scan line outputs
  • Point light sources
  • Ray traced shadows or shadow maps
  • Bounding spheres
  • Phong specular highlights
  • Checkerboard texture
  • Texture mapping
  • Clipping by 6 directions in the scan-line renderer

History of progress

History archive for 2001

Click on the thumbnail pictures to see larger versions

  • 2007-10-15

    The years fly by. It is almost 6 years ago I worked on mRend. It is not likely I will do much more. It was fun then and I have other things on my mind now. I got a request by e-mail if I had any plans going open source. I have nothing against that and I would be happy if it can be of any use. I chose the modified BSD license, and it is compatible with for example GPL.
    Download MRend here: mrend.zip

    I have translated the few swedish comments that was still there (99% was in english) and removed the very alpha version of the RIB importer. It was not very useful anyway. I include 2 simple NFF scenes I've made myself. More NFF can be found out there, google for it.

  • 2002-01-02

    Happy new year! Today I moved the 2001 history of progress to a separate page. MRend is not dead, in the last couple of months I haven't produced any code but I have some big plans for the future of MRend. I must use a new file format for scene descriptions since NFF is too simple for my future needs. The file format I will be using from now on is the RenderMan RIB (ASCII) format (Specifications avaliable from Pixar here ). Renderman is the graphics standard used by very popular high-end computer graphics tools like Pixar's PRMan and Entropy from Exluna. I've implemented a simple RIB importer, but it is not incorporated in the MRend code just yet. Right now MRend is quite broken and I must redesign some of the code to adapt it to the specific needs required by Renderman. I also have some plans of implementing a subset of the Renderman shading language (RSL). Some of the tools available in RSL, for example: derivatives of any expression, are quite tricky to get going efficiently in a ray tracer. I was thinking of creating a compiler that compiles MRend RSL source code into Java source code. Quite big plans, but I'm in no hurry. :-)

  • 2002-01-16

    Quite much code has been produced the last couple of days. I'm working hard on the RIB file importer. A tokenizer is up and running, and right now I'm coding on the parser that converts the RIB instructions to Renderman interface call. I am aware that there is a available Java-Renderman binding package on the 'net: RenderMan-java by Sean Cier. I could have used that package instead of re-inventing the weel all over again, but the package is released with a licence that is incompatible with my current plans for MRend. MRend might go open source one day, but not just now.

  • 2002-01-22

    The first version of the RIB importer is finished. Now I'm working on the Renderman state machine and how to adapt the old MRend code structures.

  • 2002-02-04

    MRend now renders (extremely) simple RIB-scenes!

    Rendering with MRend, thumbnail Rendering with BMRT, thumbnail This is a comparison of a very simple scene rendered by MRend (to the left) and BMRT to the right. The polygon matches perfectly, but the shading differs a litte bit. MRend's simple diffuse surface shading and the interaction with the point light source is a bit simpler implemented than in BMRT's (and Renderman's) standard shaders.

    Difference image between scan-line and raytracing of the simple RIB-scene, thumbnail This is a difference rendering by MRend. Something has gone very wrong with the scan-line rendering. I don't know what just yet, but I suspect it is the clipping code.

  • 2002-02-20

    MRend's scene graph structures only allow rigid body transforms of the camera. This means that the camera can be rotated and moved in the virtual space, not scaled, sheared, projected or transformed in other ways. The Renderman API allows non-rigid transforms to the camera matrix, which make MRend differ from the standard. General matrix transforms of the camera might be a powerful feature in some cases, but I think I will do just good without it. The goal is not to reach a complete Renderman implementation anyway.

- Moggen