Thursday, February 28, 2008

Shader Integration and Pass Controls Complete!

Greetings everybody!



The model you all may recognize of the infamous Killeroo which you can find (along with it's licensing) here. If you goto to my photo album you can see other test renders for raytracing setup for Air and 3Delight all using the same Blender project, also the notes for each render show system configuration, render times, and comments for each render. Another interesting render is a identical setup to render this scene under Aqsis without raytracing, but instead using a distant shadow map and depth map based ambient occlusion:


If you're running Blender 2।45 and download the latest CVS of MOSAIC you may want to grab and play with the Blender project files ;

raytraced setup (3Delight, Air, Pixie): raytraced_killeroo.blend
mapped setup (Aqsis, RenderDotC): mapped_killeroo.blend

WARNING THESE ARE 16 MEG FILES EACH!!

The default shading system is fairly simple in concept, when MOSAIC is started, or before exporting it checks to make sure 10 Blender text files exist :

  • MOSAIClight.sl

  • MOSAICsurface.sl

  • MOSAICdisplace.sl

  • MOSAICfog.sl

  • MOSAICbackground.sl

  • ls_MOSAIClight

  • ss_MOSAICsurface

  • ds_MOSAICdisplace

  • vs_MOSAICfog

  • is_MOSAICbackground

These correspond to the 5 shaders and 5 shader fragments required for the default shading system. If any one of these are missing MOSAIC will automatically load and use them. These shaders tie into the light, material and world systems of Blender through the embedded shader fragments with the tokens already setup. This allows seamless use of most Blender settings but also allows the user to customize the shader source and parameters on a project by project basis, it also keeps all code in one script so MOSAIC will still be portable and easy to use. The list of everything these tie into would be too long, but in general I'll just say all light and mist settings work and most material and texture channels and mapping work. Any setting that couldn't be hooked directly to a Blender control has been placed at the top of each shaders parameters list, and are easily identified by the lack of a token parameter. I plan to continue to add to and expand these shaders as I find and learn new things to add (like adding built-in SSS support, etc).

I've also completed the render pass and mapping controls for building various render pass types. For right now these passes would still need to be built by hand but has laid the ground work for me to build utilities to automate this! These features include the ability to control perspective, clipping and DOF for non-camera objects set as active cameras (good for lamp views and cube maps from objects perspectives), mapping dialogs to setup depth to tx exports per pass, the ability to select "into" camera objects that are duplis (such as using a lamp as dupli on a mesh and setting up a pass for each one), the ability to render every RIBset in a scene as a separate pass (such as setting up a linked scene for a cube map and using a different RIBset for each of the 8 cube perspectives). The last one is a key feature because it allow the setup and logical control of hundreds of related passes in a single Blender scene. Although these allows you to build passes it is really intended for use by utilities that will automate all this and just allow the user direct control after the passes are constructed. Like I said above, I'm very close to finalizing all the basic controls and features so I can release a new beta download and update all the documentation and examples :)

Now that everything is in place for manually handling render passes the next step is building a series of automated dialogs to generate render passes. Hopefully if all goes well this should take 1 to 2 weeks :)

This is >WHiTeRaBBiT< signing off!!!

7 comments:

  1. Beautiful.

    These renders are the best I've seen of Blender to Renderman through some 8 years of various methods of achieving this.

    I hope someone is inspired to try these blends with perhaps Lucille and Gelato.

    ReplyDelete
  2. I've been keeping my eye on Lucille, it would be great to have all the advantages of RenderMan with GI.

    I've tried several times now to integrate Gelato, but they are using non standard shader and RIB languages (I think their integrating Python into the language or something), and the only project to tranlate them isn't complete enough to even do a simple render :(
    Not sure why they felt the need deviate from standards but they did!

    ReplyDelete
  3. Thanks for great scene, WHiTeRaBBiT!

    Unfortunately, lucille doesn't support some functionality to fully render this scene.

    I think I have to implement some codes to lucille to work with the scene and libMOSAIC, and it takes time. but I'll try to render this scene, indeed! Please be patient.

    ReplyDelete
  4. Hey syoyo :)
    I know what you mean about "it takes time", I've poured every waking moment I have into MOSAIC and after a little over a year its only just know getting useful!!

    Anyway if it helps the export code strictly adheres to the RiSpec3.2 (as far as I can understand it). If you can get all the basic "structural" stuff working (things that can't be turned off in the exporter) such as the block structures, camera settings then all the Lucille specific stuff can be added with code fragments in Blender.

    Too bad I can't read Kanji I only understand a little of your blog :( I've thought several times about leaning Japanese, maybe I'll get serious and actually try it :)

    ReplyDelete
  5. > I know what you mean about "it takes time", I've poured every waking moment I have into MOSAIC and after a little over a year its only just know getting useful!!

    :)

    Yah, I think it takes a couple of weeks, or few months possibly.

    > Too bad I can't read Kanji I only understand a little of your blog

    Never mind. I've decided to write valuable posts in English recently. Japanese posts are just noise, so you can safely ignore it :)

    ReplyDelete
  6. Just to let you know because of your project and all the questions I've had about using Gelato in MOSAIC I've decided to add more controls in the "MOSAIC Settings" tab that will allow you to turn internal export features on and off. I've already have most of it coded and am testing it right now! I hope to have a couple test renders to submit for Gelato and Lucille :)
    These controls let you turn on and off thing like the RiFrameBegin/End, RiWorldBegin/End, RiClipping,ect. Now its possible to turn almost everything off except for Attribute blocks (need those for graphic state control), RiFormat and the basic geometry RIB. I've already have Gelato working (though I'm still testing it) and plan to test Lucille shortly :D
    If all goes well I'll start adding more of these renderers to the preset list including Lucille!!! I'll post a blog once I'm done with some notes and maybe some test renders and blend files for everybody else to play with ;)

    ReplyDelete
  7. >If all goes well I'll start adding more of these renderers to the preset list including Lucille!

    This will be perfect and a major step for Blender > RenderMan and related renderers.

    ReplyDelete