How to export a single object using the mosaic script?

Hey thr…I hv just been playing with the excellent Mosaic script and I ws wondering if it can export a single object from Blender…Say, I want to export just the suzanne mesh rather than the complete scene, so that later I can import it into my own scene using ReadArchive…Currently it creates a number of folders within the project folder…Please help…

Each object is split into several RIB files separated into different folder so different aspects of the object can be shared between other objects (such as shared geometry or material data). Also each object RIB is separated into different RIB for each frame of animation. The first RIB you will need will be one of the RIBs in the Archive/Objects folder, then usually that RIB will call a geometry RIB in Archives/Geometry and a material RIB in Archives/Materials. If the mesh has multiple materials applied to multiple faces there will be multiple geometry RIBs and material RIBs, also if there are particles they will be placed in separate RIBS in the geometry folder.

There’s a couple of ways to do this, depending on what you want:

  1. You could find the RIB you want in Archive/Objects open it and copy all referenced ReadArchive RIBs in it.

  2. You could Move every object but the one you want to a non visible layer in Blender, click “Purge Export Project Folder” to remove all exported RIBs and then re-export. The only RIBs left will be the ones necessary to render just that object.

If you want all RIB code in one archive you can also set the “Datablock Archive” for the object in MOSAIC’s “Geometry Setup” tab to “Inline Code” and set the “Material Archive” for every material applied to the object to “Inline Code” and all RIB code will inline into just the object RIB. Every tab in MOSAIC allows for in-lining code instead of read archives so its possible to pack all generated RIB for the whole project into just one RIB but is extremely inefficient that way and not recommened for normal renders :confused:

As a side note, since your messing with RIB code, you can also do things like create RIB files in external programs (such as Cutter) and insert the RIB in Blender using box objects and custom code fragments :wink:

Hey WhiteRabbit…Thnx fr the help…Declaring “DataBlock Archive” as inline did work for me…:slight_smile:

Initially I had a scene with just the suzzane mesh in it…which i exported as a RIB and later called it in cutter through ReadArchive.When I rendered it…it rendered in Top view.

Now i wanted to render it in front view…So i included a camera in my scene in Blender(declared it inline)…aligned it to the front view of Suzzane mesh and re-exported it.When i rendered it through cutter(by calling ReadArchive)…it again rendered in the top view…
Well I know that I can translate my world within Cutter by using the Transform Command,but i dont want to do that…I want to export it from Blender directly in the desired view…Is that possible???
(Please bear with me fr being noobish!!!)

Not sure if I’m totally understanding but it sounds like you want to render from cutter with the same camera transform as in Blender? If so you could insert a RiReadArchive in your cutter scene after RiFrame and before RiWorld to call the exported camara archive, the camera RIB should be in Archive/Camaras. If you do it that way be aware that the camera archive includes RiFormat, DOF, world transfrom, ect but does not include the displays… you may also need to remove some of that from your cutter scene if present :wink:

I like playing with Cutter, its a great way to learn RIB too :slight_smile:

“you want to render from cutter with the same camera transform as in Blender”

Exactly!!! :wink:

Finally,with ur help,I ws able to do this…Worked like a charm…Thnxx fr giving us this wonderful script…:slight_smile: