[Closed] Default light located at the viewpoint?
About default lights (class DefaultLight), the SDK says : “In 3ds Max 3.0 the production renderer has been modified so that if a DefaultLight is passed into Renderer::Open() with a transformation matrix that is all zeros, the renderer will interpret this to mean that on each frame it should create a light located at the view point, pointing in the view direction. This allows the implementation of the new viewport 1-light option so that it tracks the camera during an animated camera move.”
Is this still a feature in modern versions of Max? If so, how can I enable it to make sure my renderer plugin handles this case properly?
All I could find is the “Default Lights Follow View Angle” checkbox in the Viewport Configuration window, but it doesn’t seem to be that (I couldn’t figure out what this checkbox really does).
I have not implemented this myself yet, but I noticed (while implementing material preview) that the ‘open’ function has a parameter that holds all the default lights in max.
This is for example where you would get the default lights if you have no lights in your scene.
So I would recommend to look there.
The varialbes are:
defaultLights
and
numDefLights
in the open function.
The renderer itself will add data to these variables automatically, so as long as you create a loop
that loops through numDefLights and create point light in there – then max handles the rest.
Hi Stig,
Yes, I’m already supporting the default lights.
However I’m unable to reproduce the scenario described in the SDK. I guess this is more of a user question, maybe I should post in the 3ds Max users forum here.