General Category > ASL Scripts

RIBRobin Toolkit

(1/5) > >>

Raxx:
Introduction
Welcome to the RIBRobin Toolkit! This series of scripts lets you setup a scene right in the object editor for export to either 3Delight or RenderPixie!


Current Features









Camera
 


* Implementation: Click on icon in left toolbar, click and drag anywhere in work space. Double click to set values.
* Width: Width of image that'll be rendered. Represented by the relative width of the camera's viewing rectangles. [640]
* Height: Height of image that'll be rendered. Represented by the relative height of the camera's viewing rectangles. [480]
* FOV: Field of Vision. [60]
* NearClip: Anything closer to the camera than this gets culled. Represented by the rectangle in front of the camera mesh. Non-uniform scale on the y-axis changes this value. [50]
* FarClip: Anything farther from the camera than this value gets culled. Represented by the rectangle furthest from the camera mesh. [1000]
* DOF:Enables Depth of Field. DOF does not render when Ambient Occlusion or orthographic is enabled. When activated, the camera receives a series of circle guides in its viewing range that represents the "circle of confusion" at that depth. Basically, the larger the circle, the more blur there will be at that spot. Giving DOF a value of 2 gives it a very dense representation (one circle every 10 units), whereas giving DOF a value of 1 makes it more sparse (one circle every 100 units). A value of 0 disables it. [ 0 ]
* f-stop: To make it easier to understand, just think of f-stop as a "scale" of sorts. The smaller the number, the larger the circles get. You can use either his or Focal Length or both. They scale the same way except at different values. [ 0.5 ]
* Focal Length: This also scales the circles of confusion. A higher value equals a larger scale. Combine this with f-stop to get the blur you want. [ 45 ]
* Focal Distance: The image is sharpest at this distance away from the camera. This is represented by a division located between the near and far clip. You'll notice that the circles of confusion are at its thinnest at this point. The best strategy is to set this value first before messing around with Focal Length and Focal Distance. [ 500 ]
* Orthographic: Changes the camera from perspective to orthographic. The camera's lines that represent its field of view change form accordingly. Non-uniform scale on the x-axis changes its width/height. [ 0 ]

Ambient Light
 



* Description: This object lights the entire world evenly, and is non-directional. You can place it anywhere in the scene and it'll have the same effect.
* Implementation: Click on icon in left toolbar, click and drag anywhere in work space. Double click to set values. The Emmissive RGB values in its corresponding material determine the light's color.
* Intensity: Intensity of the light. For ambient lights, it needs to be set fairly low[100]



Distant Light
 



* Description: This object lights the entire world evenly, in one direction. You can place it anywhere in the scene and it'll have the same effect. It's the same as Anim8or's infinite light.
* Implementation: Click on icon in left toolbar, click and drag anywhere in work space. Double click to set values. The Emmissive RGB values in its corresponding material determine the light's color, and the arrow's direction shows the light's direction
* Intensity: Intensity of the light [ 1 ]
* Casts Shadows? (Scanline not implemented yet): 0 = disabled, 1 = enabled. [ 0 ]
* Shadow Samples: Number of samples shadows are rendered at. [16]
* Shadow Width: The "softness" of the shadow. [1]



Spot Light
 



* Implementation: Click on icon in left toolbar, click and drag anywhere in work space. Double click to set values. The Emmissive RGB values in its corresponding material determine the light's color.
* Intensity: Intensity of the light. For spot lights, it needs to be set fairly high. (Poorly) Represented by the light's cone distance[Uniform Scale]
* Cone Angle: This is the overall cone angle of the spot light. [ 30 ]
* Delta Angle: This is the "inner" angle of light. Light will focus harder on this width when given a high beam distribution (maybe)  [ 5 ]
* Beam Distribution: The higher the number, the more "focus" it has. [ 2 ]
* Casts Shadows?: 0 = disabled, 1 = enabled. [ 0 ]
* Shadow Samples: Number of samples shadows are rendered at. [16]
* Shadow Width: The "softness" of the shadow. [1]


Point Light
 



* Implementation: Click on icon in left toolbar, click and drag anywhere in work space. Double click to set values. The Emmissive RGB values in its corresponding material determine the light's color.
* Intensity: Intensity of the light. For point lights, it needs to be set fairly high. [100]
* Casts Shadows?: 0 = disabled, 1 = enabled. [ 0 ]
* Shadow Samples: Number of samples shadows are rendered at. [16]
* Shadow Width: The "softness" of the shadow. [1]








