Cycles: Automatically detect HDRI resolution by default and use non-square sampling map
ClosedPublic

Authored by Lukas Stockner (lukasstockner97) on Jun 14 2018, 4:21 PM.

Details

Summary

The automatic mode checks all Enviroment Texture nodes and picks the largest image's resolution.
If there are no Enviroment Textures, it just uses the old default.

Also, the sampling map now isn't limited to square shapes. The automatic detection uses the exact image size,
the manual UI option now halves the value to get the height.

A default aspect ratio of 2:1 makes sense, since this is what most HDRIs use.

Diff Detail

Repository
rB Blender
Brecht Van Lommel (brecht) requested changes to this revision.Jun 14 2018, 4:42 PM

Looks great, just minor comments about naming and properties.

intern/cycles/blender/addon/properties.py
132

Off -> None
OFF -> NONE

946–947

We can remove this property, see below.

953–958

sampling_type -> sampling_method
Sampling type -> Sampling Method

intern/cycles/blender/addon/ui.py
1217

Rename "MIS" to "Sampling", for consistency with volumes.

1220–1223

DISABLED should be OFF? (or NONE)

intern/cycles/blender/addon/version_update.py
435

This should test cworld.sample_as_light?

We can use cworld.get("sample_as_light", False) instead, which still works if we don't register the property anymore.

438

DISABLED -> OFF or NONE

This revision now requires changes to proceed.Jun 14 2018, 4:42 PM
This revision was not accepted when it landed; it landed in state Needs Revision.Jun 14 2018, 10:31 PM
This revision was automatically updated to reflect the committed changes.