2

I'm architecting a project which will use many PNG files which must be rendered from 3D models of clothing (we have yet to hire someone to create the models). We have a variety of texture maps (different types and colors of cloth, etc) which will be used with the models (each model may be rendered many times, with different textures). In the future, we will add and change both models and texture maps, and need to be able to automatically re-render the PNGs on demand.

So we are looking for either:

  1. A standalone 3D rendering engine which can be run from the command line. It must accept an input format which we can easily generate with a custom script.

  2. A 3D rendering library which can interoperate with a popular programming language such as Java or Ruby, and which can load 3D models in popular modeling file formats.

We are looking at Yafaray (http://www.yafaray.org), which can be run from the command line, and which takes an XML scene description as input, but I'm sure there may be better options. Can you give an objective breakdown of the pros/cons of options which you are aware of?

Alex D
  • 29,755
  • 7
  • 80
  • 126

1 Answers1

4

3D rendering engine for offline

Makehuman uses several external renderers. You might want to check them out.

Can you give an objective breakdown of the pros/cons of options which you are aware of?

No. It is unclear what kind of project you're designing.

At this point I suspect you're trying to make custom render farm from scratch, and if I'm right about that, correct solution would be to use existing software - maya/3dsmax had some render farm support, and it should be possible to make blender-based render farm as well. From those packages maya definitely had scripting support (MEL/python, I think), and good portion of blender is written in python.

If you want GL-style renderer, then Mesa3D provides library that is "mostly" OpenGL compatible, but works on CPU without graphical acceleration. Which means you should be able to use it for offscreen rendering without making a window. Because it renders everything on CPU, it will be much slower than accelerated rendering on GPU.

There's also Pixomatic software renderer that provides DirectX style api. Haven't used this one myself.

It depends on your project. If you want to render some 3d model with ambient occlusion, radiosity or photon tracing, you need render farm with full-blown software render like blender/maya/3dsmax. If you simply want to render model offline then you could slap together simple solution using Mesa3D or standard OpenGL during lunch break. If I remember correctly, povray was good for boolean shapes aka Constructive Solid Geometry (boolean shapes are pain to implement using libraries that operate on triangles, but are trivial in raytracer).

SigTerm
  • 26,089
  • 6
  • 66
  • 115
  • Thanks for the answer, +1! I edited the question to give more details about what we are doing. The 3D models are of different types of clothing, the texture maps are different types and colors of cloth. We are not making a render farm -- we just need to use these PNGs in our software, and we may change the models many times in the future, so we can't manually re-render all the images each time. – Alex D Feb 27 '12 at 16:22
  • 1
    @Alex D: If you don't need advanced shading, you can use pretty much anything you want (probably even render it realtime within java applet/flash object). If you want complex materials, you'll have to forget about Mesa3D since it is very slow with shaders. In short, I'd grab any CLI renderer (povray/yafaray) I can get and use it. I don't think there will be problems, but you'll have to convert scene to a format renderer can understand. – SigTerm Feb 27 '12 at 17:06
  • We are going to hire a professional modeler to create the model files. I will have to set up the renderer, though. Do you have any comments on the pros/cons of Yafaray vs. Povray? – Alex D Feb 27 '12 at 17:11
  • @AlexD: "Do you have any comments on the pros/cons of Yafaray vs. Povray?", no because I normally program real-time 3d graphics. however, there's [this discussion](http://news.povray.org/povray.advanced-users/thread/%3Cweb.4a721d918363990fc41e4df50@news.povray.org%3E/) (see last post) that seems to address your question. As I said, (to me) so far your project doesn't sound extremely unusual, and you should be able to use pretty much anything. – SigTerm Feb 28 '12 at 06:32
  • Thanks, all this information was very helpful! I am accepting your answer. – Alex D Feb 28 '12 at 07:25