Blender|Aqsis integration

Blender's renderer and external renderer export

Moderators: jesterKing, stiv

pgregory
Posts: 43
Joined: Wed Oct 16, 2002 11:09 pm

Blender|Aqsis integration

Postby pgregory » Sun Feb 29, 2004 10:29 pm

Hi.

I am working at the moment on producing a custom version of Blender (Tuhopuu) that has built in support for Aqsis (Renderman renderer) in the same fashion as the current 2.32 release has for Yafray. It will appear under the renderer choice dropdown.

The main reason for doing this is for a personal animation project. I want to use Blender as I think it is a powerful animation solution, and have wanted to explore it's functionality out of sheer curiosity for a while. While Blenderman is an excellent tool, and within the constraints of the Blender/Python plugin system, works wonders, I want to write a more integrated solution for two reasons.
  1. I need to do some things that simply cannot be done with the Blender/Python interface, maybe someday they will as the Python interface grows.
  2. I want to learn a little about the internal workings of Blender as I go.

Also, an integrated, one click solution, makes for a better workflow.

Anyway, the main core of it is in place, it uses the libri2rib, RIB generation library that comes with Aqsis, so producing the RIB itself, is a walk in the park, just call the 'C' Renderman calls and it gets converted to RIB. This makes the whole thing easier to code once the core is in place, rather than relying on printing RIB directly to a file. I also plan to use the TexBlender shader as a basis for a complete Renderman implementation of the Blender shading system, so, theoretically, I should be able to author the scene completely in Blender, including materials, and render in Aqsis.

The reason I am posting here about this is, I am, as I say, doing this mostly for a personal challenge, however, if there is any interest in this I would be more than happy to integrate the changes into the CVS trunk. What would peoples thoughts on this be, if it would be well recieved and thought to be useful, please let me know what I have to do to get the code submitted back into the Tuhopuu tree.

Cheers

PaulG

Pablosbrain
Posts: 356
Joined: Wed Jan 28, 2004 7:39 pm

Postby Pablosbrain » Sun Feb 29, 2004 10:44 pm

I would love to see this and more rendering options integrated! Good luck in your venture and hopefully we'll get to see it working someday!

sgefant
Posts: 49
Joined: Wed Oct 16, 2002 1:10 am

Postby sgefant » Mon Mar 01, 2004 2:23 am

to get your changes into tuhopuu simply subscribe to the tuhopuu-devel mailing list (http://www.blender.org/mailman/listinfo/tuhopuu-devel) and send a patch there.

sgefant

Mario1981
Posts: 10
Joined: Thu Oct 17, 2002 10:43 pm

Postby Mario1981 » Mon Mar 01, 2004 9:35 am

RIB export would be VERY intersting for me :)

pgregory
Posts: 43
Joined: Wed Oct 16, 2002 11:09 pm

Postby pgregory » Mon Mar 01, 2004 10:23 am

Mario1981 wrote:RIB export would be VERY intersting for me :)

I feel I should point out that I won't be aiming for generic RIB export. It may well be that the RIB produced works ok in other Renderman renderers, but the intention is not to produce a generic Renderman renderer support, I simply don't have the time. I will be aiming squarely at Aqsis, and if there are any Aqsis specifics that benefit the work I will use them, and as I am the chief architect of Aqsis, I will probably be open to adding things to Aqsis to make the integration better.

If I provide a patch and anyone wants to take the work and make it more generic, fine, but that is not something I will be undertaking.

Cheers

PaulG

nullard3d
Posts: 1
Joined: Mon Mar 01, 2004 2:08 pm

Postby nullard3d » Mon Mar 01, 2004 2:34 pm

Some work has already been made for a renderman export by Christoffer Green.
The file is still in the CVS (tuhopuu2/source/blender/src/renderman.c). It was aiming at re-developping a python script (BlenderMan) in C and integrating in Blender, but I don't remind having see anything about it last time I compile tuhopuu.
Does someone know what is going on ?
Maybe you could start from it.
Hope it'll help.

