version (2.93 KB) by Larry Kyrala
Given a figure mesh, export it to a RenderMan RIB file.


Updated Thu, 01 Sep 2016 15:12:11 +0000

View License

This function takes a figure and exports it to a RenderMan RIB file for use with any RenderMan compliant renderer.
For example, executing the demo 'logo.m' (from the Gallery), you can then export it to rib by entering:
>> fig2rib(gcf,'logo.m')

I rendered the screenshot with PIXIE (

Fixed in this version:
- changing the camera angle in the figure and then exporting *should* work, but it doesn't.

- this is an alpha proof of concept.
- this only works with meshes right now. parametric surfaces aren't supported yet.
- roughness is defined by an adhoc inversion of specularexponent... this may not be a good approximation in all cases.
- output has only been tested with PIXIE so far, but should work for other renderers.

Cite As

Larry Kyrala (2022). fig2rib (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!