Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are several published functions that can be called using the CoronaRendererthe CoronaRenderer.CoronaFp interfaceCoronaFp interface. You can list them by executing showInterface executing showInterface CoronaRenderer.CoronaFp command. Most functions return an integer, that is zero on success, and nonzero on failure.

...

Column
width15%


Column
width70%
FunctionParametersDescription
VFB and Rendering
showVfb<boolean>showDisplays or hides the VFB window. When the argument is true, calling it is the same as clicking “Show VFB” button in the UI.
resumeRender
Resumes the last rendering. Same as clicking “Resume last” button in the Actions tab.
loadAndResume<string>filenameSame as resumeRender, but loads the last render from a given previously dumped EXR file.
dumpVfb<string>filenameSaves the current VFB contents to given file so it can be resumed later using loadAndResume.
setDisplayedChannel<integer>channelIf using Corona VFB, it sets the currently displayed channel. 0 is beauty channel, 1 is alpha, and higher values are extra render passes.
getVfbContent<integer>channel <boolean>toneMapping <boolean>renderStampReturns bitmap with one render channel from the current framebuffer. Optionally can include tone mapping and renderstamp. Does not return integer code, but directly the bitmap (or null if the call failed).
getStatistic<int>statisticIdReturns one of the statistics from the table below, in double precision floating point format. Returns results from the currently active render or last render. If no render occured yet in the session, or 3dsmax was reset/renderer changed after the last render, then the results are undefined.
startInteractive
Starts interactive rendering in the Corona VFB.
startInteractiveDocked
Starts the interactive rendering in the Corona viewport-docked VFB. The viewport (extended view) needs to be present and inactive for this method to work. The command returns the following codes:
0 - Success
1 - Failure - Corona is not selected as the active renderer
2 - Failure - Corona is already rendering
3 - Failure - No valid docked window available
stopRender
Stops any render that is currently going on
reparseInteractive
While in interactive rendering session, reparses the entire scene and restarts interactive rendering.
getRenderType
Returns 0 if there is currently no render going on, 1 for offline (non-interactive rendering), 2 for interactive rendering with docked VFB, and 3 for interactive rendering in regular Corona VFB.
saveAllElements<string>filenameSaves all render elements to specified location - same as when using the Corona VFB button functionality. The provided parameter is the filename of beauty channel, other filenames are derived from it.
resetSettings
Resets the render settings to default values. Same as clicking “Reset Settings” button in Actions tab.
savePostSettings<string>filename

Saves all the current settings from the VFB Post tab into a .conf file (the equivalent of using the Post tab "Save" button). Only available in Corona 12 and newer. Only works with VFB2.

loadPostSettings<string>filename

Loads postprocessing settings from the specified .conf file (the equivalent of using the Post tab "Load" button). Only available in Corona 12 and newer. Only works with VFB2.

UI
showLightMixSetupDialog
Shows the LightMix setup dialog, if not currently rendering.
bakeLightMix
Bakes the
current
first LightMix
configuration
element into the scene. This function is
the
not same as clicking the
corresponding
bake button in the VFB. MAXScript always bakes the first LightMix because it doesn't know which one is selected. You don't need to open the VFB to use this function. 
bakeIthLightMix<integer>lightMixIndexBakes the specified LightMix into the scene based on the provided lightMixIndex. Only available in Corona 12 and newer.
showListerDialog<integer>tabOpens Corona Lister dialog window. The tab argument determines which tab will be selected when opening the dialog, where 0 means last active tab, 1 means Lights tab and 2 means Scatters tab.
showErrorWindow
Shows the Corona Error Window.
Versioning
getVersionNumber
Returns current Corona version encoded as a single comparable 64-bit integer version number. Version numbers returned in earlier builds are always lower than version numbers returned in later builds.
getVersionString
Returns current Corona version formatted as a human-readable string. It is suitable to be presented to the user.
getVersionMajorNumber
Returns current Corona version major number.
getVersionMinorNumber
Returns current Corona version minor number.
getVersionBuildType
Returns current Corona version build type formatted as string. I.e. one of “StableRelease”, “ReleaseCandidate”, and “DailyBuild”.
Other
exportScene<string>filename <bool>renderImmediately <bool>keepAssets

Exports the current scene to a given file so that it can be opened and rendered in Corona Standalone or Vantage. The supported file formats are:

.cdo - Corona Standalone

.vrscene - Vantage

.vantage - Vantage

If renderImmediately is true, then the application also looks for the Corona Standalone / Vantage executable and tries to run it and start rendering immediately after the export. 

If keepAssets is true, then no textures are exported; instead, they are kept in their original locations. If keepAssets is false, then all textures are exported along with the scene file. 

loadDrIpFile<string>filenameLoads a text file containing 1 IP per line into the DR nodes list. Same as clicking on the button “From file…” in UI and selecting the provided file.
getBlackbodyColor<float>temperatureReturns the color of a black body emitter with specified temperature (given in Kelvins). The returned value is in HDR linear sRGB color space (without gamma correction). The result is normalized - the brightest color channel is always equal to 1, and the absolute brightness of the color does not correspond to the reality (only ratio between different color channels is meaningful). Input color must be in range 1000-99000K
getScriptsDirectory
Returns a path to a directory where MAXScript scripts bundled with Corona (e.g. Corona Converter or Corona Proxy Exporter) are stored.
getDefaultRoughnessMode
Returns the default mode for the Corona PhysicalMtl roughness mode, as set in the Corona System Settings. 0 = use roughness, 1 = use glossiness.
getDefaultIorMode
Returns the default mode for the Corona PhysicalMtl IOR mode, as set in the Corona System Settings. 0 = use IOR, 1 = use Disney Specular.
convertToCoronaMtl<material>material
<integer>metalnessType
Converts the specified material to a Corona material. The metalnessType determines how metalness is handled:
0 - Auto detect
1 - Force non-metal
2 - Force metal
Only available in Corona 12 and newer.
Statistic IDMeaning
0Number of elapsed passes
1Number of primitives in the scene, not counting instances
2Number of primitives in the scene with instancing
3Average number of rays processed per second
4Average number of rays processed for each image sample
5Total render time in milliseconds
6Total time spent in the rendering phase (in milliseconds). This time is used for deciding when to stop progressive rendering with a time limit set.
7Estimated noise amount in the picture, in percents. Returns 0 if no estimate is available.
8Estimated remaining rendering time (in milliseconds). Returns 0 if no estimate is available.
9Memory currently allocated by Corona.
10Peak memory allocated by Corona during the last rendering.
11Virtual memory currently used by the process.
12Peak virtual memory currently used by the process.
13Virtual memory used by the system.
14Scene parsing time in ms.
15Displacement primitives.
Column
width15%



Corona Proxy API

...