Cutter
|
IntroductionCutter provides an excellent level of integration with mental images® shader writing and rendering technologies. Cutter is able to,
Cutter offers these facilities to users of Windows, Linux and MacOSX operating systems.
This tutorial provides a general overview of Cutter's capabilities.
It is assumed the user has a compiler installed on their computer.
This is not an issue for those using Linux or MacOSX because GNU compilers are part of their base
installation. Users of Windows, however, must install either MS Visual Studio 8 or MS VC Express 2008.
It is also assumed the reader has access to either a (stand-alone) fully
licensed or demo version of mental ray. Currently, there are two demo versions of mental ray. To
differentiate them they are refered to, by these notes, as Demo Limited and Demo Complete.
|
|
Listing 1 (Makefile.mishader_LINUX)
|
|
On Windows, Cutter generates a bat file for use with Visual Studio 8 based on
the template shown in listing 2. Whether or not Cutter is dealing with a
template for a makefile or a VS8 bat file, it substitutes text shown in capital letters
for values specific to the users environment. For example, in both listing 3 and 4 the
strings |
|
Listing 2 (Compile_mishader.bat)
|
|
It is possible to customize the compilation and linking behavior of Cutter. For information about customization refer to the tutorial "Mental Ray: Setup CD Vol 3". |
MI Documentation
Assuming the location of the directory in which mental image's ("manual") html documentation
has been specified correctly (figure 3) users can take advantage of Cutter's ability to
quickly lookup topics. In the case of readers who have access to Andy Kopra's
book it is recommended they copy the directory
Preferences Tool->UI Prefs->Net
Double clicking with the alt key down...
|
|
|
CatalogingThe contents of the RayView window can be saved as JPEG files or as a series of images linked to the index web page of a catalog. Figure 6 shows the Save As Html Catalog item.
Once the name and location of the catalog has been chosen by the user, Cutter will automatically generate the thumbnail images and web pages for the catalog - figure 7.
A catalog consists of html documents and two directories of jpeg images. One directory stores the full size rendered images while the other stores 100 x 100 pixel thumbnails. The primary (index) html document displays a grid of thumbnails that are hyper-linked to secondary html pages that display additional text related to the full size image. Text on a secondary page might be .mi scene code or the source code of a shader. The purpose of a catalog is to keep a record of the code base that underpins the production of each rendered image. |
Opening Header Files & Source CodeWhen editing a .mi scene file, right mouse clicking (MacOSX control + click) within the name of a "included" or "linked" file will raise the popup shown in figure 8. The text within the quotations is automatically selected by Cutter. In the case of the user choosing to open a "linked" shader, Cutter will attempt to open the shaders source code. This only works, however, if a users custom 'C' language source code files are saved in their "shader_src" directory - refer to the tutorial Cutter: mi Preferences.
The same facility exists for shader source code files. For example, "shader.h" (figure 9) was opened using the Open Selection menu item. Clicking the procs button, located in the upper panel of a text window, displays a full listing of the structs declared in a header file. Holding down the shift key and clicking the procs button triggers Cutter to display the structs defined in all the header files contained in a directory. |
|
|
Syntax ColorationExamples of syntax coloration are shown in figures 10 and 11. The procs { } button allows easy navigation of the main elements of shader code, header and 'mi' scene files. The source files shown below were written by Andy Kopra and Bart Gawboy. |
|
|
© 2002- Malcolm Kesson. All rights reserved.