Notifications
Clear all

[Closed] Info about how standard lights work?

I’m writing a Max plugin for appleseed, an open source physically-based production renderer.

I’m looking for any information that might help either translating Max lights into appleseed ones, or implementing new Max-compatible light models directly in appleseed itself.

I’ve look everywhere I could think of (SDK samples, NOX Renderer plugin for Max, etc.) but to no avail.

I’d appreciate any help regarding this issue!

6 Replies

Another related question:

Is it possible to retrieve the decay information (decay type and decay start distance) of a standard Max light?

I cannot find anything related to lights decay in the SDK documentation, and there doesn’t appear to be any method related to decay in the LightObject or LightDesc classes.

Help much appreciated!

 lo1

What you’re looking for is in the GenLight class

Brilliant, thanks lo!

I had come across this class in the documentation but since it was described as “a base class for creating plug-in lights”, it didn’t occur to me that Max’s built-in lights could derive from GenLight.

Thanks a lot. Any other info regarding how standard lights work, in particular values of any hardcoded multipliers, non-standard model, etc. is more than welcome.

Oh wow… Seems like I just stumbled on the Holy Grail: maxsdk\samples\objects\light.cpp seems to contain the implementation of all the standard Max lights. Posting this as a hint for any future coder coming here looking for answers…

The inclusion of all the base plugins source code with the SDK is pretty standard knowledge

The SDK documentation can be pretty limited…the sample code is often times far more helpful. I’d suggest setting the sample code root folder as a search folder in VS’s “Find in Files” function…makes it really easy to root through all the code fast and find what you’re looking for.

Yeah, I’m pretty new to Max development, sorry if I’m rediscovering basic stuff

I’ve been doing full text search in the SDK include\ and howto\ directories from the beginning, now I’m clearly including samples\ as well!