appleseedhq / appleseed-max

appleseed plugin for Autodesk® 3ds Max®
https://appleseedhq.net/
MIT License
33 stars 16 forks source link

Bugfix, realworld UV, Analytical light shapes #293

Closed usakhelo closed 5 years ago

usakhelo commented 5 years ago

Hi, I included three tickets into one PR but commits are separate so it should be easy to review it one by one. First two are actually trivial. Analytical lights work fine except rectangular light is never visible. Sphere, point, disc and rectangle shapes are supported. Other thing is that I had to rotate transform for the disc and rectangular light to align them according to max's shape. For point light I took sphere with radius 1, not sure about that. Visibility of the light shapes is controlled via appleseed obj. properties modifier. Diffuse visibility is ignored anyway, according to appleseed test scenes. @dictoon I'm not sure if this also fixes #261 ? It will support max's photometric lights but not in the right sense I guess.. It should probably accept proper intensity values and things like that..

Rectangular light is on the back side. It's not visible for some reason. There's is some hint of it in the floor reflection but it's very dim compared to intensity: image

Thanks.

dictoon commented 5 years ago

Other thing is that I had to rotate transform for the disc and rectangular light to align them according to max's shape.

That's fine, appleseed and Max conventions are not necessarily the same.

For point light I took sphere with radius 1, not sure about that.

Point lights in Max should be translated to point lights in appleseed, not spherical lights. That's how it worked until now.

Visibility of the light shapes is controlled via appleseed obj. properties modifier. Diffuse visibility is ignored anyway, according to appleseed test scenes.

I'm not sure what you mean here. By default object instances are visible to all ray types, and that shouldn't be any different for implicit shapes.

usakhelo commented 5 years ago

Almost there!

What's the difference between a point light and an omni light (for which we have special support in appleseed core in the form of the MaxOmniLight class)?

I don't see any difference except decay_start and decay_exponent parameters for MaxOmniLight.

dictoon commented 5 years ago

If you think this is correct, then feel free to merge the PR, I approved it.

dictoon commented 5 years ago

One last thing: please fuse related commits together before merging. Thanks!

usakhelo commented 5 years ago

I think it's correct @dictoon It seems correct to replace max's photometric lights with point light in appleseed because they have standard decay, unlike omni lights. I think it should be fine. Thanks for review, squash merging these..

usakhelo commented 5 years ago

Sorry, not squash, will rebase it and merge then.