I want to write a bit about my first blender development project, if you follow me on twitter then you probaly already know its a renderer exporter for PBRT render engine.
You find the source code and samples scenes here:
The reason why I wrote it as an exporter is because it was the easiest way to get started. The project started when I decided to stop using 3dsmax and go to blender full-time, so I needed to learn everything I needed about blenders C/Python API while making this.
It has not been as hard as I feared, 16 years of 3dsmax daily + many years of maxscript and 3dsmax c++ SDK experience helped a lot.
I’ve spent a lot of years on the luxrender project working on the 3dsmax plugin, but after I stopped using 3dsmax it did not make sense to me to continue working on that, also the integration of luxrender in blender had already been done, so I took a look at my PBRT book and decided that I wanted to spend time with that, also later on I want to dive deeper into render engine development, so it makes perfect sense to me to use pbrt as boilerplate. But first it deserves a proper exporter, which is what I’m developing right now.
The way the exporter works right now is that it exports the scene to the format that pbrt can read, and you render the resulting scene with pbrts command-line client.
Currently the shader GUI are written in C, the reason is simply that I was not able to make it work the way I wanted in python. The downside of this is that I cannot release it in its current state as an add-on, I need to fork blender instead. So right now I’m at a crossroad, rewrite the c parts in python to make it an add-on, or do full c implementation and have it as a fork, then later do a full implementation like any other internal renderer in c, like cycles for example, that would also mean render properly from inside blender and not externally like I do now.
I’m leaning towards doing a full c implementation, but I also see the benefit of making it with python as an add-on, so Ill think a bit more about it before I make my final decision.
So, here’s a list of what I have already implemented:
*Custom shader guis with all their settings.
* Mesh export
* Camera export, with DOF setting.
* Texture map export.
Currently I have no light support except a hard-coded hdri light source, the plan is to add all lights including environment map support next.
I will openly admit that I wanted to sell the add-on, but I decided against it, the reason why I decided not to was because the market for such a thing is very small, so there’s no reason to earn maybe 100 dollars and go trough all the hassle of selling it, id rather make it open source and free for anyone to enjoy, and maybe inspire others the same way I did when I worked on the luxrender plugin.
I also earn enough at my regular job, so I have no reason to do this for money, its my passion and I love to code and help others in my free time, so it makes perfect sense to me to do this.
So, now you might wonder when the source will be released – I will do that shortly, just some more features to add (lights, render settings panel), and Ill decide if Ill rewrite the C code in python first.
Time to show some test renders, you might have seen these before on twitter, but I figured it would be nice to collect them here in this blog post.
And as you will see – some of these are grainy, I simply did not render them long enough
PBRT is CPU only, so rendering takes a lot of time.