LightsprintSDK 2021.08.08
Calculation and outputs

Lightsprint can calculate

and store them in object's

or quickly return single value for given

Capabilities by speed

Lightsprint is very flexible; for any object, it lets you create optimal structures that precisely match your quality/memory footprint requirements. For example, you can use pixel buffers only for objects that benefit from per-pixel details, use vertex buffers for the rest. You can mix formats even in single object, e.g. give it per-pixel lightmap with 8bit RGBA channels and sRGB space and per-vertex bent normals with floating point RGB channels and linear space. When (empty) buffers are created, single RRSolver::updateLightmaps() call fills them.

Lightsprint automatically uses all processing power available in a single computer, it runs in multiple threads on all CPUs and CPU cores.

Distributed calculation

Lightsprint is ready for distribution of work in network / multiple computers, including computers without GPU. Expensive RRSolver::updateLightmaps() call (it is core of all lightmap, ambient occlusion map and bent normal map calculations) can be replaced by many small RRSolver::updateLightmap() calls and you are free to execute them in parallel on different computers.

In more detail, you can run many clients that do

RRSolver solver;
solver.setStaticObjects(objects);
solver.setLights(lights);
solver.setEnvironment(environment);
RRSolver::UpdateParameters params(1000);
solver.updateLightmaps(-1,-1,-1,&params,nullptr);
params.useCurrentSolution = true;
while(!done)
{
unsigned objectIndex = ...; //get object that was not updated yet
RRBuffer* lightmap = RRBuffer::create(...);
solver.updateLightmap(objectIndex,lightmap,nullptr,nullptr,&params);
lightmap->save(filename);
delete lightmap;
}
static RRBuffer * create(RRBufferType type, unsigned width, unsigned height, unsigned depth, RRBufferFormat format, bool scaled, const unsigned char *data)
Creates buffer in system memory. See reset() for parameter details. Returns nullptr when parameters a...