PS: I just saw that the script was still being developped by Goran Kocov at: http://www.geocities.com/gkocov/blenderman/.
PPS: There's a thread in the forum about Green's implementation: http://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=175

pgregory
Posts: 43
Joined: Wed Oct 16, 2002 11:09 pm

Postby pgregory » Mon Mar 01, 2004 3:33 pm

nullard3d wrote:Some work has already been made for a renderman export by Christoffer Green.
The file is still in the CVS (tuhopuu2/source/blender/src/renderman.c). It was aiming at re-developping a python script (BlenderMan) in C and integrating in Blender, but I don't remind having see anything about it last time I compile tuhopuu.
Does someone know what is going on ?
Maybe you could start from it.
Hope it'll help.

Yes, I was already aware of the efforts to produce a Renderman exporter. But I looked at it and found it didn't fit into the process I wanted. What I have done is to take the work on the yafRay integration and work from that, so it will look the same. Also, the Renderman exporter uses standard print to file type approach to produce RIB which I feel is a lot of wasted effort, using a RIB client library such as libri2rib makes the whole process a lot cleaner, safer and faster.
nullard3d wrote:PS: I just saw that the script was still being developped by Goran Kocov at: http://www.geocities.com/gkocov/blenderman/.
PPS: There's a thread in the forum about Green's implementation: http://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=175

Again, as I said in my original post, the Python approach doesn't quite fit in, it is too disjointed for me, not due in any way to the work of Goran, what he has done is excellent, but the Python plugin system in Blender just isn't mature enought to integrate seamlessly yet. My efforts are aimed at getting a 'one click' solution, produce your content as normal, hit Render, and see the result in Aqsis.

While I'm writing, an update, I have complete RIB export of the camer, and all mesh based scene objects up and running, including exporting of smoothing information, and where Catmull-Clark subdivision is selected, export as SubdivisionMesh. This means that if the Subdiv button is pressed, and the render iterations set to 0, it exports just the hull, but renders as a fully resolved subdivision surface. Working from the excellent code of the yafRay integration made it a lot easier, alongside using a RIB client library.

Next up, lights, then I'll look at shaders.

Cheers

PaulG

Panther
Posts: 86
Joined: Tue Mar 04, 2003 7:55 pm

Postby Panther » Mon Mar 01, 2004 7:35 pm

Hi Paul, this sounds great !!! :D

Count me in as one of the Interested people, especially if Aqsis renders scenes faster than YafRay !!! :wink:

Your contribution to Blender's development is much appreciated.

cekuhnen
Posts: 303
Joined: Mon Jan 13, 2003 11:04 pm

Postby cekuhnen » Tue Mar 02, 2004 9:18 am

awesome news! hope you can get it done soon since i htink 3delight will be not free soon anymore!

claas

arangel
Posts: 107
Joined: Wed Oct 22, 2003 2:54 pm
Location: Brasília - Brazil
Contact:

Postby arangel » Tue Mar 02, 2004 6:35 pm

Great contribution pgregory! Thanks. It would be excellent to have a push button solution for RenderMan integration into Blender!

philippe
Posts: 6
Joined: Wed Mar 03, 2004 1:53 pm

Postby philippe » Wed Mar 03, 2004 2:06 pm

Good news : I was about to start something like that in Python...

Question for pgregory :
would you consider adding an external configuration file to take into account the different options/attributes of various renderers ? If you only want to support Aqsis, you would just need to write this dictionary once for your renderer, but keeping this file external would allow the system to be more general and let other people use different renderers.
I used pretty much all the renderman renderers (including yours) and I can help you create that kind of general RIB dictionnary.

Otherwise, if you're interested in some shader writing for your project, I will be happy to help : I make a living writing rman shaders.

philippe

pgregory
Posts: 43
Joined: Wed Oct 16, 2002 11:09 pm

Postby pgregory » Wed Mar 03, 2004 3:02 pm

philippe wrote:Good news : I was about to start something like that in Python...

Question for pgregory :
would you consider adding an external configuration file to take into account the different options/attributes of various renderers ? If you only want to support Aqsis, you would just need to write this dictionary once for your renderer, but keeping this file external would allow the system to be more general and let other people use different renderers.
I used pretty much all the renderman renderers (including yours) and I can help you create that kind of general RIB dictionnary.

