LuxCore
2.0
|
Film stores all the outputs of a rendering. It can be obtained from a RenderSession or as stand alone object loaded from a file. More...
#include <luxcore.h>
Public Member Functions | |
virtual | ~Film () |
virtual unsigned int | GetWidth () const =0 |
Returns the Film width. More... | |
virtual unsigned int | GetHeight () const =0 |
Returns the Film height. More... | |
virtual luxrays::Properties | GetStats () const =0 |
Returns a list of statistics related to the film. Mostly useful for stand alone films. More... | |
virtual float | GetFilmY (const unsigned int imagePipelineIndex=0) const =0 |
Returns the Film average luminance. It can be used to estimate a good value for variance clamping. More... | |
virtual void | Clear ()=0 |
Clear the film. More... | |
virtual void | AddFilm (const Film &film)=0 |
Add a film. More... | |
virtual void | AddFilm (const Film &film, const unsigned int srcOffsetX, const unsigned int srcOffsetY, const unsigned int srcWidth, const unsigned int srcHeight, const unsigned int dstOffsetX, const unsigned int dstOffsetY)=0 |
Add a film. More... | |
virtual void | SaveOutputs () const =0 |
Saves all Film output channels defined in the current RenderSession. This method can not be used with a standalone film. More... | |
virtual void | SaveOutput (const std::string &fileName, const FilmOutputType type, const luxrays::Properties &props) const =0 |
Saves the specified Film output channels. More... | |
virtual void | SaveFilm (const std::string &fileName) const =0 |
Serializes a Film in a file. More... | |
virtual double | GetTotalSampleCount () const =0 |
Returns the total sample count. More... | |
virtual size_t | GetOutputSize (const FilmOutputType type) const =0 |
Returns the size (in float or unsigned int) of a Film output channel. More... | |
virtual bool | HasOutput (const FilmOutputType type) const =0 |
Returns if a film channel output is available. More... | |
virtual unsigned int | GetOutputCount (const FilmOutputType type) const =0 |
Returns the number of output channels of the passed type. More... | |
virtual unsigned int | GetRadianceGroupCount () const =0 |
Returns the number of radiance groups. More... | |
template<class T > | |
void | GetOutput (const FilmOutputType type, T *buffer, const unsigned int index=0) |
Fills the buffer with a Film output channel. More... | |
virtual bool | HasChannel (const FilmChannelType type) const =0 |
Returns if a film channel is available. More... | |
virtual unsigned int | GetChannelCount (const FilmChannelType type) const =0 |
Returns the number of channels of the passed type. More... | |
template<class T > | |
const T * | GetChannel (const FilmChannelType type, const unsigned int index=0) |
Returns a pointer to the type of channel requested. The channel is not normalized (if it has a weight channel). More... | |
virtual void | Parse (const luxrays::Properties &props)=0 |
Sets configuration Properties with new values. This method can be used only when the Film is not in use by a RenderSession. Image pipeline and radiance scale values can be redefined with this method. More... | |
virtual void | DeleteAllImagePipelines ()=0 |
Delete all image pipelines and goes the default image pipeline (AutoLinearToneMap + GammaCorrectionPlugin). This method can be used with a stand alone film or with a session film. More... | |
template<> | |
CPP_API void | GetOutput (const FilmOutputType type, float *buffer, const unsigned int index) |
template<> | |
CPP_API void | GetOutput (const FilmOutputType type, unsigned int *buffer, const unsigned int index) |
template<> | |
CPP_API const float * | GetChannel (const FilmChannelType type, const unsigned int index) |
template<> | |
CPP_API const unsigned int * | GetChannel (const FilmChannelType type, const unsigned int index) |
Static Public Member Functions | |
static Film * | Create (const std::string &fileName) |
Loads a stand alone Film (i.e. not connected to a rendering session) from a file. More... | |
static Film * | Create (const luxrays::Properties &props, const bool hasPixelNormalizedChannel, const bool hasScreenNormalizedChannel) |
Create a stand alone Film (i.e. not connected to a rendering session) from the properties. More... | |
Protected Member Functions | |
virtual void | GetOutputFloat (const FilmOutputType type, float *buffer, const unsigned int index)=0 |
virtual void | GetOutputUInt (const FilmOutputType type, unsigned int *buffer, const unsigned int index)=0 |
virtual const float * | GetChannelFloat (const FilmChannelType type, const unsigned int index)=0 |
virtual const unsigned int * | GetChannelUInt (const FilmChannelType type, const unsigned int index)=0 |
Film stores all the outputs of a rendering. It can be obtained from a RenderSession or as stand alone object loaded from a file.
Types of Film channel available.
Types of Film channel available.
|
virtual |
|
pure virtual |
Add a film.
film | the film to add. |
|
pure virtual |
Add a film.
film | the film to add. |
srcOffsetX | the X offset of the region of the film to add. |
srcOffsetY | the y offset of the region of the film to add. |
srcWidth | the width of the region of the film to add. |
srcHeight | the height of the region of the film to add. |
dstOffsetX | the X offset of the destination film. |
dstOffsetY | the Y offset of the destination film. |
|
pure virtual |
Clear the film.
|
static |
Loads a stand alone Film (i.e. not connected to a rendering session) from a file.
fileName | is the name of the file with the serialized film to read. |
|
static |
Create a stand alone Film (i.e. not connected to a rendering session) from the properties.
props | defining the film. |
hasPixelNormalizedChannel | if the film must have CHANNEL_RADIANCE_PER_PIXEL_NORMALIZED. Required by all render engines. |
hasScreenNormalizedChannel | if the film must have CHANNEL_RADIANCE_PER_SCREEN_NORMALIZED. Required by BIDIRCPU and LIGHTCPU render engines. |
|
pure virtual |
Delete all image pipelines and goes the default image pipeline (AutoLinearToneMap + GammaCorrectionPlugin). This method can be used with a stand alone film or with a session film.
|
inline |
Returns a pointer to the type of channel requested. The channel is not normalized (if it has a weight channel).
type | is the Film output channel to return. It must be one of the enabled channels in RenderConfig. The supported template types are float and unsigned int. |
index | of the buffer to use. Usually 0, however, for instance, if more than one light group is used, select the group to return. |
CPP_API const float* luxcore::Film::GetChannel | ( | const FilmChannelType | type, |
const unsigned int | index | ||
) |
CPP_API const unsigned int* luxcore::Film::GetChannel | ( | const FilmChannelType | type, |
const unsigned int | index | ||
) |
|
pure virtual |
Returns the number of channels of the passed type.
type | is the Film channel to use. |
|
protectedpure virtual |
|
protectedpure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
Fills the buffer with a Film output channel.
type | is the Film output channel to use. It must be one of the enabled channels in RenderConfig. The supported template types are float and unsigned int. |
buffer | is the place where the data will be copied. |
index | of the buffer to use. Usually 0, however, for instance, if more than one light group is used, select the group to return. |
CPP_API void luxcore::Film::GetOutput | ( | const FilmOutputType | type, |
float * | buffer, | ||
const unsigned int | index | ||
) |
CPP_API void luxcore::Film::GetOutput | ( | const FilmOutputType | type, |
unsigned int * | buffer, | ||
const unsigned int | index | ||
) |
|
pure virtual |
Returns the number of output channels of the passed type.
type | is the Film output channel to use. |
|
protectedpure virtual |
|
pure virtual |
|
protectedpure virtual |
|
pure virtual |
Returns the number of radiance groups.
|
pure virtual |
Returns a list of statistics related to the film. Mostly useful for stand alone films.
|
pure virtual |
Returns the total sample count.
|
pure virtual |
|
pure virtual |
Returns if a film channel is available.
type | is the Film channel to use. |
|
pure virtual |
Returns if a film channel output is available.
type | is the Film output channel to use. |
|
pure virtual |
Sets configuration Properties with new values. This method can be used only when the Film is not in use by a RenderSession. Image pipeline and radiance scale values can be redefined with this method.
props | are the Properties to set. |
|
pure virtual |
Serializes a Film in a file.
fileName | is the name of the file where to serialize the film. |
|
pure virtual |
Saves the specified Film output channels.
fileName | is the name of the file where to save the output channel. |
type | is the Film output channel to use. It must be one of the enabled channels. |
props | can include some additional information defined by the following property: "id" for the ID of MATERIAL_ID_MASK, "id" for the index of RADIANCE_GROUP, "id" for the ID of BY_MATERIAL_ID. "id" for the ID of OBJECT_ID_MASK, "id" for the ID of BY_OBJECT_ID. |
|
pure virtual |
Saves all Film output channels defined in the current RenderSession. This method can not be used with a standalone film.