AO Options
 



* Description: This shape carries the ambient occlusion options for you to tweak its settings as needed. Please note that all but the first three settings apply only to point-cloud AO, and most of those are for 3Delight only. Fully raytraced Ambient Occlusion is mostly automatic, except you can set its bias and samples here. All default settings should turn out decent results for most cases.
* Implementation: Click on icon in left toolbar, click and drag anywhere in the work space to create it. Double click object to set values.
* Enabled: 0 = disabled, 1 = enabled. [ 0 ]
* Bias: Offsets the computation points a bit above the original surface. This can be necessary to avoid self-occlusion on highly curved surfaces. In other words, higher numbers can reduce artifacts, but may cause other problems. [ 1 ]
* Falloff: This shapes the falloff curve based on Falloff Mode. Scanline- and 3Delight-only.[ 0 ]
* Falloff Mode: 0 is exponential, 1 is polynomial. Scanline- and 3Delight-only.[ 0 ]
* Max Distance: Can decrease render times in large scenes if you set the max distance to only the range you want to shadows to be calculated, but otherwise changing this value won't give a noticeable bump in speed[ 1e+005 ]
* Clamp: Point-based AO (scanline) usually computes too much occlusion, so set this to 1 to make it look good. Nearly doubles the render time. Scanline- and 3Delight-only. [ 0 ]
* Max S. Angle: Max Solid Angle is a straightforward time-vs-quality knob. It determines how small a cluster must be for it to be a reasonable stand-in for all the points in it. Reasonable values seem to be in the range 0.03 - 0.1. Lower numbers = better quality. [ 0.05 ]
* Sample Base: A number between 0 and 1 that determines the jitter for computation points. Setting to 0.5 or higher may be necessary to avoid thin lines of too low occlusion where two (perpendular) surfaces intersect. Scanline- and 3Delight-only. [ 0 ]
* GUI Size: This is how big the Scene Options dialog will look in your workspace. You can scale it with the uniform scale tool, so usually you don't have to bother setting the numbers manually.[ 1 ]



Render Passes
 



* Description: If you want to save each major channel (diffuse, ambient, alpha, etc) into a separate image file, you can set that option here
* Implementation: Click on icon in left toolbar, click and drag anywhere in work space to create it. Double click object to set values. 0 is disabled, 1 is enabled
* Diffuse: Diffuse channel (development still in progress)[ 0 ]
* Ambient: Ambient channel (development still in progress)[ 0 ]
* Depth: Depth channel (development still in progress)[ 0 ]
* Alpha: Alpha channel (development still in progress)[ 0 ]
* Specular: Specular channel (development still in progress)[ 0 ]
* GUI Size: This is how big the Render Passes dialog will look in your workspace. You can scale it with the uniform scale tool, so usually you don't have to bother setting this number manually.[ 1 ]



Scene Options
 



* Description: This shape carries scene options that will override or dramatically change how your scene normally looks.
* Implementation: Click on icon in left toolbar, click and drag anywhere in work space to create it. Double click object to set values.
* Renderer: 0 = 3Delight, 1 = Aqsis, 2 = RenderPixie. There are specific features where the output has to be changed specifically for the renderer you are using. Hence this option so that it will be automated for you. [3Delight]
* Pixel Samples: This is your anti-aliasing. Higher numbers will reduce the jagged edges more, but also increases render time. [ 4 ]
* Ambient Occlusion: 0 = disabled, 1 = enabled. Converts your scene render to AO. Lights do not affect the outcome, so it's easy to flip the switch for an AO pass[ 0 ]
* AO Samples: The higher the number, the more samples and therefore the better it'll look, at the cost of render speed. [ 32 ]
* Bias: A lower number can introduce more AO artifacts but it'll look sharper. Best to adjust at small doses [ 1 ]
* GUI Size: This is how big the Scene Options dialog will look in your workspace. You can scale it with the uniform scale tool, so usually you don't have to bother setting the numbers manually.[ 1 ]