Possibly, as long as it doesn't impact my development time too much. As I said, the main reason for doing this is to enable Blender for use in a personal project. Can you elaborate a little on the sort of purpose you imagine for this 'dictionary'. At the moment everything I am doing is pure RIB, so the files produced should work on any renderer. I planned to provide the ability to use 'RIBBoxes' to put any hand coded specific RIB that might be needed at various places in the output file.
philippe wrote:Otherwise, if you're interested in some shader writing for your project, I will be happy to help : I make a living writing rman shaders.

philippe

Absoutely, one of the largest parts of the effort is going to be writing the custom shaders that mimic the Blender materials/lighting. So any assistance you can offer there would be welcome.

Cheers

PaulG

philippe
Posts: 6
Joined: Wed Mar 03, 2004 1:53 pm

Postby philippe » Wed Mar 03, 2004 5:20 pm

Hi Paul,

Every renderer has custom options and attributes specific to the way they are implemented. To make an object visible to shadows or raytracing, the corresponding attribute might be different if you are using Aqsis, prman or 3delight. Options are even more problematic as they can switch on/off any type of implementation-dependent feature.
I have already compiled in the past a list of custom attributes and options for various renderers. I could update it and format it to make it usable for you.

about the shaders, I am pretty new to blender, but it seems to be rather basic.
If you want to support a simple push-button approach, it would be pretty simple to write a few monolithic shaders that would support all the basic functionnalities. you would just have to pass the correct values to the shaders in the rib.
Then you would definitely need a way to use custom rman shaders and manipulate their parameters.

philippe

cekuhnen
Posts: 303
Joined: Mon Jan 13, 2003 11:04 pm

Postby cekuhnen » Wed Mar 03, 2004 6:12 pm

maybe this might be helpfull.

we used 3delight and pixels digital pixels3D animmation software on os x.

we exported the ribs and with scripts we fixed them. inside pixels we added shader with unique names and the script later looks for this names and replace them with the shaders for 3delight.

by this we even managed animations and it worked fine.

there is the tool which can generate shaders by a visual way and crafter shouild be able get teached how to export renderman shaders as well.

sure it would be all awesome when you have a basic shader system inside blender for aqsis and later even a more complex system!

but this way i mentioned is just a good apraoch in my opinoin and not to much work for the user to get used to it.

i rather fix ribs and get awesome results.

claas

pgregory
Posts: 43
Joined: Wed Oct 16, 2002 11:09 pm

Postby pgregory » Wed Mar 03, 2004 6:39 pm

philippe wrote:Hi Paul,
Every renderer has custom options and attributes specific to the way they are implemented. To make an object visible to shadows or raytracing, the corresponding attribute might be different if you are using Aqsis, prman or 3delight. Options are even more problematic as they can switch on/off any type of implementation-dependent feature.
I have already compiled in the past a list of custom attributes and options for various renderers. I could update it and format it to make it usable for you.

I'd like to see the list. I sort of understand what you mean, but again, my initial intention was more to make the basics work with Aqsis out of the box (we don't have too many custom attributes/options, as we don't have raytracing etc.), and if you needed any special stuff, using RIBBoxes would do the job. However, once I get to a suitable stage, and submit a patch, perhaps it would be something to look at.
philippe wrote:about the shaders, I am pretty new to blender, but it seems to be rather basic.
If you want to support a simple push-button approach, it would be pretty simple to write a few monolithic shaders that would support all the basic functionnalities. you would just have to pass the correct values to the shaders in the rib.
Then you would definitely need a way to use custom rman shaders and manipulate their parameters.

philippe

I have a basic shader outline, that is able to take parameters matching those from the Blender material (it is based loosely on the framework of the TexBlender shader that I found once, but seems to have disappeared now). I can send you this to see what your thoughts would be. Also, of course, as Blender is OS we can see exactly how the material and shading works and replicate it as closely as possible from that in a Renderman shader.

Cheers

PaulG


Return to “Rendering”

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests