LightsprintSDK 2021.08.08
rr_ed::SceneViewerState Struct Reference

#include <Ed.h>

Public Member Functions

bool renderLightDirectRelevant ()
 
bool renderLightDirectActive ()
 
rr::RRSolver::Multipliers getMultipliersDirect ()
 
rr::RRSolver::Multipliers getMultipliersIndirect ()
 
bool renderLDMRelevant ()
 
bool renderLDMEnabled ()
 
 SceneViewerState ()
 
void clearSvs ()
 
bool operator== (const SceneViewerState &a) const
 
bool operator!= (const SceneViewerState &a) const
 

Public Attributes

rr::RRCamera camera
 
rr::RRTime referenceTime
 
rr::RRString skyboxFilename
 
float skyboxRotationRad
 
bool envSimulateSky
 
bool envSimulateSun
 
float envLongitudeDeg
 
float envLatitudeDeg
 
float envSpeed
 
tm envDateTime
 
unsigned layerBakedLightmap
 
unsigned layerBakedAmbient
 
unsigned layerRealtimeAmbient
 
unsigned layerBakedLDM
 
unsigned layerBakedEnvironment
 
unsigned layerRealtimeEnvironment
 
unsigned selectedLightIndex
 
unsigned selectedObjectIndex
 
unsigned selectedLayer
 
bool fullscreen
 
bool renderStereo
 
bool renderPanorama
 
rr::RRCamera::PanoramaMode panoramaMode
 
rr::RRCamera::PanoramaCoverage panoramaCoverage
 
float panoramaScale
 
float panoramaFovDeg
 
bool renderDof
 
bool dofAccumulated
 
rr::RRString dofApertureShapeFilename
 
bool dofAutomaticFocusDistance
 
bool renderLightDirect
 
LightingIndirect renderLightIndirect
 
bool multipliersEnabled
 
rr::RRSolver::Multipliers multipliers
 
rr::RRSolver::Multipliers multipliersDirect
 
rr::RRSolver::Multipliers multipliersIndirect
 
bool renderLDM
 
bool renderLightmaps2d
 
bool renderLightmapsBilinear
 
bool renderDDI
 
bool renderMaterialDiffuse
 
bool renderMaterialDiffuseColor
 
bool renderMaterialSpecular
 
bool renderMaterialEmission
 
Transparency renderMaterialTransparency
 
bool renderMaterialTransparencyNoise
 
bool renderMaterialTransparencyFresnel
 
bool renderMaterialTransparencyRefraction
 
bool renderMaterialBumpMaps
 
bool renderMaterialTextures
 
bool renderMaterialSidedness
 
bool renderWireframe
 
bool renderFPS
 
bool renderHelpers
 
bool renderBloom
 
float bloomThreshold
 
bool renderLensFlare
 
float lensFlareSize
 
unsigned lensFlareId
 
bool renderVignette
 
bool renderHelp
 
bool renderLogo
 
bool renderTonemapping
 
rr_gl::ToneParameters tonemapping
 
bool tonemappingAutomatic
 
float tonemappingAutomaticTarget
 
float tonemappingAutomaticSpeed
 
bool pathEnabled
 
bool pathShortcut
 
bool ssgiEnabled
 
float ssgiIntensity
 
float ssgiRadius
 
float ssgiAngleBias
 
bool contoursEnabled
 
rr::RRVec3 contoursSilhouetteColor
 
rr::RRVec3 contoursCreaseColor
 
bool playVideos
 
rr_gl::RealtimeLight::ShadowTransparency shadowTransparency
 
bool videoEmittanceAffectsGI
 
unsigned videoEmittanceGIQuality
 
bool videoTransmittanceAffectsGI
 
bool videoTransmittanceAffectsGIFull
 
bool videoEnvironmentAffectsGI
 
unsigned videoEnvironmentGIQuality
 
unsigned fireballQuality
 
unsigned fireballWorkPerFrame
 
unsigned fireballWorkTotal
 
bool raytracedCubesEnabled
 
unsigned raytracedCubesRes
 
unsigned raytracedCubesMaxObjects
 
float raytracedCubesSpecularThreshold
 
float raytracedCubesDepthThreshold
 
bool mirrorsEnabled
 
bool mirrorsDiffuse
 
bool mirrorsSpecular
 
bool mirrorsMipmaps
 
bool mirrorsOcclusion
 
bool srgbCorrect
 
bool lightmapFloats
 
rr::RRSolver::UpdateParameters lightmapDirectParameters
 
rr::RRSolver::FilteringParameters lightmapFilteringParameters
 
bool cameraDynamicNear
 
unsigned cameraDynamicNearNumRays
 
float cameraMetersPerSecond
 
bool renderGrid
 
unsigned gridNumSegments
 
float gridSegmentSize
 
int precision
 
bool openLogWindows
 
bool autodetectCamera
 

Detailed Description

Optional parameters of sceneViewer()

Constructor & Destructor Documentation

◆ SceneViewerState()

rr_ed::SceneViewerState::SceneViewerState ( )
inline

At initialization, ignore what's set in eye and generate camera (and cameraMetersPerSecond) from scene.

Sets default state with realtime GI and random camera.

Member Function Documentation

◆ renderLightDirectRelevant()

bool rr_ed::SceneViewerState::renderLightDirectRelevant ( )
inline

Indirect illumination mode.

◆ renderLightDirectActive()

bool rr_ed::SceneViewerState::renderLightDirectActive ( )
inline

◆ getMultipliersDirect()

rr::RRSolver::Multipliers rr_ed::SceneViewerState::getMultipliersDirect ( )
inline

◆ getMultipliersIndirect()

rr::RRSolver::Multipliers rr_ed::SceneViewerState::getMultipliersIndirect ( )
inline

◆ renderLDMRelevant()

bool rr_ed::SceneViewerState::renderLDMRelevant ( )
inline

Modulate indirect illumination by LDM.

◆ renderLDMEnabled()

bool rr_ed::SceneViewerState::renderLDMEnabled ( )
inline

◆ clearSvs()

void rr_ed::SceneViewerState::clearSvs ( )
inline

Clears all but state that should survive 'project' load.

◆ operator==()

bool rr_ed::SceneViewerState::operator== ( const SceneViewerState a) const
inline

Used to check whether important state was modified, less important state is commented out.

◆ operator!=()

bool rr_ed::SceneViewerState::operator!= ( const SceneViewerState a) const
inline

Member Data Documentation

◆ camera

rr::RRCamera rr_ed::SceneViewerState::camera

◆ referenceTime

rr::RRTime rr_ed::SceneViewerState::referenceTime

Current camera. If you wish to pass panorama settings to sceneViewer, set SceneViewerState::panoramaXxx.

◆ skyboxFilename

rr::RRString rr_ed::SceneViewerState::skyboxFilename

Time when animation started/was in position 0.

◆ skyboxRotationRad

float rr_ed::SceneViewerState::skyboxRotationRad

Current skybox filename, e.g. skybox.hdr or skybox_ft.tga.

◆ envSimulateSky

bool rr_ed::SceneViewerState::envSimulateSky

◆ envSimulateSun

bool rr_ed::SceneViewerState::envSimulateSun

Should we simulate sky according to location and datetime?

◆ envLongitudeDeg

float rr_ed::SceneViewerState::envLongitudeDeg

Should we simulate Sun according to location and datetime?

◆ envLatitudeDeg

float rr_ed::SceneViewerState::envLatitudeDeg

Longitude for sky/sun simulation, -180..180, east is positive, west is negative.

◆ envSpeed

float rr_ed::SceneViewerState::envSpeed

Latitude for sky/sun simulation, -90..90, north is positive, south is negative.

◆ envDateTime

tm rr_ed::SceneViewerState::envDateTime

How qualicky simulation runs, 0=stopped, 1=realtime, 3600=day in 24sec.

◆ layerBakedLightmap

unsigned rr_ed::SceneViewerState::layerBakedLightmap

Date and time for sky/sun simulation.

◆ layerBakedAmbient

unsigned rr_ed::SceneViewerState::layerBakedAmbient

Layer used for static global illumination.

◆ layerRealtimeAmbient

unsigned rr_ed::SceneViewerState::layerRealtimeAmbient

Layer used for static indirect illumination.

◆ layerBakedLDM

unsigned rr_ed::SceneViewerState::layerBakedLDM

Layer used for realtime lighting.

◆ layerBakedEnvironment

unsigned rr_ed::SceneViewerState::layerBakedEnvironment

Layer used for light indirect maps, precomputed maps that modulate realtime indirect per-vertex.

◆ layerRealtimeEnvironment

unsigned rr_ed::SceneViewerState::layerRealtimeEnvironment

Layer used for realtime environment, cubemaps.

◆ selectedLightIndex

unsigned rr_ed::SceneViewerState::selectedLightIndex

Layer used for static environment, cubemaps.

◆ selectedObjectIndex

unsigned rr_ed::SceneViewerState::selectedObjectIndex

Index into lights array, light controlled by mouse/arrows.

◆ selectedLayer

unsigned rr_ed::SceneViewerState::selectedLayer

Index into static objects array.

◆ fullscreen

bool rr_ed::SceneViewerState::fullscreen

When renderLightmaps2d, this is used for selecting what layer to show. 0 selects based on current illumination mode.

◆ renderStereo

bool rr_ed::SceneViewerState::renderStereo

Ignored. Fullscreen/windowed bit is saved to and read from user preferences file. Quit sceneViewer() in fullscreen and it will start in fullscreen next time.

◆ renderPanorama

bool rr_ed::SceneViewerState::renderPanorama

Enables stereo rendering.

◆ panoramaMode

rr::RRCamera::PanoramaMode rr_ed::SceneViewerState::panoramaMode

Enables 360 degree panorama rendering.

◆ panoramaCoverage

rr::RRCamera::PanoramaCoverage rr_ed::SceneViewerState::panoramaCoverage

Overrides the same variable in camera.

◆ panoramaScale

float rr_ed::SceneViewerState::panoramaScale

Overrides the same variable in camera.

◆ panoramaFovDeg

float rr_ed::SceneViewerState::panoramaFovDeg

Overrides the same variable in camera.

◆ renderDof

bool rr_ed::SceneViewerState::renderDof

Overrides the same variable in camera.

◆ dofAccumulated

bool rr_ed::SceneViewerState::dofAccumulated

Render depth of field effect.

◆ dofApertureShapeFilename

rr::RRString rr_ed::SceneViewerState::dofApertureShapeFilename

For depth of field effect only: set dof near/far automatically.

◆ dofAutomaticFocusDistance

bool rr_ed::SceneViewerState::dofAutomaticFocusDistance

For depth of field effect only: filename of bokeh image.

◆ renderLightDirect

bool rr_ed::SceneViewerState::renderLightDirect

For depth of field effect only: set dof near/far automatically.

◆ renderLightIndirect

LightingIndirect rr_ed::SceneViewerState::renderLightIndirect

False disables realtime direct lighting based on glsl+shadowmaps.

◆ multipliersEnabled

bool rr_ed::SceneViewerState::multipliersEnabled

◆ multipliers

rr::RRSolver::Multipliers rr_ed::SceneViewerState::multipliers

◆ multipliersDirect

rr::RRSolver::Multipliers rr_ed::SceneViewerState::multipliersDirect

◆ multipliersIndirect

rr::RRSolver::Multipliers rr_ed::SceneViewerState::multipliersIndirect

◆ renderLDM

bool rr_ed::SceneViewerState::renderLDM

◆ renderLightmaps2d

bool rr_ed::SceneViewerState::renderLightmaps2d

◆ renderLightmapsBilinear

bool rr_ed::SceneViewerState::renderLightmapsBilinear

When not rendering realtime, show static lightmaps in 2D.

◆ renderDDI

bool rr_ed::SceneViewerState::renderDDI

Render lightmaps with bilinear interpolation rather than without it.

◆ renderMaterialDiffuse

bool rr_ed::SceneViewerState::renderMaterialDiffuse

Render triangles illuminated with DDI. Diagnostic use only.

◆ renderMaterialDiffuseColor

bool rr_ed::SceneViewerState::renderMaterialDiffuseColor

Render diffuse reflections.

◆ renderMaterialSpecular

bool rr_ed::SceneViewerState::renderMaterialSpecular

Render diffuse color.

◆ renderMaterialEmission

bool rr_ed::SceneViewerState::renderMaterialEmission

Render specular reflections.

◆ renderMaterialTransparency

Transparency rr_ed::SceneViewerState::renderMaterialTransparency

Render emissivity.

◆ renderMaterialTransparencyNoise

bool rr_ed::SceneViewerState::renderMaterialTransparencyNoise

Render transparency. Allows realtime renderer to use modes up to this one. Offline GI always uses the highest one.

◆ renderMaterialTransparencyFresnel

bool rr_ed::SceneViewerState::renderMaterialTransparencyFresnel

When rendering 1bit transparency, use noise to simulate different levels of transparency.

◆ renderMaterialTransparencyRefraction

bool rr_ed::SceneViewerState::renderMaterialTransparencyRefraction

When rendering transparency, modulate result by fresnel term.

◆ renderMaterialBumpMaps

bool rr_ed::SceneViewerState::renderMaterialBumpMaps

When rendering transparency, approximate refraction with cubemaps.

◆ renderMaterialTextures

bool rr_ed::SceneViewerState::renderMaterialTextures

Render normal maps.

◆ renderMaterialSidedness

bool rr_ed::SceneViewerState::renderMaterialSidedness

Render textures (diffuse, emissive) rather than constant colors.

◆ renderWireframe

bool rr_ed::SceneViewerState::renderWireframe

Render 1-sided materials as 1-sided, rather than everything 2-sided.

◆ renderFPS

bool rr_ed::SceneViewerState::renderFPS

Render all in wireframe.

◆ renderHelpers

bool rr_ed::SceneViewerState::renderHelpers

Render FPS counter.

◆ renderBloom

bool rr_ed::SceneViewerState::renderBloom

Show helper wireframe objects and text outputs.

◆ bloomThreshold

float rr_ed::SceneViewerState::bloomThreshold

Render bloom effect.

◆ renderLensFlare

bool rr_ed::SceneViewerState::renderLensFlare

Only pixels with intensity above this threshold receive bloom.

◆ lensFlareSize

float rr_ed::SceneViewerState::lensFlareSize

Render lens flare effect.

◆ lensFlareId

unsigned rr_ed::SceneViewerState::lensFlareId

Relative lens flare size, 1 for typical size.

◆ renderVignette

bool rr_ed::SceneViewerState::renderVignette

Other lens flare parameters are generated from this number.

◆ renderHelp

bool rr_ed::SceneViewerState::renderHelp

Render vignette overlay from sv_vignette.png.

◆ renderLogo

bool rr_ed::SceneViewerState::renderLogo

Render help overlay from sv_help.png.

◆ renderTonemapping

bool rr_ed::SceneViewerState::renderTonemapping

Render logo overlay from sv_logo.png.

◆ tonemapping

rr_gl::ToneParameters rr_ed::SceneViewerState::tonemapping

Render with tonemapping.

◆ tonemappingAutomatic

bool rr_ed::SceneViewerState::tonemappingAutomatic

If(renderTonemapping) color correction applied at render time.

◆ tonemappingAutomaticTarget

float rr_ed::SceneViewerState::tonemappingAutomaticTarget

Automatically adjust tonemappingBrightness.

◆ tonemappingAutomaticSpeed

float rr_ed::SceneViewerState::tonemappingAutomaticSpeed

Target average screen intensity for tonemappingAutomatic.

◆ pathEnabled

bool rr_ed::SceneViewerState::pathEnabled

Speed of automatic tonemapping change.

◆ pathShortcut

bool rr_ed::SceneViewerState::pathShortcut

Enables pathtracer after 0.2s of inactivity.

◆ ssgiEnabled

bool rr_ed::SceneViewerState::ssgiEnabled

Lets pathtracer reuse indirect from Fireball/Arch solvers, if available.

◆ ssgiIntensity

float rr_ed::SceneViewerState::ssgiIntensity

Apply SSGI postprocess.

◆ ssgiRadius

float rr_ed::SceneViewerState::ssgiRadius

Intensity of SSGI effect, with 1=default, 0=no effect.

◆ ssgiAngleBias

float rr_ed::SceneViewerState::ssgiAngleBias

Distance of occluders (in meters) taken into account when calculating SSGI.

◆ contoursEnabled

bool rr_ed::SceneViewerState::contoursEnabled

SSGI is based on face normals, not per-pixel normals, so at 0 even smooth edges are visible; higher angle bias makes more edges invisible.

◆ contoursSilhouetteColor

rr::RRVec3 rr_ed::SceneViewerState::contoursSilhouetteColor

◆ contoursCreaseColor

rr::RRVec3 rr_ed::SceneViewerState::contoursCreaseColor

◆ playVideos

bool rr_ed::SceneViewerState::playVideos

◆ shadowTransparency

rr_gl::RealtimeLight::ShadowTransparency rr_ed::SceneViewerState::shadowTransparency

Play videos, false = videos are paused.

◆ videoEmittanceAffectsGI

bool rr_ed::SceneViewerState::videoEmittanceAffectsGI

Type of transparency in shadows, we copy it to all lights.

◆ videoEmittanceGIQuality

unsigned rr_ed::SceneViewerState::videoEmittanceGIQuality

Makes video in emissive material slot affect GI in realtime, light emitted from video is recalculated in every frame.

◆ videoTransmittanceAffectsGI

bool rr_ed::SceneViewerState::videoTransmittanceAffectsGI

Quality if videoEmittanceAffectsGI is true.

◆ videoTransmittanceAffectsGIFull

bool rr_ed::SceneViewerState::videoTransmittanceAffectsGIFull

Makes video in transparency material slot affect GI in realtime, light going through transparent regions is recalculated in every frame.

◆ videoEnvironmentAffectsGI

bool rr_ed::SceneViewerState::videoEnvironmentAffectsGI

Updates GI rather than shadows only.

◆ videoEnvironmentGIQuality

unsigned rr_ed::SceneViewerState::videoEnvironmentGIQuality

Makes video in environment affect GI in realtime, light emitted from video is recalculated in every frame.

◆ fireballQuality

unsigned rr_ed::SceneViewerState::fireballQuality

Quality if videoEnvironmentAffectsGI is true.

◆ fireballWorkPerFrame

unsigned rr_ed::SceneViewerState::fireballWorkPerFrame

Quality used each time Fireball needs rebuild.

◆ fireballWorkTotal

unsigned rr_ed::SceneViewerState::fireballWorkTotal

◆ raytracedCubesEnabled

bool rr_ed::SceneViewerState::raytracedCubesEnabled

◆ raytracedCubesRes

unsigned rr_ed::SceneViewerState::raytracedCubesRes

Enables realtime raytraced diffuse and specular cubemap reflections.

◆ raytracedCubesMaxObjects

unsigned rr_ed::SceneViewerState::raytracedCubesMaxObjects

Resolution of reflection env maps.

◆ raytracedCubesSpecularThreshold

float rr_ed::SceneViewerState::raytracedCubesSpecularThreshold

But only if there is less than this number of objects in scene.

◆ raytracedCubesDepthThreshold

float rr_ed::SceneViewerState::raytracedCubesDepthThreshold

◆ mirrorsEnabled

bool rr_ed::SceneViewerState::mirrorsEnabled

◆ mirrorsDiffuse

bool rr_ed::SceneViewerState::mirrorsDiffuse

Enables rendering of flat reflections using mirror maps (rather than less accurate raytraced cubes).

◆ mirrorsSpecular

bool rr_ed::SceneViewerState::mirrorsSpecular

Enables using mirrors when rendering diffuse reflection.

◆ mirrorsMipmaps

bool rr_ed::SceneViewerState::mirrorsMipmaps

Enables using mirrors when rendering specular reflection.

◆ mirrorsOcclusion

bool rr_ed::SceneViewerState::mirrorsOcclusion

Enables higher quality mirroring mode using mipmaps.

◆ srgbCorrect

bool rr_ed::SceneViewerState::srgbCorrect

Enables occlusion query optimization, increases fps in some scenes, reduces in others.

◆ lightmapFloats

bool rr_ed::SceneViewerState::lightmapFloats

Add realtime lights sRGB correctly, if OpenGL 3.0+ or sufficient extensions are found.

◆ lightmapDirectParameters

rr::RRSolver::UpdateParameters rr_ed::SceneViewerState::lightmapDirectParameters

◆ lightmapFilteringParameters

rr::RRSolver::FilteringParameters rr_ed::SceneViewerState::lightmapFilteringParameters

Lightmap baking settings.

◆ cameraDynamicNear

bool rr_ed::SceneViewerState::cameraDynamicNear

Lightmap baking settings.

◆ cameraDynamicNearNumRays

unsigned rr_ed::SceneViewerState::cameraDynamicNearNumRays

Camera sets near dynamically to prevent near clipping.

◆ cameraMetersPerSecond

float rr_ed::SceneViewerState::cameraMetersPerSecond

How many rays it shoots per frame to autodetect camera near/far.

◆ renderGrid

bool rr_ed::SceneViewerState::renderGrid

Speed of movement controlled by user, in m/s.

◆ gridNumSegments

unsigned rr_ed::SceneViewerState::gridNumSegments

Show grid.

◆ gridSegmentSize

float rr_ed::SceneViewerState::gridSegmentSize

Number of grid segments per line, e.g. 10 makes grid with 10x10 squares.

◆ precision

int rr_ed::SceneViewerState::precision

Distance of grid lines in meters (scene units).

◆ openLogWindows

bool rr_ed::SceneViewerState::openLogWindows

Max number of digits after decimal point in float properties. -1 for full precision.

◆ autodetectCamera

bool rr_ed::SceneViewerState::autodetectCamera

True = opens new log window for each task. False = does not create any new log window (works with preexisting windows).