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


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 :






  • 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!!!

Wednesday, February 13, 2008

1st Week

In the first week of this blog opening, there were 227 visits from 111 cities in 38 countries, via 22 sources.

Thank you,

Ted and Tenzin

Friday, February 08, 2008

Built-in shaders for MOSAIC

Greetings BlenderHeads and RenderMan Junkies :-)

Before talking about what's going on in MOSAIC I just wanted to give a big thanks to the sponsors of BlendertoRenderMan, the other developers of such wonderful tools (whom I feel very humble to be included with) and all the great people in the Blender and RenderMan communities! Everybody has been extremely supportive and encouraging, when so much time and trouble has been put into something kind words and support mean more then I could ever say :'-)

Now on to MOSAIC!
For some quick background I've been been developing MOSAIC since February of last year in VERY intense all nighters and all weekend sessions! My goal is to go from concept to fully functional project (either late stages of Beta or version 1.0) within a year. The reasoning behind this is simple, I'm more interested in making art then programming but needed a good tool to leverage Blender's capabilities with RenderMan (at least until some of these other great tools are ready). Once it leaves beta I intend on actually using MOSAIC as much as possible and polishing it from personal use and community feedback (which has already been extensive and very helpful!). As it stands now it looks that I'm about a month or two from reaching that goal :-) Right now I'm pushing to finish the last large internal changes so the beta-0.2 download can be setup and the wiki and examples can be updated with the latest changes.

The current CVS version of MOSAIC is using the standard shaders that are in the RiSpec to loosely simulate Blender's most basic materials and lights. The beauty of this approach was it insures that ALL RenderMan renderers will work "out-of-the-box", but has proven too limited for new users who are not able or willing to write their own shaders. So with much debate I have chosen to write custom shaders that tie in most of Blender's standard material and lighting capabilities to RenderMan. This approach is nice for the end user but has the problem of being exceedingly difficult to make SL code that is compatible with all renderers both in language and concepts.

After 3 weeks of heartache I currently have 4 built-in shaders and fragments that tie in most material and light features of Blender including:
  • All light features and light types (with auto light array to simulate Blender's area type), nodiffuse, nospec, hooks for spot, distant and point shadow mapping as well as projector
  • All fog settings including ground fog
  • Ambient Occlusion and HDRI Occlusion (for raytracing renderers)
  • Standard material specular and diffuse controls, Shadeless, Translu, Emit, Amb, Fresnel, Raytrace, Reflect and Refract, hook for environment map, texture offset and scaling, all map channels (with 1 texture per channel limit) and working channel controls (for instance spec maps, ref maps, reflect maps, etc).
So far this technique is simulating Blender's materials behavior pretty well, but I fully expect there to be a lot of bugs and renderers they don't work with. I'm currently integrating the shaders as defaults when NONE or custom shaders are not selected, hopefully all this will be updated to CVS in about a week :-/

After extensive testing and CVS release of this I plan to move onto building utilities for automatically creating shadow map passes, cube and lat-long environment maps and maybe integrating the depth map technique for SSS.

Thats about it, sorry for the long post but I had a lot to say. If you hadn't already, try MOSAIC and while you're at it try all the other great tools here just follow the links to the right.

Sler 0.2.1 (CVS) Shader Arguments Controlling


One new important feature of development version of Sler is the possibility to control shader arguments generation. Now only marked inputs of nodes are translated into shader arguments in generated RSL code. Also you can set the storage class for arguments (uniform or varying) and mark argument as output. In future when creating custom channels for nodes is implemented you will be able to use really arbitrary output variables (AOV) but now you can use only existing channels.

This video demonstrates this feature:

Or you can download it here.

You can get latest development version of Sler with this command:

cvs -z3 co -P sler

Or you can use graphical tools (usually on Windows) like WinCVS or TortoiseCVS

Thursday, February 07, 2008


Some notes on posting :

Please enter a title first, before writing any text and saving as draft or publishing. This is important. Without a title, the post is saved and named, for example,

The name blog-post.html cannot be changed later, and this leads to duplicate links, less results in Google searches, and confusing data in Google Analytics pages, since entries do not have descriptive names.

Labels help navigate the blog and find posts on particular subjects, for example, clicking on the label shaders will open a page of all posts with that label. This is the equivalent of topics and threads on a PHP forum, and is very useful. It is possible this also increases the result in Google searches. The full list of labels is shown if you click Show All at the bottom right of the post entry form. I have used this and the previous post to add a collection of useful labels. I can add and edit labels manually if needed.

Images can be included in posts. These are best hosted elsewhere, if necessary mail them to me at :

blendertorenderman at gmail dot com

and I can upload them to Blender To RenderMan Site and mail you back the links with the embed code for a 600 x 450 preview, linking to a full size version on the site when clicked. The site is hosted on a very fast server and is better than Imageshack, Photobucket, Flickr and so on.

Videos can be embedded once uploaded to YouTube or Google Video. From personal experience, I prefer YouTube for final quality. Please do not use the option in the post entry page here to directly upload video to the blog. The embed code can be modified to fit the width of the post content area.

For example, the following embed code :

object width="425" height="350" ... type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"

Should be changed to :

object width="630" height="508" ... type="application/x-shockwave-flash" wmode="transparent" width="630" height="508"

This allows for an aspect ratio of 1.333333333 (4:3) and a 32 pixel margin for the player controls, without any border errors.

When there are more videos of demonstrations, tutorials and rendered animations on individual YouTube accounts, I can create playlists in the Blender to RenderMan YouTube account, grouping them together in various ways, eg, a full set of tutorials for a particular BlenderMan exporter, another playlist for a collection of demos of all the exporters, collections of animations, and related off-topic content, for example, SGI and Pixar technology demos and shorts.

Finally, do not forget to use the Blender to RenderMan Group, and make announcements there for any posts here including a link to them. All topics should be announced on the group. The group is easier and faster to read than this blog, and also increases search engine coverage.

Note I have added a feed for the group and Comp Graphics Rendering RenderMan at the bottom of the sidebar. Other feeds might be added later, as can links to more related Blender and RenderMan sites and software.


Labels to apply, so posts can be searched by topic.

Blender to Renderman tools :

blenderman, neqsus, btor, blenderpixie, blenderlucille, ribkit, ribber, sler, svat, ribmosaic, blendergelato, blenderpbrt, luxblend

Renderers :

prman, bmrt, entropy, 3delight, rdc, air, angel, aqsis, pixie, lucille, gelato, pbrt, luxrender

RenderMan terms :

rib, rsl, shader, dso, shadeop

This post might be edited to add more.