InputExtraction.ExtractFromScene

Declaration

public static bool ExtractFromScene(out LightTransport.InputExtraction.BakeInput bakeInput);

Parameters

bakeInput The bake input generated by the this method (output variable).

Returns

bool True if the extraction was successful.

Description

Extract BakeInput from the set of open scenes.

All objects of type LightProbeGroup, Light, MeshRenderer, Terrain, and their associated lists of Material are extracted when this method is called. Pass the produced BakeInput object into InputExtraction.PopulateWorld to generate the data needed for integrators implementing the IProbeIntegrator interface.

// Extract bake input.
bool result = UnityEngine.LightTransport.InputExtraction.ExtractFromScene(out var input);
Assert.IsTrue(result);

// Create context and world. var context = new RadeonRaysContext(); Assert.NotNull(context);

var contextInitialized = context.Initialize(); Assert.AreEqual(true, contextInitialized); var world = new RadeonRaysWorld();

// Populate the integration world. using var progress = new BakeProgressState(); var worldResult = UnityEngine.LightTransport.InputExtraction.PopulateWorld(input, progress, context, world); Assert.IsTrue(worldResult);

Context.Dispose();

How to extract bake input from the open scenes.


Did you find this page useful? Please give it a rating: