LightsprintSDK 2021.08.08
rr_ed Namespace Reference

Classes

struct  SceneViewerState
 

Enumerations

enum  LightingIndirect {
  LI_NONE ,
  LI_CONSTANT ,
  LI_LIGHTMAPS ,
  LI_AMBIENTMAPS ,
  LI_REALTIME_ARCHITECT ,
  LI_REALTIME_FIREBALL
}
 
enum  Transparency {
  T_OPAQUE ,
  T_ALPHA_KEY ,
  T_ALPHA_BLEND ,
  T_RGB_BLEND
}
 
enum  PivotPosition {
  PP_TOP ,
  PP_CENTER ,
  PP_BOTTOM
}
 

Functions

void RR_ED_API sceneViewer (rr::RRSolver *inputSolver, const rr::RRString &inputFilename, const rr::RRString &skyboxFilename, const rr::RRString &pathToData, SceneViewerState *svs, bool releaseResources)
 

Detailed Description

LightsprintEd - scene editor with global illumination.

Enumeration Type Documentation

◆ LightingIndirect

Enumerator
LI_NONE 

No indirect illumination, Doom-3 look with shadows completely black.

LI_CONSTANT 

Constant ambient, widely used poor man's approach.

LI_LIGHTMAPS 

Indirect illumination is taken from baked lightmaps in layerBakedLightmap.

LI_AMBIENTMAPS 

Indirect illumination is taken from baked ambient maps in layerBakedAmbient.

LI_REALTIME_ARCHITECT 

Indirect illumination is realtime computed by Architect solver. No precalculations. If not sure, use Fireball.

LI_REALTIME_FIREBALL 

Indirect illumination is realtime computed by Fireball solver. Fast.

◆ Transparency

Transparency modes used by realtime renderer, to trade speed/quality. Offline GI solver always works as if the highest quality mode is selected.

Enumerator
T_OPAQUE 

No transparency, the fastest mode, no object sorting, light is completely blocked by surface.

T_ALPHA_KEY 

1-bit transparency, very fast mode, no object sorting, light either stops or goes through, no semi-translucency. Good for fences, plants etc.

T_ALPHA_BLEND 

8-bit transparency, fast mode, objects must be sorted, fraction of light goes through without changing color, creates semi-translucency effect. Good for non-colored glass. Unlike alpha keying, blending may generate artifacts when semi-translucent faces overlap.

T_RGB_BLEND 

24-bit transparency, the highest quality mode, objects must be sorted, semi-translucency is evaluated separately in rgb channels. Good for colored glass (only blue light goes through blue glass). Unlike alpha keying, blending may generate artifacts when semi-translucent faces overlap.

◆ PivotPosition

Enumerator
PP_TOP 
PP_CENTER 
PP_BOTTOM 

Function Documentation

◆ sceneViewer()

void RR_ED_API rr_ed::sceneViewer ( rr::RRSolver inputSolver,
const rr::RRString inputFilename,
const rr::RRString skyboxFilename,
const rr::RRString pathToData,
SceneViewerState svs,
bool  releaseResources 
)

Runs interactive scene viewer/editor.

Scene viewer includes debugging and editing features. All lights and materials can be freely edited and skybox changed. All lighting techniques for both realtime and precomputed GI are available via menu. All effects can be enabled and configured via scene properties.

Scene viewer can serve as a base for development of custom products. If you need new feature added, we offer to do it for you or license you full scene viewer source code.

Parameters
inputSolverSolver to be displayed. This is handy for debugging scene already present in solver. May be nullptr.
inputFilenameIf inputSolver is nullptr, we attempt to open and display this file. This is handy for scene viewer applications.
skyboxFilenameIf RRBuffer::loadCube() loads this skybox successfully, it is used, overriding eventual environment from inputSolver.
pathToDataPath to directory with data, where subdirectories maps, shaders are expected. Must be terminated with slash (or be empty for current dir).
svsInitial state of viewer. Use nullptr for default state with realtime GI and random camera.
releaseResourcesResources allocated by scene viewer will be released on exit. It could take some time in huge scenes, so there's option to not release them, let them leak. Not releasing resources is good idea e.g. if you plan to exit application soon.