Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

HideElements
cssselector#tocVertical, #tocHorizontal

Identifying Corona Shade Context

Corona uses 2 shade contexts - one for hit into the scene background (environment), and other for all geometry hits. Their Class_IDs are:

...

Corona shade contexts try to conform to 3ds Max API specifications as much as possible, but sometimes that is not possible for multiple reasons (confusing or ambiguous API documentation, design differences between a physically based renderer and the old rasterizer architecture the API was created for, …). Notable methods that do not work are:

  • Light()

  • GetEvalObject()

  • NodeID()

You can get additional functionality with the Execute method Execute method. When passing passing constexpr int CORONA_GET_INSTANCE_ID = 0x389A7625 as cmd as cmd argument, scene geometry hit ShadeContext will return a unique ID of the currently hit object instance (of type uint64_t). This can be used for example to randomize color between different instances.