Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)

Enlighten SDK 3.10 Documentation
Results will update as you type.
  • Welcome to Enlighten
  • How Enlighten works
  • Artist workflow
  • Install Enlighten
  • Libraries
  • Implementation guide
    • The Enlighten scene
    • The precompute process
    • The lightmap UV pipeline
    • Enlighten runtime data
    • Runtime radiosity updates
      • High level runtime
      • Rendering indirect lighting
      • Per pixel probe lighting
      • Per mesh probe lighting
      • Material colour changes
    • Sample implementation
  • Technical reference
  • Advanced techniques
  • Tools
  • Enlighten Mobile
  • White papers
  • Third-party licences
  • Release notes
    Calendars

You‘re viewing this with anonymous access, so some content might be blocked.
/
Per mesh probe lighting

    This is the documentation for Enlighten.

    Per mesh probe lighting

    Nov 21, 2019


    Per mesh probe lighting provides one interpolated irradiance value at the centre of each object's bounding box. All pixels of the mesh are lit by this single irradiance sample.

    This approximation limits the effective indirect lighting resolution to one sample per mesh, which provides reasonable lighting accuracy for small meshes.

    The runtime cost of this technique increases with the number of objects that use it. In very large scenes with many thousands of objects, this may cause asynchronous radiosity updates to take significantly longer.

    To minimize the number of objects, combine nearby groups of small meshes into a single object. 

    Per mesh probe lighting with the high level runtime is not compatible with Probe LOD

    Manage objects

    Use the high level runtime to manage dynamic objects that represent the meshes to be lit using this technique.

    To add a new dynamic object, call IUpdateManager::AllocateDynamicObject to allocate the object, followed by IUpdateManager::EnqueueAddDynamicObject.

    	Enlighten::DynamicObject desc;
    	desc.m_Id = objectGuid;
    	desc.m_LocalBoundingBox = objectLocalBounds;
    
    	Enlighten::BaseDynamicObject* object = updateManager->AllocateDynamicObject(desc);
    	updateManager->EnqueueAddDynamicObject(object);
    

    Call the property setter BaseDynamicObject::SetTransform after adding the object to set its world transform. 

    Every frame, if the object moved since the previous frame, call BaseDynamicObject::SetTransform again to update its world transform.

    To obtain the SH coefficients call IUpdateManager::GetDynamicObjectShCoeff.

    IUpdateManager::GetDynamicObjectShCoeff produces zeroed output until after the first asynchonous update after the object was added.

    	Geo::SHCoeff redCoeffs, greenCoeffs, blueCoeffs;
    	updateManager->GetDynamicObjectShCoeff(objectGuid, redCoeffs, greenCoeffs, blueCoeffs);
    

    To remove the object, call IUpdateManager::EnqueueRemoveDynamicObject.

    	updateManager->EnqueueRemoveDynamicObject(objectGuid);

    Render indirect lighting

    When you draw a mesh, use the SH coefficients in your pixel shader to evaluate SH lighting in the direction of the pixel normal.

    Light leaks

    When an object is close to a wall that separates two areas with very different lighting, probe lighting may appear to leak through a wall. This occurs because lighting is interpolated from probes that are on the other side of the wall.

    By default, for dynamic objects, Enlighten uses precomputed probe visibility data to prevent this type of light leak.

    This can sometimes cause probe lighting to change suddenly as an object moves.




    , multiple selections available,
    {"serverDuration": 27, "requestCorrelationId": "500148b316ed45ab885a95c0f0520381"}