Setup, Exporting, and Rendering
Download the Toolkit using the link in the Release log. The .zip file will include multiple .a8s (Anim8or scripts) files, folders, .sl (shader) files, and Convert.exe (converts image files). Delete ALL previous versions of RIBRobin completely! Then extract the entire contents of the folder into your Anim8or Scripts directory.

Current structure of the .zip file contents:

* /archives - directory that holds all associated .rib files that are called by your main .rib file
* /shaders - directory that holds all source shaders that the shader compilers look in and compile to.
* /textures - directory where convert.exe and the renderer's texture optimizer place converted textures for use by the .rib file
* convert.exe - ImageMagick program that the .bat file uses to convert all textures to the .tif format
* IMGMAGICK_LICENSE - ImageMagick's license. Read it if you feel like it.
* readme.txt - Readme file that gives some trivial info and points to this forum topic
* RIBRobin_Camera.a8s - Anim8or script that contains the Camera shape
* RIBRobin_Export.a8s - The brunt of the RIBRobin work is done by this file
* RIBRobin_Light_Ambient.a8s - Ambient light shape
* RIBRobin_Light_Distant.a8s - Distant light shape
* RIBRobin_Light_Point.a8s - Point light shape
* RIBRobin_Light_Spot.a8s - Spot light shape
* RIBRobin_Scene_AO.a8s - Ambient Occlusion dialog shape
* RIBRobin_Scene_Options.a8s - Scene Options dialog shape
* RIBROBIN_Scene_RP.a8s - Render Passes dialog shape
Set up your scene with the Toolkit's camera, lights, and other RIBRobin shapes available in the left toolbar. Set your renderer by double clicking the Scene Options object after you created it in the workspace. You can set up other parameters in the Scene Options shape, the Ambient Occlusion shape, the Render Passes shape, and the Camera shape. All other shape objects have parameters pertaining specifically to the Renderman component that it represents.

If you're ready to export, go to Object->Export... and select the Renderman (.rib) file type, specify the file name and directory (it can be any locations), and hit Save.
IMPORTANT: The exporter doesn't just save a .rib file. It also saves .sl (shader language) files that are needed by the .rib file, and a .bat file that compiles the textures and shaders and then renders the .rib for you, via command line. The .bat file gets saved in the same directory as the main .rib file. All other files get saved into the folders mentioned above and don't need immediate attention unless there was an error.

So to render your .rib file, assuming you have your renderman renderer installed and you set the correct one in the Scene Options shape, double click on the .bat file that was generated in the same directory as your .rib file. It'll be called something like x_y_z.bat, where x is the same name as the .rib file, y is the name of the object you exported from, and z is the name of the renderer. It will perform four steps depending on your scene's contents:


* Associated textures will be converted to .tif using Convert.exe and saved in the textures directory
* Those converted textures will then be compiled into whatever format the renderer requires, using that renderer's texture optimizer.
* Any associated Shader Language (.sl) files will be compiled using the renderer's shader compiler and saved in the shaders directory
* Finally, all associated RIB files will be rendered. The final image will be a .tif file with the same name as the .rib file you saved.
Notes

* Do not rename any of the RIBRobin shapes. The export script relies on their names to recognize what they are and how they should be processed.
* There can only be one camera, named RibRobinCam01
* When you download and install the Toolkit, make sure you delete all older RIBRobin Toolkit scripts first. Some file name changes may have occurred resulting in old scripts not being replaced automatically
* If you update the toolkit and open an Anim8or file that contains shapes made from the older toolkit scripts, they may need to be replaced depending on what was updated.
* This toolkit uses ImageMagick for its image conversion to tif files.

RIB Rendering Software
The only RIB renderers supported are 3Delight and RenderPixie. I dropped Aqsis because it was too slow, buggy, and lacked features that the other two had. Not to mention RIBRobin's development is a lot faster now with one less renderer to stay compatible with.


* 3Delight - Commercial quality. One free license per user, restricted to 2 cores. Best one you can get at no cost.
* RenderPixie - Free, but not actively developed anymore. Fast and can make good images.

Development Milestone Markers
Note: Some features marked as complete may not have been released yet.

[ Complete ] [ Started ]

v0.3

