LAIKA, the Portland, Oregon based animation studio, has released production SLIM templates on the Pixar website in an effort to help boost the Renderman Studio community. For those of you who do not know what SLIM is for, it is an application that is developed by Pixar to develop shaders, similar to how RIBMosaic makes "shader fragments" for Blender based off of RSL shaders made in a shader editor such as Shrimp, SLer and Shaderman. However SLIM is far more advanced and has been a staple in any pipeline that uses Maya and Pixar's Renderman.
SLIM templates are readily available on the internet, mainly released for free by Renderman users, however visual effects and animation studios keep these hidden away, just like any other asset in a production, so for LAIKA to release them to the public is a big deal.
You can grab these templates and example files at the Pixar Support Forum (free registration is required)
http://renderman.pixar.com/confluence/display/~laika/Home
LAIKA, Inc. is an animation company specializing in feature films, commercials, music videos, broadcast series, interactive content, broadcast graphics and short films. Owned by Nike co-founder and Chairman Philip H. Knight, the company is located in Portland, Oregon.
LAIKA has a 30-year animation history presenting the artistry of award-winning filmmakers, designers and animators. In addition to numerous international honors, the company has won two Academy Awards, 11 Emmy Awards, 11 Clio Awards, three London International Advertising and Design Awards, five Mobius Advertising Awards and two Cannes Lion International Advertising Festival awards.
Showing posts with label shader. Show all posts
Showing posts with label shader. Show all posts
Tuesday, May 03, 2011
Wednesday, July 23, 2008
MOSAIC feature ramblings - part 12
Part 12 - Mapping utilities tutorial:
This post represents the last of the MOSAIC feature ramblings series and will focus on actually building and rendering a simple scene using mapping.
In particular this tutorial will focus on the following tasks:
- Build a basic scene in Blender highlighting RenderMan setup
- Prepare shaders via materials
- Set up MOSAIC
- Set up an occlusion map pass
- Set up an environment map pass
- Set up a shadow map pass
- Set up a caustic map pass
- Set up camera DOF
- Add, build and use RenderMan shader sources and fragments
- Tweak RenderMan settings
- Tweak shaders via MOSAIC's GUI
This tutorial will specifically target MOSAIC's mapping utilities to create advanced rasterization techniques, because of this I will be using Aqsis for this tutorial (since it's a pure REYES renderer). Before we begin be sure you have at least Blender 2.46, Aqsis 1.4 and CVS mosaic.py 1.39 or newer.
If you're impatient and, like me, just want to see the scene, you can download it here:http://www.dreamscapearts.com/Public/mapping.blend
Also the first image is the final render, so you can use it as reference for building your scene ;)
Building the scene
To start off with, we will need to build a scene in Blender keeping in mind a few details related to how MOSAIC and RenderMan work. To save a little time instead of outlining every step of this I'll just explain what's in the scene and show some scene shots. I'm assuming a basic knowledge of Blender if we're using external renderers :)
Here's what's in the scene, look at the pictures to the right for the layout:
- 1024x1024 UV test grid image saved as a tif.
- 1 mesh plane Scale 13.7x13.7, double sided, UV unwrap, with unique material.
- 1 mesh Suzanne Scale 2.1x2.1x2.1, double sided, smooth, SDS mod with unique material.
- 4 instances (alt d) Suzanne Scale 1x1x1, double sided, smooth SDS mod with unique material.
- 1 standard spot light, energy 1.2, color RGB 1.0,0.9,0.8.
- 1 standard camera with 35mm lens.
Now that we have the basic components and layout of the scene let's setup the RenderMan related settings. To start off with we need to assign the large Suzanne to a group, this is because later on we will assign it to caustic pass by itself.
Preparing shaders via materials
Next let's quickly outline the material settings:
For the plane use standard material :
- Col RGB=1,1,1,
- Amb=1 (sets occlusion),
- Spec=0,
- create image texture using tif image, disable map to Col, enable map to Disp, and set its Disp slider to 0.477 (this tells MOSAIC to use texture for micropoly displacements).
For big central Suzanne use standard material :
- Col RGB=0.098,0.665,0.544,
- Ref=0.709,
- Spec=2,
- Hard=309,
- Amb=0.607,
- RayMir=1,
- Mir Fresnel=1.2,
- IOR=1.3,
- Transp Fresnel=2.0.
For the instanced Suzannes use standard material :
- Col RGB=0.617,0.617,0.617,
- Spec=0.184,
- Hard=215,
- Amb=1,
- enable "Subsurface Scattering";
- Scale=1,
- IOR=1.3,
- Error=0.05,
- Col RGB=1,0.791,0,
- Front=0.8,
- Back=1.
One thing to note about the big Suzanne's material is you'll notice that we're setting the ray mirror and transp settings even though we're not enabling Ray Mirror and Transp. This is because if MOSAIC sees an environment map enabled on an object it will use its material's ray mirror and transp settings on the map as if it were raytraced. This allows more advanced control such as fresnel over the environment map. If an environment map is enabled you will need to first disable it before being able to use raytracing even if you enable the "Ray Mirror" and "Ray Transp" toggles (maps take precedence since they involve render passes to MOSAIC).
Just for a nice effect let's also enable some fog. Go to Blender's world material settings and set the HorRGB color to 0.289,0.542,0.817. Also enable "Mist" and set "Dist" to 30. The other default settings should work but you may want to play with them to get other effects :)
Finally we need to setup the camera for DOF by switching on the camera's Limits and adjusting the Dof Dist (yellow cross) so that it's near the front of the big Suzanne. This will tell MOSAIC where the focal point for the DOF will be.
Setting up MOSAIC
Now that we have the camera, lights, objects and materials setup now it's time to setup MOSAIC. Before we begin be sure to go to the "MOSAIC Settings" tab and make sure you have "Aqsis" selected in the preset menu.
In the previous posts I briefly mention the mapping utilities and several buttons related to this, let's describe this in a little more detail.
The mapping utilities collectively are just a series of buttons throughout MOSAIC interface that allow you to create and edit map related render passes. You can find these button connected to the thing they make a map for, such as occlusion maps with scenes, environment maps with objects, shadow and caustic maps with lights. Once clicked , you will be presented with a dialog that allows you to setup how you want the map to be generated and how you want its contents updated. When complete MOSAIC will generate a render pass entry in the "Project Setup" tab and a scene to use as the pass using the name of the object and a special extension as its name (such as lamp.sm, see post 5 for details). Once the pass is created the button for the utility will be pressed in (letting you know at a glance if the pass already exists), if you click on the utility button again the scene and all its render pass entries will be removed. You can click the "edit" button next to the utility buttons to edit an existing pass without destroying its contents. The mapping dialogs have a set of controls that are standard for all dialogs and some that are specific to the map type.
Here are some of the standard ones:
- SizeX/Y - These are standard controls for all utilities and adjust the width and height of the map.
- Use Shaders - This is standard for all utilities and if enabled the shaders for the scene are used in the pass. This should be turned on if the map needs to see displacement mapping or surface shader related transparency (for deep shadows, etc). This is best left off for faster render times unless needed.
- Use Preview - This is standard for all utilities and if enabled the pass will use the framebuffer display (will popup a render window). This should only be enabled if you wish to see the passes render output.
- Degrees/Scale - This is standard for all utilities and has different meaning depending on the object type. If this is an environment or point shadow pass then this controls the seams for the cube mapping, if this is a sun lamp then this is orthographic scale (usually good to start a 9 or so), if this is a spot light then it does nothing (lens determined from spot size). In the case of occlusion mapping this does nothing because the occlusion rig uses spot lights.
- Shading Rate - This is standard for all utilities and sets the shading rate for the pass. This is by default set very high for lower quality but faster rendering (which is usually OK for support passes), set this lower for higher detail and higher for faster render times.
- Group - This is standard for all utilities and combined with the other filter settings control how the generated pass is built from the beauty pass. MOSAIC creates the pass from the current scene which becomes the passes beauty scene, the filter settings at the end of all utility dialogs tell MOSAIC what to use from the beauty scene. Depending on the pass type, some of these controls are always forced to certain values and some are available to the user. This one (group filter), is the most commonly used and just tells MOSAIC to build this pass only from objects contained in the specified group.
Now that we've covered a little about how mapping utilities work let's use them to setup the passes for this scene.
Set up an occlusion map
Just in case you were wondering, here are what some of the controls do:
- Hemisphere - This is exclusive to occlusion mapping and controls whether the occlusion rig is a hemisphere or a full sphere. MOSAIC does occlusion mapping by creating a mesh in the pass and dupliverting a spot light to it, thereby making a dome light rig.
- Rig Segment / Rings - This is exclusive to occlusion mapping and controls the number of segment and rings used in the occlusion rig. The higher these numbers the more lights are used in the rig.
This will produce an occlusion map that Aqsis will use to calculate occlusion.
The occlusion color is set by the world's HorRGB color and its intensity is controlled by each material's Amb slider, just like Blender.
Set up an environment map
Once you've clicked on the big Suzanne go to the "Geometry Setup" tab and click the
"Enable Environment Mapping" button.
Unlike last time instead of using all defaults enable the "Use EnvDOF" toggle and set
"fstop" to 600.
This will produce a glossy like reflection by using DOF to make objects further away
blurry (in this particular scene it's not very visible so could be skipped).
Set up a shadow map
Mapping" button. The default settings should be fine for this, but note if we weren't
wanting displacements in shadows we could cut render times by disabling "Use Shaders".
Set up a caustic map
We also want to click "Enable Caustic Mapping" for this light but instead of using all the defaults set "Group" to "Group" (or whatever group you assigned the big Suzanne toearlier).
We need to do this because by assigning a group to the filter, this pass will only use
objects in that group, in this case that's just the big Suzanne.
Since we only want caustics for that one glass object then this works well, if you were to
add more glass objects with caustics you would just assign them to the same groups.
Set up camera DOF
Finally the last thing we need to setup is the camera.Click on the camera and go to the
"Cameras Setup" tab.
Enable the "Use DOF" toggle and
set the "fstop" to 240.
This tells the renderer to use DOF
and MOSAIC will set the focal point
to the camera's Dof Dist setting.
At this point we can now render a
basic scene but you'll probably
notice that the environment map
renders get "eyesplits" errors and
overall the rendering is slow.
Also the scene lacks the interesting procedural displacements.
Adding, building and using RenderMan shader sources
Let's go ahead and play with some RenderMan procedural shaders :) If you've installed a full version of MOSAIC you will have a folder in the installation called "shaders", let's use a couple of the shaders in there. In Blender setup a window to the "Text Editor", click "File" and browse to MOSAIC's "shader/displacements" folder and load two shader sources: "dented.sl" and "bubbly.sl". When shader sources are loaded into Blender's text editor MOSAIC can use them automatically, but in order to use them in the project we need shader fragments. To do this go to the "MOSAIC Utilities" tab and click "Generate Shader Fragment". Once clicked, select the "dented.sl" and "bubbly.sl" one at a time to automatically generate shader fragments for those shaders. Once shader fragments have been generated then you can select them in the "Shader Parameters" menu to manually edit them (and of course you can now use them in the "Materials Setup" tab).
Now that we have shader fragments let's edit them so they look like my example. Select "ds_bubbly" in the "Shader Parameters" menu and edit the following (including the square brackets):
- Kd = [ -0.15 ]
- bubsize = [ 0.5 ]
For the "ds_dented" the default values will be fine. Now that we have tweaked our shader values let's apply them. Select the big Suzanne and go to the "Materials Setup" tab (make sure this really is the material for the big Suzanne). Change the "Displacement Shader" entry to "ds_dented", this will apply the dented shader to this material which is applied to the big Suzanne. Next select one of the instanced smaller Suzannes, go to the material setup tab and change the "Displacement Shader" entry to "ds_bubbly". This will apply the bubbly shader to this material which is applied to all the instanced Suzannes.
That's it for using shader sources, very easy :)
Tweaking RenderMan settings
At this point everything should begin looking like the example render I've provided, but you're probably getting errors on the environment passes and things are a little slower than they should be, so let's look at optimizing this scene for RenderMan :)
Eyesplits happen when geometry passes through the eye plane of the camera (it helps to think of this as the near clip visually), when this happens the renderer has to continue to dice and split the geometry into finer pieces to create a clean edge. How many times this happens is controlled by the "eyesplits" control in the "Scenes Setup" tab, but you want to be careful because eyesplits are very slow and can usually be avoided. One of the first things to look for when getting eyesplits is whether the camera is too close to any geometry, when rendering environment maps the camera is placed at the center of where the object is (which is usually very close to other objects). To correct this one of the simplest things to do is decrease the DisplaceBound setting. The DisplaceBound setting basically extends the bounding box of an object to make extra room for displacement shaders, this is necessary because RenderMan renderers are really sensitive to the bounding box since it's used to determine how far to calculate the shaders. The bounds have to be manually adjusted because the renderer has no way of knowing how far the displacements are passing outside the bounds box. By default MOSAIC uses 0.100 for all objects which is actually very large (I did this so all displacements would work for beginners).
So, I said all that to say this, to remove the eyesplits error for the environment map and increase overall render performance change the "DisplaceBound" settings in the "Geometry Setup" tab for each object to these:
- plane = 0.010
- big Suzanne = 0.010
- smaller Suzannes = 0.030
Another small tweak that can help performance depending on your machine and memory is to increase the "bucketsize" in the "Scene Setup" tab to 32. This determines how large each render bucket is and will usually use more memory the larger it is but render each bucket a little faster (up to a point).
Tweaking shaders via MOSAIC's GUI
The built-in shaders that come with MOSAIC have several parameters that have no where to hook into Blender's interface.
One thing to keep in mind when tweaking these are that they are global in scope, this is because the same shader fragments are usually used by everything in the project (this is possible because tokens allow each object to pass different settings through the same fragment).
One way around this would be to copy the built-in fragment and apply it to the individual objects you wanted.
Here's some parameters on "ls_MOSAIClight" I've tweaked to improve the caustic effect by coloring, smoothing and adding a little procedural noise:
- CausticAlpha = [ 0.7 ]
- CausticColor = [ 0.0 1.0 0.6 ]
- CausticSamples = [ 256 ]
- CausticBlur = [ 0.12 ]
- noisefreq = [ 1.5 ] (this turns on noise)
Well that's it, thanks to everybody who's encouraged me to continue writing these blogs (it's been a lot of work).
Also a big thanks for everyone who's played a part in making MOSAIC better, it's absolutely amazed me how people's ideas, encouragements and bug reports have made MOSAIC far better then I ever planned :D
Thanks for reading, WHiTeRaBBiT
Saturday, July 19, 2008
MOSAIC feature ramblings - part 11
Part 11 - The Materials Setup tab and raytrace attributes:
MOSAIC uses Blender materials as the place to apply RenderMan shaders and attributes related to surface shading, in particular you can apply surface, displacement, interior volume, exterior volume and area light shaders as well as both integer and string based raytrace attributes.
Since MOSAIC exports all material associations to geometry including multiple materials per object and datablock, there is a wide range of possibilities.
Traditionally RenderMan shaders are applied to individual objects, but with MOSAIC you can apply shaders to materials and assign multiple materials to portions of the same mesh allowing much more complex setup and rigging. The exporter automatically separates the mesh into different objects to be shaded, when using an area light shader the geometry is placed with the light declarations before any other geometry (area light shaders are for true geometry based illumination and is not the same as the area light type which is only a light array).
The "Materials Setup" tab also has a set of attribute menus for setting the material's raytracing behavior. In RenderMan you can use these attributes to define whether a surface is visible to specular (shadows), diffuse (occlusion) and photons (caustics). There are two forms of these settings with varying support by different renderers, the older string type and the newer integer type (see your renderer's documentation for detailed instructions on how these attributes work). MOSAIC uses your renderer preset selection (in "MOSAIC Settings" tab) to automatically setup all new material settings to use the type best suited for your renderer. By default all options are on so you can immediately begin using raytraced shadows, occlusion and caustics :)
Since MOSAIC provides tokens that can hook Blender controls to shader parameters (see "Shader Parameters" in the "MOSAIC Utilities" tab) the built in shaders automatically use the most common Blender material controls. At the moment only the most important controls are linked, and not all of them behave the same as Blender... but after this series of blogs my next big project is to add almost all light, material and world controls into the shader system with near identical behavior :)
Here's a list of which material controls are currently hooked to the default shaders:
- Halo (this will turn all geometry including hairs into point clouds)
- HaloSize (this not only controls point size but also the base width for hairs)
- Add (this controls hair tip width relative to base width)
- HaloPuno (if enabled MOSAIC attempts to export normals for hairs to create ribbons)
- Shadeless
- Shad A
- Col RGB
- Spec RGB
- Mir RGB
- A (Alpha)
- Ref
- Spec
- Hard
- GR: (light groups do not use "Exclusive")
- Tralu
- Amb (this controls both hemi light and raytraced and mapped occlusion)
- Emit
- Ray Mirror (this will enable raytraced reflections but if "Enable Environment Mapping" is enabled on any object using this material it will be used for reflections regardless of this toggle)
- RayMir (this controls both raytracing and environment maps)
- Fresnel (this controls both raytracing and environment maps)
- Ray Transp (this will enable raytraced refractions but if "Enable Environment Mapping" is enabled on any object using this material it will be used for refractions regardless of this toggle)
- IOR (this controls both raytracing and environment maps)
- Fresnel (this controls both raytracing and environment maps)
- Sub Surface Scattering (this enabled a depth map based sss effect therefore it's recommended you use this with shadow mapped lights, however you can manually adjust the SSSWidth parameter for ls_MOSAIClight to get similar result with raytracing)
- Scale (adjusts the SSS strength)
- Radius R
- Radius G
- Radius B
- IOR (adjusts the sss map blurring)
- Error (adjusts the sss map bias)
- Scattering color
- Col
- Tex
- Front
- Back
- Also the world "Ambient Occlusion" toggle enables a non cached raytraced occlusion using the worlds HorRGB color (mapped based occlusion is enabled in the "Scene Setup" tab independently of this toggle.
The surface shader also support texture channels. All "map to" channels are currently supported and work similar to Blender with one exception, only one texture of each channel type can be used for each material (I intend on changing this to match Blender's behavior by using arrays of texture names in the future). Something else to keep in mind with textures is that MOSAIC only supports the "image" texture type not any of the procedurals (that's what RSL is for), and that when loading an image you should probably stick with .TIFF since most RenderMan systems have problems with anything else. Also remember to use the "Texture Export Options" in the "Project Setup" tab to disable any textures you're not using.
Here's a list of which material texture controls are currently hooked to the default shaders:
- UV (only uses this coordinate type, any other is default to primitives type)
- ofsXYZ
- sizeXYZ
- All "Map To" channels supported
- Col
- Nor
- Disp (controls displacement map height)
That covers most of the high points of the materials tab so let's go ahead and list its groups and controls:
Navigation and RIBset management:
This group of controls is at the top of the tab and allows you to select available cameras, updating all controls and Blender selections accordingly. It also has controls for creating, deleting and selecting RIBsets for this tab.
Here's a breakdown of the controls in this group:
- Select Material - This will show a list of available materials for selection, once selected it will update all controls in this tab.
- Select RIBset -This will show a list of available RIBsets for selection, once selected it will update all controls in this tab.
- Create New RIBset -This will create a new RIBset from the current RIBset control settings and select it.
- Delete This RIBset - This will delete the currently selected RIBset and select the DEFAULT RIBset.
Code management:
This group of controls is for attaching user created code fragments (text files with the "cf_" prefix in their names) to the beginning and end of different RIB blocks. As with the previous group, this group of settings is available in various configurations for all the remaining tabs.
Here's a breakdown of the controls in this group:
- Material Archive -This menu allows you to specify whether the exported RIB code for cameras is exported into separate RIB archives or inlined into the object RIB.
- Material Begin Code - This allows the insertion of custom code fragments into the beginning of the material block before anything MOSAIC exports.
- Material End Code - This allows the insertion of custom code fragments into the end of the material block after anything MOSAIC exports.
Shader management:
This group of settings is available in various configurations for all tabs and is for selecting shaders for the selected material.
Here's a breakdown of the controls in this group:
- Surface Shader - This allows you to select a surface shader from a list of available system or loaded shaders.
- Notes - This will display a popup of any notes attached to shader fragments by the author (usually containing information about which Blender controls are used by this shader).
- Displacement Shader - This allows you to select a displacement shader from a list of available system or loaded shaders.
- Int Volume Shader - This allows you to select an interior volume shader from a list of available system or loaded shaders. Volume shaders are similar to atmosphere shaders but for filling volumes of space.
- Ext Volume Shader - This allows you to select an exterior volume shader from a list of available system or loaded shaders. Volume shaders are similar to atmosphere shaders but for filling volumes of space.
- Area Light Shader - This allows you to select an area light shader from a list of available system or loaded shaders. Area light shaders are for turning geometry into true area lights, but are only supported by a few renderers and usually require special shader ops.
Options and attributes:
This group of controls is for setting material related options and attributes for this material.
Here's a breakdown of the controls in this group:
- transmission - Is this material visible to transmission rays (casts shadows)? This control uses both the new integer style (on or off) and the older string style (sets how shadows cast through material such as "transparent", "opaque", "shader", "Os").
- specular - Is this material visible to rays created by trace() (receives shadows)? This control uses both the new integer style (on or off) and the older trace command.
- diffuse - Is this material visible to color bleeding and occlusion (new integer style)?
- photon - Is this material visible to photons such as caustics (new integer style)?
- camera - Is this material visible to the camera (new integer style)?
- Shading Model - Which shading model to use when scattering photons (newer style)?
- transmissionhitmode - How is opacity for transmission rays determined?
- specularhitmode - How is opacity and color for specular rays determined?
- diffusehitmode - How is opacity and color for diffuse rays determined?
- camerahitmode - Allows you to control culling of geometry behind camera's visibility.
- Use Material in Animations - This option allows you to manually take advantage of a "speed hack" in MOSAIC. This option can drastically improve export times in an animation for any material that is not animated. If enabled then MOSAIC will only export this material on the first frame of this animation and will then just re-use it without recalculating any of its data.
- Flip "U" Tex Coor - This allows you to manually flip the exported "U" UV value for this material (handy when certain image formats are working but inverted in the U direction on your renderer).
- Flip "V" Tex Coor - This allows you to manually flip the exported "V" UV value for this material (handy when certain image formats are working but inverted in the V direction on your renderer).
- Shader MBlur - This enables the motion blurring of the material's parameters. This is particularly helpful for blurring displacement animations (if your renderer supports this).
- frames - This specifies the number of frames to blur across.
Note : MOSAIC begins the blur by this number before the current frame so blur leads to current frame.
Well, that's it for the materials tab... next up a deeper explanation of using the mapping utilities :)
Thanks for reading, WHiTeRaBBiT
Friday, July 11, 2008
MOSAIC feature ramblings - part 4
Part 4 - The MOSAIC Utilities tab and shader fragments:
From the previous blog we've learned that shaders are simply text files that are compiled and used by the renderer, but in order for the renderer to use them it must be told how. In RIB files this simply involves calling the name of the shader with parameters that control different aspects of the shader, this is really no different then selecting a material in Blender (shader) and then adjusting its controls (shader parameters). Shader fragments in MOSAIC are nothing but RIB shader calls put in a Blender text file with a special extension in the name (see MOSAIC Settings "Fragment Filters" to see what they are). These files can be made by hand in Blender's text editor but as we'll see later it's far easier to use the "Generate Shader Fragment" utility instead ;)
Render passes is simply a technique of re-rendering a scene with different settings or setups to generate data to be used by the final "beauty" pass render (which is different then Blender's render layers). This poses a few problems with the exporter because there are many potential techniques that require some level of hand tweaking outside of automation. To get around this problem MOSAIC is using linked object scenes as render passes. Linked object scenes in Blender are simply copies of a scene with all object linked to the original, this way changes made in one scene affect the other. MOSAIC manages these scenes in the "Project Setup" tab which I will discuss in the next blog.
What I want understood for now is that render passes are scenes with special entries in the "Project Setup" tab, also note that unless you're doing advanced custom work most basic render passes can be generated for you by MOSAIC :)
OK, now onto the utilities, I'll list them like previous blogs but will expound on several more than usual.
Update Built-in Shaders/Frags:
MOSAIC automatically generates several built-in shader sources and fragments for the default shading system. This system allows MOSAIC to work "out-of-the-box" with Blender's material, light, and world settings. You can see these shaders and fragments by browsing Blender's text editor after starting MOSAIC. These files must always exist (since they are the defaults) and are automatically created if they don't exist or were deleted, however they are left alone if they already exist or are modified.
This works great unless you're opening an old project with old built-in shaders or accidentally damage them. Instead of having to select and delete the old ones by hand in the text editor (a real pain if you also already have a ton of custom shaders and fragments) you can simply click this to update all built-in shaders and fragments automatically.
Copy Properties:
This simple utility allows you to copy the MOSAIC settings from the active object to all other selected objects of the same type. So for instance if you select everything in the scene but the active object is a light then its settings are copied to all other lights in the selection but no geometry, etc.
Note : If you didn't already know, Blender allows multiple selections of objects but there is always one "active" selection that is usually visually a little lighter.
Clear Properties:
This utility does the opposite of the previous, it removes MOSAIC settings from all objects in the selection. It also doesn't care what the active object is, but just simply uses all objects in the selection. One special feature of this utility is if nothing is selected then it will remove all settings from everything in the entire project (including scenes), this is a great way to quickly reset an entire project.
Reload Texts:
Blender's text editor allows you to create text files but also allows you to load them from the file system. This is the common method you would use for loading shader source files to be used and distributed in your blend project. When texts are loaded in Blender it maintains a path to were the original file is. This utility uses that information in all text files in Blender's text editor to reload them from the originals (if they still exist). This is really handy if you've loaded shader sources generated by a shader utility (such as SLER or ShaderMan.next) that you are still editing externally. The process would go: tweak shader in the external editor, preview it, like it, click "Reload Texts" in MOSAIC, render our preview in Blender, continue over again, etc.
Save Texts:
This is the opposite of the previous utility. Instead of loading all Blender text files from their originals, it saves all Blender text files TO their originals (if they exits). This would be for the opposite process of editing and rendering text files in Blender but using them in an external utility.
Generate User AutoPass:
I'll cover render passes and autopasses in more detail in the next blog, but for now I'll just say this lets you build custom passes that you need MOSAIC to partially maintain for you. This utility will not only generate the scene with appropriate extensions, it will also add a render pass entry in the "Project Setup" tab for you.
Remove Pass:
In certain animation projects it's possible to have a pass with a lot of render pass entries. This can become a pain if you want to remove a scene and have to find and remove all the render pass entries. This utility will automatically remove a scene as well as all render passes entries that use it.
Cleanup Passes:
This utility aids in removing "orphaned" passes, this may happen if you change the name of an object or light and remove the old entries in the passes list but forget to remove the scene. This will remove any autopass scenes that do not have any entries in the render pass list effectively cleaning unused scenes in the project.
Generate Shader Fragment:
This utility is the corner stone to managing shaders in MOSAIC. Its job is to find shaders in your setup and turn them into shader fragments that you can then edit and attach to your project through MOSAIC. When you click this your will see a list of available shaders to generate a fragment from, this list is generated from two sources:
- Lists all .sl shader source files it finds in the Blender text editor.
- Lists all compiled shader files it finds in all enabled shader libraries (discussed in previous blog).
You can also select "MANUALLY ENTER" at the top of the list to type the name of a shader that you know is already available on the console from global system variables (most render packages have the standards setup by default).
Note : By enabling and disabling shader libraries, you can limit this list to just the group you want, however be sure to re-enable those libraries or their shader won't work. Once you select a shader MOSAIC will call the package's shader info binary to get a list of its parameters to generate a shader fragment from. If there's a problem you should check the console to see what caused the problem.
Shader Parameters:
This utility allows you select available shader fragments for editing and preview. To use this utility simply click the drop down menu and select a shader fragment to edit (notice that built-in shaders are always available). Once selected the parameters for the shader will show below the menu, you can also use the row of buttons to right of the selection as follows:
- "R" allows you to reload the shader fragment (if you are editing it by hand in Blender's text editor).
- "C" will create a new shader fragment from the current (the new fragment will be automatically selected when you finish).
- "X" will delete the current shader fragment.
- "P" will generate and render a special preview of the current shader selection and settings. Before previewing a dialog box will popup giving you a chance to tweak the preview scene.
Below these you will see a series of controls allowing you to select the type of shader, its name and its notes. Notes allow you to place notes in the fragment that can be seen throughout the rest of MOSAIC's interface anywhere that shaders are selected, this makes it easier to quickly remember how a shader works for the artists. Every row after that are the shaders parameters. Each row has the following controls:
- "Use" allows you to disable this parameter from the fragment, this can be handy if you have an old renderer that doesn't like the syntax of this line (such as BMRT).
- "TW" stands for "Token Wizard" and allows you to select from a list of available MOSAIC tokens based on shader type and parameter type. Tokens allow you to "hook" a Blender GUI control into this parameter. Each token name begins with a prefix that describes where it is in Blender's interface such as "World" or "Mat" and tries to use the exact name that Blender uses for that control. Depending on the token selected you can also set the texture channel and adjust Blender's control range into other ranges (such as adjusting a 0.0-0.1 range to 0-10 range). You can also just select "Shader Default" at the top of the TW menu and the wizard will return the value the shader author intended for default (a great way to safely reset a parameter).
Note : The token discussion can get very lengthy so I'll cut it off here but I will elaborate eventually when I re-write the Wiki ;) - The parameters class.
- The parameters type.
- The parameters array allows you to specify an array of settings such as [2].
- The parameters name.
- The parameters value. This is where any generated tokens will go, your also welcome to hand type or adjust any tokens here as well as type just straight values.
Note : This is just a text field so you'll need to type the value "exactly" as its needed in RIB including adding [] brackets, this is so any parameter syntax is possible.
Well that's it for the settings tab, as usual it was a lot longer then I figured but hopefully informative. For the next post I'll discuss using the "Project Setup" tab and render passes ;)
Thanks for reading, WHiTeRaBBiT
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:
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.
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).
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.
Thursday, February 07, 2008
Labels
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.
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.
Subscribe to:
Posts (Atom)
