[Bf-committers] Render API Design

Aaron Moore two.a.ron at gmail.com
Mon May 28 10:10:20 CEST 2007


Jonathan,

Thanks for an insightful email! I thought about it, and here is the
direction I'm leaning:

> I just have a small comment about starting with convertblender.c.  My
> comments come from the background of working on the RenderMan / Aqsis
> exporter in the Tuhopuu tree, which Paul Gregory (Aqsis project)
> originally started.  I have CC'd this email to Paul in case he has any
> additional comments.
>
> My conclusion after working with the existing Yafray converter was that
> it used an approach which was far too "low level" to be entirely
> appropriate for RenderMan.  It was clear that Yafray benefited from the
> pre-conversion of the Blender scene into VlakRen ("Render Faces"), which
> are the low-level polygon form that the Blender renderer uses as input.
> However, due to the nature of the RenderMan interface, we needed access
> to much higher-level data.  Adding in this higher-level stuff to
> convertblender.c was a terribly ugly hack at best.

My goal in this project is not to add to convertblender.c, it's to
completely replace it with a new system. Here's what this discussion
of high-level vs. low-level leads me to conclude:

A renderer merely needs to understand the scene enough to do it's job,
therefore the API would probably have a high level feel to it. I would
not want to do unnecessary low level formulation of the data for a
renderer, such as the renderman ones, which is going to do that all
internally and according to it's own needs. The point, I guess is
this. In principle, a renderer needs only the simplest, high level
description of the scene possible which includes all the information
necessary.

What this means in terms of convertblender.c, as I see it, is the
internal renderer currently has it's code mixed up with the code which
converts blenders internal scene data into render data for it. This
seems to me to be precisely where the system would benefit from
reorganization. What I would tentatively plan to do is relocate the
low level code needed for blender's internal renderer on the outside
of the API, that is make it part of blender's internal renderer, and
not the export code for all renderers.

Diagram if two hookups:

Internal Scene > Render API (high-lev) > (cur. convertblender.c)* >
(cur. blender internal)*
Internal Scene > Render API (high-lev) > Renderman

* these together would constitute the post-render-api internal renderer.

I will need to do my homework as far as research to make sure this
will actually be best after other considerations are taken into
account, but tentatively, that's my response.

Thanks for your help!

Aaron

!DSPAM:18,465a8f4036371803221029!




More information about the Bf-committers mailing list