* Add emissive attribute to phong shader
* Per-Poly Materials - As the name suggests, multiple materials per mesh object.
* Smarter .bat files - To save time, detect whether or not a texture or shader was modified before regenerating it.
* Smooth Angles - Creases get exported properly
* Render separate passes - Allows the user to render separate channels as their own images with the option to combine them automagically.
* Point-Cloud Based Ambient Occlusion - An automatic setting that renders an AO pass separately from the main renderer
* Render Alpha - Renders only the alpha channel
* Render RGB - Renders only the RGB channel
* Render Depth - Renders only a depth map based on near/far distances
* Shadows - Shadows are treated as separate entities, so they'll take a little bit of work.
* Focal Blur - Blurs a certain distance/area in the scene for more depth.
* Special Materials & Effects
v0.4

* Global Illumination - Automatically set up GI when given some parameters
* Limited Animation Support - Camera movement only
* Motion Blur - Blurs objects based on direction of movement.
* Special Materials & Effects - Reflection, refraction, caustics, etc. More details later.

Raxx:
Download Release v0.2a
Got a lot done again! All the issues $imon addressed are pretty much fixed, and then some. I'm pretty proud of my Depth Of Field solution :) On a side note, I'll try to update the documentation (it's kind of getting behind), but if anything play around with the RIBRobin and use common sense.

New Features/Fixes:

* Internal: Camera and Mesh rotations are now 100% accurate - That's right. I finally did it. I think.
* Cleaner Directories: All generated files get placed in subdirectories in your script path, so as to avoid clutter. You can still save and render your main .rib file anywhere you want.
* Normals & Texture Coords Fixed: Smooth angles are now represented properly. If there's a crease on your mesh it's gonna show in the render (unless it's a subdivision object). Texture coords used to not be transferred entirely, now it is.
* Materials Per Poly: You can now have multiple materials attached to one mesh. Take note: If it's a subdivision object you'll have a crease where the materials meet (unless they are on separate mesh entities). Try to avoid having more than one material per mesh since the extra sorting slows down the export speed considerably.
* Spotlights: Spotlights are a tiny bit better represented in the workspace...*shrug*
* Raytraced Shadows: Spot, distant, and point light raytraced shadows are enabled
* Scanline shadows: (or as close to them as you can call it) Spot and point lights enabled. Distant lights are going to probably take some time to implement. Please avoid setting them to cast shadows if you set the render type to scanline.
* Smarter .BAT files: .BAT files do not regenerate textures and shaders if it's not needed (saves time). It's still a little rough around the edges, and it'll feed you a lot of error messages, but it'll keep chuggin' along.
* Point-Cloud based Ambient Occlusion: Finally implemented. Note however that RenderPixie's version is a little bugged, there is no solution in the near future since it's entirely RenderPixie's fault :( I'll keep it on my to-do list should I find a work-around.
* Ambient Occlusion Dialog: This shape added for tweaking AO settings
* Aqsis support dropped: It's slow and has fewer features, so not worth the hassle
* Depth of Field: With a nice fancy indicator to show you where it's gonna be blurry. More explained in the first post.
* Separate Render Passes: This is also very rough around the edges. The diffuse and ambient channels aren't true representations (I just tossed what I could in there), so don't rely on it too much. It'll likely not be fully implemented until after the more advanced features are finished, since it's heavily reliant on the shaders.
* Multithreading: Renderpixie automatically did this, but now you can set the number of threads it renders with in the Scene Options.


Shadows Comparison (Raytrace is casting one extra light)




Point-Cloud vs Raytraced Ambient Occlusion




Depth of Field Demo




Known Bugs and Issues

* Emissive values don't transfer
* Texture weights don't transfer
* Environment Maps don't transfer
* Point-Cloud AO in RenderPixie is flawed
* Scanline rendering of Distant Lights that have shadows results in errors.
* The .BAT files have a lot of error messages in them when handling files that don't exist
* Diffuse and Ambient render passes aren't ideal
* In general, Scanline shadows are a bit buggy
* You have to run the .bat files as an admin in order for it to work. If you're the sole owner and administrator of your computer, then that's not an issue unless you have high security settings.
* Grouped objects don't convert properly
* .BAT files return a "Failed to find C" error message when rendering with RenderPixie-- but this should not break anything
v0.2 - [ Workspace Sample ] [ Ambient Occlusion Test ] [ Bump, Diffuse, Trans ]

* Scene Options: Scene Overrides changed to Scene Options. You also set the renderer in the Scene Options dialog instead of the camera.
* Dialog-based shapes: I'm proud to say I have a table generator that spits out strings automatically as if it were an actual word processor. You can see it in action in the Scene Options shape object. This will help me keep features more user friendly!
* Materials almost 100% converted: Emissive is giving me problems so it's not implemented yet. I will probably skip the environment maps and have it automatically convert to real reflections. ASL can't access texture weights, so for now all textures are set at 100% weight if applied.
* Internal: Fixed bug where the texture coordinates were vertically flipped
* Internal: AO is fixed for 3Delight and RenderPixie. The bias was too low, so I set it to 1. This is now an option in the Scene Options dialog.
* Anti-Aliasing: You can now set the Pixel Samples in the Scene Options
* Batch file update: .bat file is now more and less verbose
* RenderPixie render progress updates: RenderPixie renders now show progress in the framebuffer the way 3Delight does. Aqsis isn't supported since theirs is buggy.
* Automatic texture conversion: Convert.exe from ImageMagick is now included to automatically convert any of your textures to tif via the .bat file. Keep this file in the same location as the rib file.
* Spot light: It's similar to Anim8or's, but not the same. More details in the first post. The shape tries to reflect where the rays will be going, but it won't be a very accurate representation.
* Distant light: This is pretty much the same as Anim8or's infinite light.
* Point Light update: Tried representing the point light's intensity with specks of triangles scattered around, but it still sucks. Just bear with it and render test renders to verify all lights' effectiveness.v0.1c - [ Textures & Phong ]

* Ambient Light: As the name suggests, adds to the ambient value of the entire scene
* Internal: Better asset management--mesh objects are now saved as separate .rib files
* GUI: Point Light button icon changed
* Orthographic camera: Set to '1' in camera's parameters, then you can scale it using non-uniform scale along the X axis (left click drag), and for both ortho and perspective you can scale the far clip with non-uniform scale along the y axis (right click drag)
* Internal: Texture Coordinates are actually accurate
* Diffuse Textures: The first to be supported, the rest will follow
* Phong Materials: Nearly complete - materials convert pretty well, just needs some tweaking
* Log File: Gets generated, showing statistics from the renderer (3Delight only for now -- The others display it in the console)v0.1b - [ AO Prototype ] [ Multiple Lights ]

* Internal: Rewrote the orientation and position code so that instead of transforming all points around the camera, the script rotates the camera and then displaces the mesh objects. This will make it a lot easier to implement features in the future.
* Normals Fixed: I hope
* Light Positions Fixed: Lights weren't being positioned properly for some reason. Now they are.
* Ambient Occlusion: It looks weird I think because of issues with how the mesh is being built. That or it's the normals.v0.1a - [ Image ]
This is the first release. You won't get much useful functionality from this release, but if you're bored or would like to see how it works, feel free to download and try it out.

Raxx:
0.1b release above

$imon:
That's pretty cool, Raxx!

I tried it out with 3Delight on an old chair model and the result is pretty decent (see attachment). Except as you stated, the AO is a bit messed up on the seat (where there are a lot of poly edges together).

It rendered out a nice tif file with transparent background.

I think the prospect are pretty cool for this if you see the sample images made in combination with other programs.


A difficulty I had now: guessing what will and won't be in the camera's FOV. Not much I guess you can do about that, some trial and error solves it quickly.

I hope that you can keep expanding this - it could be a great asset to Anim8or!

Raxx:
Hey $imon, looks good! It makes me happy to see that it works for someone else as well.

It's true about the camera, which is why I have it represented exactly the same way that the scene editor's camera shows it. But yeah, it'll take some trial and error to get it "just right".

On that note, I do have to put a little warning in...so far converting from quaternions (which is what Anim8or uses) to Euler is not completely accurate. In fact, I don't think Anim8or even converts it 100% correct when you rotate stuff around. Internally it seems Anim8or sticks with Quaternions and then shows you its version of the Euler counterpart. What all this means is that until I figure out a way to get it 100% correct (if that's possible), the rotation of the camera will seem to be off by 1-3 degrees on one or more axis. However, it's not very noticeable nor all that important unless you require rendering with very exact camera orientations.

Navigation

[0] Message Index

[#] Next page

Go to full version