2023-06-14 16:52:36 +10:00
|
|
|
# SPDX-FileCopyrightText: 2011-2022 Blender Foundation
|
|
|
|
|
#
|
2022-02-11 13:53:21 +01:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2023-06-14 16:52:36 +10:00
|
|
|
|
2021-02-21 21:21:18 +11:00
|
|
|
from __future__ import annotations
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
import bpy
|
2023-02-23 22:00:57 +01:00
|
|
|
from bpy.app.translations import contexts as i18n_contexts
|
2019-03-13 12:41:22 +11:00
|
|
|
from bl_ui.utils import PresetPanel
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2023-05-24 13:36:13 +02:00
|
|
|
from bpy.types import Panel, Menu
|
2011-08-29 13:59:11 +00:00
|
|
|
|
2019-09-12 16:12:19 +02:00
|
|
|
from bl_ui.properties_grease_pencil_common import GreasePencilSimplifyPanel
|
2024-12-28 01:44:49 +01:00
|
|
|
from bl_ui.properties_render import draw_curves_settings, CompositorPerformanceButtonsPanel, CompositorDenoisePerformanceButtonsPanel
|
2024-08-20 14:25:56 +10:00
|
|
|
from bl_ui.properties_view_layer import (
|
|
|
|
|
ViewLayerCryptomattePanelHelper,
|
|
|
|
|
ViewLayerAOVPanelHelper,
|
|
|
|
|
ViewLayerLightgroupsPanelHelper,
|
|
|
|
|
)
|
2019-09-12 16:12:19 +02:00
|
|
|
|
2024-10-03 18:41:06 +02:00
|
|
|
from bl_ui.properties_object import has_geometry_visibility
|
|
|
|
|
|
2022-04-20 16:07:03 +10:00
|
|
|
|
2021-10-20 13:16:12 +02:00
|
|
|
class CyclesPresetPanel(PresetPanel, Panel):
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
preset_operator = "script.execute_preset"
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
2024-04-12 13:21:42 +10:00
|
|
|
def post_cb(context, _filepath):
|
2021-10-20 13:16:12 +02:00
|
|
|
# Modify an arbitrary built-in scene property to force a depsgraph
|
2023-02-12 14:37:16 +11:00
|
|
|
# update, because add-on properties don't. (see #62325)
|
2021-10-20 13:16:12 +02:00
|
|
|
render = context.scene.render
|
|
|
|
|
render.filter_size = render.filter_size
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2022-04-20 16:07:03 +10:00
|
|
|
|
2021-10-20 13:16:12 +02:00
|
|
|
class CYCLES_PT_sampling_presets(CyclesPresetPanel):
|
2013-07-19 23:59:40 +00:00
|
|
|
bl_label = "Sampling Presets"
|
|
|
|
|
preset_subdir = "cycles/sampling"
|
2018-04-27 13:50:26 +02:00
|
|
|
preset_add_operator = "render.cycles_sampling_preset_add"
|
2013-07-19 23:59:40 +00:00
|
|
|
|
2022-04-20 16:07:03 +10:00
|
|
|
|
2021-10-20 13:16:12 +02:00
|
|
|
class CYCLES_PT_viewport_sampling_presets(CyclesPresetPanel):
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
bl_label = "Viewport Sampling Presets"
|
|
|
|
|
preset_subdir = "cycles/viewport_sampling"
|
|
|
|
|
preset_add_operator = "render.cycles_viewport_sampling_preset_add"
|
2013-07-19 23:59:40 +00:00
|
|
|
|
2022-04-20 16:07:03 +10:00
|
|
|
|
2021-10-20 13:16:12 +02:00
|
|
|
class CYCLES_PT_integrator_presets(CyclesPresetPanel):
|
2011-08-29 17:55:14 +00:00
|
|
|
bl_label = "Integrator Presets"
|
|
|
|
|
preset_subdir = "cycles/integrator"
|
2018-04-27 13:50:26 +02:00
|
|
|
preset_add_operator = "render.cycles_integrator_preset_add"
|
2011-08-29 17:55:14 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2022-07-13 15:23:50 +02:00
|
|
|
class CYCLES_PT_performance_presets(CyclesPresetPanel):
|
|
|
|
|
bl_label = "Performance Presets"
|
|
|
|
|
preset_subdir = "cycles/performance"
|
|
|
|
|
preset_add_operator = "render.cycles_performance_preset_add"
|
|
|
|
|
|
|
|
|
|
|
2015-01-29 15:35:06 +11:00
|
|
|
class CyclesButtonsPanel:
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_space_type = "PROPERTIES"
|
|
|
|
|
bl_region_type = "WINDOW"
|
|
|
|
|
bl_context = "render"
|
2014-02-09 13:53:58 +01:00
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-03 14:04:59 +02:00
|
|
|
return context.engine in cls.COMPAT_ENGINES
|
2014-04-15 13:11:48 +10:00
|
|
|
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
class CyclesDebugButtonsPanel(CyclesButtonsPanel):
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
prefs = bpy.context.preferences
|
2024-11-02 15:43:26 +11:00
|
|
|
return (
|
|
|
|
|
CyclesButtonsPanel.poll(context) and
|
|
|
|
|
prefs.experimental.use_cycles_debug and
|
|
|
|
|
prefs.view.show_developer_ui
|
|
|
|
|
)
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
|
|
|
|
|
|
2019-03-17 17:52:05 +01:00
|
|
|
# Adapt properties editor panel to display in node editor. We have to
|
|
|
|
|
# copy the class rather than inherit due to the way bpy registration works.
|
|
|
|
|
def node_panel(cls):
|
|
|
|
|
node_cls = type('NODE_' + cls.__name__, cls.__bases__, dict(cls.__dict__))
|
2018-12-07 00:43:07 +01:00
|
|
|
|
2019-03-17 17:52:05 +01:00
|
|
|
node_cls.bl_space_type = 'NODE_EDITOR'
|
|
|
|
|
node_cls.bl_region_type = 'UI'
|
2019-05-19 13:07:47 +02:00
|
|
|
node_cls.bl_category = "Options"
|
2019-03-17 17:52:05 +01:00
|
|
|
if hasattr(node_cls, 'bl_parent_id'):
|
|
|
|
|
node_cls.bl_parent_id = 'NODE_' + node_cls.bl_parent_id
|
|
|
|
|
|
|
|
|
|
return node_cls
|
2018-12-07 00:43:07 +01:00
|
|
|
|
|
|
|
|
|
Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).
From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.
Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.
Reviewers: #cycles, brecht
Reviewed By: #cycles, brecht
Subscribers: brecht, juicyfruit, mib2berlin, Blendify
Differential Revision: https://developer.blender.org/D2338
2016-11-07 02:33:53 +01:00
|
|
|
def get_device_type(context):
|
2018-12-21 12:47:44 +11:00
|
|
|
return context.preferences.addons[__package__].preferences.compute_device_type
|
Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).
From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.
Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.
Reviewers: #cycles, brecht
Reviewed By: #cycles, brecht
Subscribers: brecht, juicyfruit, mib2berlin, Blendify
Differential Revision: https://developer.blender.org/D2338
2016-11-07 02:33:53 +01:00
|
|
|
|
|
|
|
|
|
2024-01-10 19:52:06 +01:00
|
|
|
def backend_has_active_gpu(context):
|
|
|
|
|
return context.preferences.addons[__package__].preferences.has_active_device()
|
|
|
|
|
|
|
|
|
|
|
2014-04-05 12:31:59 +02:00
|
|
|
def use_cpu(context):
|
|
|
|
|
cscene = context.scene.cycles
|
2014-04-15 13:11:48 +10:00
|
|
|
|
2024-01-10 19:52:06 +01:00
|
|
|
return (get_device_type(context) == 'NONE' or cscene.device == 'CPU' or not backend_has_active_gpu(context))
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2015-05-17 17:17:31 +10:00
|
|
|
|
2024-07-04 11:21:45 +02:00
|
|
|
def use_gpu(context):
|
2021-12-07 15:11:35 +00:00
|
|
|
cscene = context.scene.cycles
|
|
|
|
|
|
2024-07-04 11:21:45 +02:00
|
|
|
return (get_device_type(context) != 'NONE' and cscene.device == 'GPU' and backend_has_active_gpu(context))
|
2021-12-07 15:11:35 +00:00
|
|
|
|
2022-04-20 16:07:03 +10:00
|
|
|
|
2024-07-04 11:21:45 +02:00
|
|
|
def use_metal(context):
|
|
|
|
|
return (get_device_type(context) == 'METAL' and use_gpu(context))
|
2016-01-10 21:50:44 +01:00
|
|
|
|
|
|
|
|
|
2024-07-04 11:21:45 +02:00
|
|
|
def use_cuda(context):
|
|
|
|
|
return (get_device_type(context) == 'CUDA' and use_gpu(context))
|
2016-01-10 21:50:44 +01:00
|
|
|
|
2021-09-28 16:51:14 +02:00
|
|
|
|
2024-07-04 11:21:45 +02:00
|
|
|
def use_hip(context):
|
|
|
|
|
return (get_device_type(context) == 'HIP' and use_gpu(context))
|
2021-09-28 16:51:14 +02:00
|
|
|
|
2022-04-20 16:07:03 +10:00
|
|
|
|
2019-09-12 14:50:06 +02:00
|
|
|
def use_optix(context):
|
2024-07-04 11:21:45 +02:00
|
|
|
return (get_device_type(context) == 'OPTIX' and use_gpu(context))
|
2019-09-12 14:50:06 +02:00
|
|
|
|
2024-02-06 12:42:26 -05:00
|
|
|
|
2022-06-29 12:58:04 +02:00
|
|
|
def use_oneapi(context):
|
2024-07-04 11:21:45 +02:00
|
|
|
return (get_device_type(context) == 'ONEAPI' and use_gpu(context))
|
2022-04-20 16:07:03 +10:00
|
|
|
|
2022-06-30 12:14:23 +10:00
|
|
|
|
2022-01-25 17:33:41 +01:00
|
|
|
def use_multi_device(context):
|
2024-07-04 11:21:45 +02:00
|
|
|
if use_gpu(context):
|
|
|
|
|
return context.preferences.addons[__package__].preferences.has_multi_device()
|
|
|
|
|
return False
|
2022-01-25 17:33:41 +01:00
|
|
|
|
2019-09-12 14:50:06 +02:00
|
|
|
|
2017-03-12 06:45:29 +01:00
|
|
|
def show_device_active(context):
|
|
|
|
|
cscene = context.scene.cycles
|
2024-07-04 11:21:45 +02:00
|
|
|
if cscene.device == 'CPU':
|
Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).
From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.
Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.
Reviewers: #cycles, brecht
Reviewed By: #cycles, brecht
Subscribers: brecht, juicyfruit, mib2berlin, Blendify
Differential Revision: https://developer.blender.org/D2338
2016-11-07 02:33:53 +01:00
|
|
|
return True
|
2024-07-04 11:21:45 +02:00
|
|
|
return use_gpu(context)
|
Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).
From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.
Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.
Reviewers: #cycles, brecht
Reviewed By: #cycles, brecht
Subscribers: brecht, juicyfruit, mib2berlin, Blendify
Differential Revision: https://developer.blender.org/D2338
2016-11-07 02:33:53 +01:00
|
|
|
|
2024-06-04 02:01:44 +02:00
|
|
|
|
2024-06-03 22:41:25 +02:00
|
|
|
def show_preview_denoise_active(context):
|
|
|
|
|
cscene = context.scene.cycles
|
|
|
|
|
if not cscene.use_preview_denoising:
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
if cscene.preview_denoiser == 'OPTIX':
|
|
|
|
|
return has_optixdenoiser_gpu_devices(context)
|
|
|
|
|
|
|
|
|
|
# OIDN is always available, thanks to CPU support
|
|
|
|
|
return True
|
|
|
|
|
|
2024-06-04 02:01:44 +02:00
|
|
|
|
2024-06-03 22:41:25 +02:00
|
|
|
def show_denoise_active(context):
|
|
|
|
|
cscene = context.scene.cycles
|
|
|
|
|
if not cscene.use_denoising:
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
if cscene.denoiser == 'OPTIX':
|
|
|
|
|
return has_optixdenoiser_gpu_devices(context)
|
|
|
|
|
|
|
|
|
|
# OIDN is always available, thanks to CPU support
|
|
|
|
|
return True
|
|
|
|
|
|
2016-01-21 09:00:10 +01:00
|
|
|
|
2024-03-08 16:26:52 +01:00
|
|
|
def get_effective_preview_denoiser(context, has_oidn_gpu):
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
if cscene.preview_denoiser != "AUTO":
|
|
|
|
|
return cscene.preview_denoiser
|
|
|
|
|
|
2024-03-08 16:26:52 +01:00
|
|
|
if has_oidn_gpu:
|
|
|
|
|
return 'OPENIMAGEDENOISE'
|
|
|
|
|
|
2024-07-03 16:00:02 +02:00
|
|
|
if has_optixdenoiser_gpu_devices(context):
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
return 'OPTIX'
|
|
|
|
|
|
2024-03-08 16:26:52 +01:00
|
|
|
return 'OPENIMAGEDENOISE'
|
2013-08-23 14:08:40 +00:00
|
|
|
|
2024-02-06 12:42:26 -05:00
|
|
|
|
2024-02-06 17:46:21 +01:00
|
|
|
def has_oidn_gpu_devices(context):
|
|
|
|
|
return context.preferences.addons[__package__].preferences.has_oidn_gpu_devices()
|
|
|
|
|
|
2024-06-04 02:01:44 +02:00
|
|
|
|
2024-06-03 22:41:25 +02:00
|
|
|
def has_optixdenoiser_gpu_devices(context):
|
|
|
|
|
return context.preferences.addons[__package__].preferences.has_optixdenoiser_gpu_devices()
|
|
|
|
|
|
2022-10-28 17:06:21 +11:00
|
|
|
|
2022-10-25 19:36:13 +01:00
|
|
|
def use_mnee(context):
|
|
|
|
|
# The MNEE kernel doesn't compile on macOS < 13.
|
|
|
|
|
if use_metal(context):
|
|
|
|
|
import platform
|
2022-11-22 17:11:32 +01:00
|
|
|
version, _, _ = platform.mac_ver()
|
|
|
|
|
major_version = version.split(".")[0]
|
|
|
|
|
if int(major_version) < 13:
|
2022-10-25 19:36:13 +01:00
|
|
|
return False
|
|
|
|
|
return True
|
2013-08-22 19:57:56 +00:00
|
|
|
|
2022-10-28 17:06:21 +11:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_sampling(CyclesButtonsPanel, Panel):
|
2012-06-13 11:44:48 +00:00
|
|
|
bl_label = "Sampling"
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
def draw(self, context):
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CYCLES_RENDER_PT_sampling_viewport(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Viewport"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_sampling"
|
|
|
|
|
|
2018-04-27 13:50:26 +02:00
|
|
|
def draw_header_preset(self, context):
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
CYCLES_PT_viewport_sampling_presets.draw_panel_header(self.layout)
|
2018-04-27 13:50:26 +02:00
|
|
|
|
2012-06-13 11:44:48 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
2013-08-23 04:04:46 +00:00
|
|
|
|
2018-05-30 17:47:48 +02:00
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2015-05-15 13:49:17 +02:00
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
heading = layout.column(align=True, heading="Noise Threshold")
|
|
|
|
|
row = heading.row(align=True)
|
|
|
|
|
row.prop(cscene, "use_preview_adaptive_sampling", text="")
|
|
|
|
|
sub = row.row()
|
|
|
|
|
sub.active = cscene.use_preview_adaptive_sampling
|
|
|
|
|
sub.prop(cscene, "preview_adaptive_threshold", text="")
|
2012-06-13 11:44:48 +00:00
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
if cscene.use_preview_adaptive_sampling:
|
2018-05-30 17:47:48 +02:00
|
|
|
col = layout.column(align=True)
|
2022-12-09 15:41:05 -06:00
|
|
|
col.prop(cscene, "preview_samples", text="Max Samples")
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
col.prop(cscene, "preview_adaptive_min_samples", text="Min Samples")
|
2018-10-16 17:11:37 +02:00
|
|
|
else:
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
layout.prop(cscene, "preview_samples", text="Samples")
|
2018-08-23 17:29:05 +02:00
|
|
|
|
2020-02-11 16:30:01 +01:00
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
class CYCLES_RENDER_PT_sampling_viewport_denoise(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Denoise"
|
|
|
|
|
bl_parent_id = 'CYCLES_RENDER_PT_sampling_viewport'
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2018-08-23 17:29:05 +02:00
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
def draw_header(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
2018-08-23 17:29:05 +02:00
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
self.layout.prop(context.scene.cycles, "use_preview_denoising", text="")
|
2018-08-23 17:29:05 +02:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-08-23 17:29:05 +02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
col = layout.column()
|
|
|
|
|
col.active = cscene.use_preview_denoising
|
2024-06-03 22:41:25 +02:00
|
|
|
|
|
|
|
|
sub = col.column()
|
|
|
|
|
sub.active = show_preview_denoise_active(context)
|
|
|
|
|
sub.prop(cscene, "preview_denoiser", text="Denoiser")
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
col.prop(cscene, "preview_denoising_input_passes", text="Passes")
|
2018-08-23 17:29:05 +02:00
|
|
|
|
2024-03-08 16:26:52 +01:00
|
|
|
has_oidn_gpu = has_oidn_gpu_devices(context)
|
|
|
|
|
effective_preview_denoiser = get_effective_preview_denoiser(context, has_oidn_gpu)
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
if effective_preview_denoiser == 'OPENIMAGEDENOISE':
|
|
|
|
|
col.prop(cscene, "preview_denoising_prefilter", text="Prefilter")
|
2024-05-06 18:56:16 +02:00
|
|
|
col.prop(cscene, "preview_denoising_quality", text="Quality")
|
2018-08-23 17:29:05 +02:00
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
col.prop(cscene, "preview_denoising_start_sample", text="Start Sample")
|
2018-10-16 17:11:37 +02:00
|
|
|
|
2024-02-06 17:46:21 +01:00
|
|
|
if effective_preview_denoiser == 'OPENIMAGEDENOISE':
|
|
|
|
|
row = col.row()
|
2024-06-03 22:41:25 +02:00
|
|
|
row.active = has_oidn_gpu_devices(context)
|
2024-02-06 17:46:21 +01:00
|
|
|
row.prop(cscene, "preview_denoising_use_gpu", text="Use GPU")
|
|
|
|
|
|
2018-10-16 17:11:37 +02:00
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
class CYCLES_RENDER_PT_sampling_render(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Render"
|
2020-03-07 12:23:09 +01:00
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_sampling"
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
def draw_header_preset(self, context):
|
|
|
|
|
CYCLES_PT_sampling_presets.draw_panel_header(self.layout)
|
2020-03-07 12:23:09 +01:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
|
|
heading = layout.column(align=True, heading="Noise Threshold")
|
|
|
|
|
row = heading.row(align=True)
|
|
|
|
|
row.prop(cscene, "use_adaptive_sampling", text="")
|
|
|
|
|
sub = row.row()
|
|
|
|
|
sub.active = cscene.use_adaptive_sampling
|
|
|
|
|
sub.prop(cscene, "adaptive_threshold", text="")
|
2020-03-07 12:23:09 +01:00
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
if cscene.use_adaptive_sampling:
|
2022-12-09 15:41:05 -06:00
|
|
|
col.prop(cscene, "samples", text="Max Samples")
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
col.prop(cscene, "adaptive_min_samples", text="Min Samples")
|
|
|
|
|
else:
|
|
|
|
|
col.prop(cscene, "samples", text="Samples")
|
|
|
|
|
col.prop(cscene, "time_limit")
|
2020-03-07 12:23:09 +01:00
|
|
|
|
2020-05-31 23:49:10 +02:00
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
class CYCLES_RENDER_PT_sampling_render_denoise(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Denoise"
|
|
|
|
|
bl_parent_id = 'CYCLES_RENDER_PT_sampling_render'
|
2020-05-31 23:49:10 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
def draw_header(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
self.layout.prop(context.scene.cycles, "use_denoising", text="")
|
|
|
|
|
|
2020-05-31 23:49:10 +02:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
col = layout.column()
|
|
|
|
|
col.active = cscene.use_denoising
|
2024-06-03 22:41:25 +02:00
|
|
|
|
|
|
|
|
sub = col.column()
|
|
|
|
|
sub.active = show_denoise_active(context)
|
|
|
|
|
sub.prop(cscene, "denoiser", text="Denoiser")
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
col.prop(cscene, "denoising_input_passes", text="Passes")
|
|
|
|
|
if cscene.denoiser == 'OPENIMAGEDENOISE':
|
|
|
|
|
col.prop(cscene, "denoising_prefilter", text="Prefilter")
|
2024-05-06 18:56:16 +02:00
|
|
|
col.prop(cscene, "denoising_quality", text="Quality")
|
2020-05-31 23:49:10 +02:00
|
|
|
|
2024-02-06 17:46:21 +01:00
|
|
|
if cscene.denoiser == 'OPENIMAGEDENOISE':
|
|
|
|
|
row = col.row()
|
2024-06-03 22:41:25 +02:00
|
|
|
row.active = has_oidn_gpu_devices(context)
|
2024-02-06 17:46:21 +01:00
|
|
|
row.prop(cscene, "denoising_use_gpu", text="Use GPU")
|
|
|
|
|
|
2020-05-31 23:49:10 +02:00
|
|
|
|
2022-09-21 17:58:34 +02:00
|
|
|
class CYCLES_RENDER_PT_sampling_path_guiding(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Path Guiding"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_sampling"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
from . import engine
|
|
|
|
|
return use_cpu(context) and engine.with_path_guiding()
|
|
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
self.layout.prop(cscene, "use_guiding", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
layout.active = cscene.use_guiding
|
|
|
|
|
|
2022-11-17 16:18:18 +01:00
|
|
|
layout.prop(cscene, "guiding_training_samples")
|
|
|
|
|
|
2022-09-21 17:58:34 +02:00
|
|
|
col = layout.column(align=True)
|
2022-11-17 16:18:18 +01:00
|
|
|
col.prop(cscene, "use_surface_guiding", text="Surface")
|
2023-02-23 22:00:57 +01:00
|
|
|
col.prop(cscene, "use_volume_guiding", text="Volume", text_ctxt=i18n_contexts.id_id)
|
2022-09-21 17:58:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class CYCLES_RENDER_PT_sampling_path_guiding_debug(CyclesDebugButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Debug"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_sampling_path_guiding"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
layout.active = cscene.use_guiding
|
|
|
|
|
|
|
|
|
|
layout.prop(cscene, "guiding_distribution_type", text="Distribution Type")
|
2023-05-09 15:06:34 +02:00
|
|
|
layout.prop(cscene, "guiding_roughness_threshold")
|
|
|
|
|
layout.prop(cscene, "guiding_directional_sampling_type", text="Directional Sampling Type")
|
2022-09-21 17:58:34 +02:00
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(cscene, "surface_guiding_probability")
|
|
|
|
|
col.prop(cscene, "volume_guiding_probability")
|
|
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(cscene, "use_deterministic_guiding")
|
|
|
|
|
col.prop(cscene, "use_guiding_direct_light")
|
|
|
|
|
col.prop(cscene, "use_guiding_mis_weights")
|
|
|
|
|
|
|
|
|
|
|
2018-10-16 17:11:37 +02:00
|
|
|
class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Advanced"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_sampling"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
2017-03-28 16:29:20 -04:00
|
|
|
|
Cycles: Implement blue-noise dithered sampling
This patch implements blue-noise dithered sampling as described by Nathan Vegdahl (https://psychopath.io/post/2022_07_24_owen_scrambling_based_dithered_blue_noise_sampling), which in turn is based on "Screen-Space Blue-Noise Diffusion of Monte Carlo Sampling Error via Hierarchical Ordering of Pixels"(https://repository.kaust.edu.sa/items/1269ae24-2596-400b-a839-e54486033a93).
The basic idea is simple: Instead of generating independent sequences for each pixel by scrambling them, we use a single sequence for the entire image, with each pixel getting one chunk of the samples. The ordering across pixels is determined by hierarchical scrambling of the pixel's position along a space-filling curve, which ends up being pretty much the same operation as already used for the underlying sequence.
This results in a more high-frequency noise distribution, which appears smoother despite not being less noisy overall.
The main limitation at the moment is that the improvement is only clear if the full sample amount is used per pixel, so interactive preview rendering and adaptive sampling will not receive the benefit. One exception to this is that when using the new "Automatic" setting, the first sample in interactive rendering will also be blue-noise-distributed.
The sampling mode option is now exposed in the UI, with the three options being Blue Noise (the new mode), Classic (the previous Tabulated Sobol method) and the new default, Automatic (blue noise, with the additional property of ensuring the first sample is also blue-noise-distributed in interactive rendering). When debug mode is enabled, additional options appear, such as Sobol-Burley.
Note that the scrambling distance option is not compatible with the blue-noise pattern.
Pull Request: https://projects.blender.org/blender/blender/pulls/118479
2024-06-05 02:29:47 +02:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(cscene, "sampling_pattern", text="Pattern")
|
|
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(cscene, "seed")
|
2018-06-20 18:21:01 +02:00
|
|
|
row.prop(cscene, "use_animated_seed", text="", icon='TIME')
|
2018-06-04 12:20:40 +02:00
|
|
|
|
2021-10-27 16:36:56 +02:00
|
|
|
layout.separator()
|
|
|
|
|
|
2021-11-22 15:56:51 +01:00
|
|
|
heading = layout.column(align=True, heading="Scrambling Distance")
|
2023-09-27 20:31:14 +02:00
|
|
|
# Tabulated Sobol is used when the debug UI is turned off.
|
Cycles: Implement blue-noise dithered sampling
This patch implements blue-noise dithered sampling as described by Nathan Vegdahl (https://psychopath.io/post/2022_07_24_owen_scrambling_based_dithered_blue_noise_sampling), which in turn is based on "Screen-Space Blue-Noise Diffusion of Monte Carlo Sampling Error via Hierarchical Ordering of Pixels"(https://repository.kaust.edu.sa/items/1269ae24-2596-400b-a839-e54486033a93).
The basic idea is simple: Instead of generating independent sequences for each pixel by scrambling them, we use a single sequence for the entire image, with each pixel getting one chunk of the samples. The ordering across pixels is determined by hierarchical scrambling of the pixel's position along a space-filling curve, which ends up being pretty much the same operation as already used for the underlying sequence.
This results in a more high-frequency noise distribution, which appears smoother despite not being less noisy overall.
The main limitation at the moment is that the improvement is only clear if the full sample amount is used per pixel, so interactive preview rendering and adaptive sampling will not receive the benefit. One exception to this is that when using the new "Automatic" setting, the first sample in interactive rendering will also be blue-noise-distributed.
The sampling mode option is now exposed in the UI, with the three options being Blue Noise (the new mode), Classic (the previous Tabulated Sobol method) and the new default, Automatic (blue noise, with the additional property of ensuring the first sample is also blue-noise-distributed in interactive rendering). When debug mode is enabled, additional options appear, such as Sobol-Burley.
Note that the scrambling distance option is not compatible with the blue-noise pattern.
Pull Request: https://projects.blender.org/blender/blender/pulls/118479
2024-06-05 02:29:47 +02:00
|
|
|
heading.active = cscene.sampling_pattern == 'TABULATED_SOBOL'
|
2021-11-22 15:56:51 +01:00
|
|
|
heading.prop(cscene, "auto_scrambling_distance", text="Automatic")
|
2022-03-15 16:08:10 +01:00
|
|
|
heading.prop(cscene, "preview_scrambling_distance", text="Viewport")
|
2021-11-22 15:56:51 +01:00
|
|
|
heading.prop(cscene, "scrambling_distance", text="Multiplier")
|
2018-06-04 12:20:40 +02:00
|
|
|
|
2018-11-06 19:52:19 +01:00
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2019-06-28 17:06:32 +02:00
|
|
|
col.prop(cscene, "min_light_bounces")
|
|
|
|
|
col.prop(cscene, "min_transparent_bounces")
|
2018-11-06 19:52:19 +01:00
|
|
|
|
2018-12-28 18:37:05 +01:00
|
|
|
for view_layer in scene.view_layers:
|
|
|
|
|
if view_layer.samples > 0:
|
|
|
|
|
layout.separator()
|
|
|
|
|
layout.row().prop(cscene, "use_layer_samples")
|
|
|
|
|
break
|
|
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
|
2025-01-15 07:41:16 +01:00
|
|
|
class CYCLES_RENDER_PT_sampling_advanced_sample_subset(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Sample Subset"
|
|
|
|
|
bl_parent_id = 'CYCLES_RENDER_PT_sampling_advanced'
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
self.layout.prop(cscene, "use_sample_subset", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.active = cscene.use_sample_subset
|
|
|
|
|
col.prop(cscene, "sample_offset", text="Offset")
|
|
|
|
|
col.prop(cscene, "sample_subset_length", text="Length")
|
|
|
|
|
|
|
|
|
|
|
2022-12-02 19:04:00 +01:00
|
|
|
class CYCLES_RENDER_PT_sampling_lights(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Lights"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_sampling"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
2022-12-13 19:14:29 +01:00
|
|
|
def draw(self, context):
|
2022-12-02 19:04:00 +01:00
|
|
|
layout = self.layout
|
2022-12-15 10:25:06 +01:00
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
2022-12-02 19:04:00 +01:00
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
2022-12-15 10:25:06 +01:00
|
|
|
col = layout.column(align=True)
|
2022-12-13 19:14:29 +01:00
|
|
|
col.prop(cscene, "use_light_tree")
|
|
|
|
|
sub = col.row()
|
|
|
|
|
sub.prop(cscene, "light_sampling_threshold", text="Light Threshold")
|
|
|
|
|
sub.active = not cscene.use_light_tree
|
|
|
|
|
|
|
|
|
|
|
2018-11-06 19:52:19 +01:00
|
|
|
class CYCLES_RENDER_PT_subdivision(CyclesButtonsPanel, Panel):
|
2018-06-04 12:20:40 +02:00
|
|
|
bl_label = "Subdivision"
|
2018-11-06 19:52:19 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
@classmethod
|
2019-04-19 07:36:07 +02:00
|
|
|
def poll(cls, context):
|
2019-03-18 15:56:54 +01:00
|
|
|
return (context.scene.render.engine == 'CYCLES') and (context.scene.cycles.feature_set == 'EXPERIMENTAL')
|
2018-06-04 12:20:40 +02:00
|
|
|
|
2013-12-29 22:19:38 +01:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2018-05-30 17:47:48 +02:00
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2013-12-29 22:19:38 +01:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
col = layout.column()
|
|
|
|
|
sub = col.column(align=True)
|
|
|
|
|
sub.prop(cscene, "dicing_rate", text="Dicing Rate Render")
|
2020-03-07 14:38:52 +01:00
|
|
|
sub.prop(cscene, "preview_dicing_rate", text="Viewport")
|
2018-01-12 00:50:34 +01:00
|
|
|
|
2018-05-30 17:47:48 +02:00
|
|
|
col.separator()
|
2018-01-12 00:50:34 +01:00
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
col.prop(cscene, "offscreen_dicing_scale", text="Offscreen Scale")
|
|
|
|
|
col.prop(cscene, "max_subdivisions")
|
2016-04-17 20:15:50 +02:00
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
col.prop(cscene, "dicing_camera")
|
2016-04-17 20:15:50 +02:00
|
|
|
|
|
|
|
|
|
2022-04-06 16:19:44 -05:00
|
|
|
class CYCLES_RENDER_PT_curves(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Curves"
|
2018-11-06 19:52:19 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
ccscene = scene.cycles_curves
|
2016-10-11 16:33:07 +02:00
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
col = layout.column()
|
2016-10-11 16:33:07 +02:00
|
|
|
col.prop(ccscene, "shape", text="Shape")
|
2020-06-04 15:12:31 +02:00
|
|
|
if ccscene.shape == 'RIBBONS':
|
2020-06-23 17:51:25 -04:00
|
|
|
col.prop(ccscene, "subdivisions", text="Curve Subdivisions")
|
2016-10-11 16:33:07 +02:00
|
|
|
|
2022-04-20 16:07:03 +10:00
|
|
|
|
2022-04-06 16:19:44 -05:00
|
|
|
class CYCLES_RENDER_PT_curves_viewport_display(CyclesButtonsPanel, Panel):
|
2022-03-09 17:00:22 +01:00
|
|
|
bl_label = "Viewport Display"
|
2022-04-06 16:19:44 -05:00
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_curves"
|
2022-03-09 17:00:22 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
2022-04-06 16:19:44 -05:00
|
|
|
draw_curves_settings(self, context)
|
2013-12-29 22:19:38 +01:00
|
|
|
|
2022-04-20 16:07:03 +10:00
|
|
|
|
2018-11-06 19:52:19 +01:00
|
|
|
class CYCLES_RENDER_PT_volumes(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Volumes"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
2020-03-07 14:38:52 +01:00
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(cscene, "volume_step_rate", text="Step Rate Render")
|
|
|
|
|
col.prop(cscene, "volume_preview_step_rate", text="Viewport")
|
|
|
|
|
|
|
|
|
|
layout.prop(cscene, "volume_max_steps", text="Max Steps")
|
2018-11-06 19:52:19 +01:00
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_light_paths(CyclesButtonsPanel, Panel):
|
2012-06-13 11:44:48 +00:00
|
|
|
bl_label = "Light Paths"
|
2011-09-01 15:53:36 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2018-04-27 13:50:26 +02:00
|
|
|
def draw_header_preset(self, context):
|
2018-10-23 14:52:01 +02:00
|
|
|
CYCLES_PT_integrator_presets.draw_panel_header(self.layout)
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2018-04-27 13:50:26 +02:00
|
|
|
def draw(self, context):
|
|
|
|
|
pass
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
class CYCLES_RENDER_PT_light_paths_max_bounces(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Max Bounces"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_light_paths"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(cscene, "max_bounces", text="Total")
|
|
|
|
|
|
2018-05-30 17:47:48 +02:00
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(cscene, "diffuse_bounces", text="Diffuse")
|
|
|
|
|
col.prop(cscene, "glossy_bounces", text="Glossy")
|
|
|
|
|
col.prop(cscene, "transmission_bounces", text="Transmission")
|
2023-02-23 22:00:57 +01:00
|
|
|
col.prop(cscene, "volume_bounces", text="Volume", text_ctxt=i18n_contexts.id_id)
|
2012-06-13 11:44:48 +00:00
|
|
|
|
2021-07-05 13:38:08 +02:00
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(cscene, "transparent_max_bounces", text="Transparent")
|
|
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
|
2018-11-06 19:52:19 +01:00
|
|
|
class CYCLES_RENDER_PT_light_paths_clamping(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Clamping"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_light_paths"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(cscene, "sample_clamp_direct", text="Direct Light")
|
|
|
|
|
col.prop(cscene, "sample_clamp_indirect", text="Indirect Light")
|
|
|
|
|
|
|
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
class CYCLES_RENDER_PT_light_paths_caustics(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Caustics"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_light_paths"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
2018-05-30 17:47:48 +02:00
|
|
|
col = layout.column()
|
|
|
|
|
col.prop(cscene, "blur_glossy")
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Caustics", align=True)
|
|
|
|
|
col.prop(cscene, "caustics_reflective", text="Reflective")
|
|
|
|
|
col.prop(cscene, "caustics_refractive", text="Refractive")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2021-04-04 15:01:00 +02:00
|
|
|
class CYCLES_RENDER_PT_light_paths_fast_gi(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Fast GI Approximation"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_light_paths"
|
|
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
self.layout.prop(cscene, "use_fast_gi", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
world = scene.world
|
|
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
layout.active = cscene.use_fast_gi
|
|
|
|
|
|
2021-04-04 15:01:00 +02:00
|
|
|
col = layout.column(align=True)
|
2021-10-21 17:42:15 +02:00
|
|
|
col.prop(cscene, "fast_gi_method", text="Method")
|
2021-04-04 15:01:00 +02:00
|
|
|
|
|
|
|
|
if world:
|
2022-04-20 16:07:03 +10:00
|
|
|
light = world.light_settings
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(light, "ao_factor", text="AO Factor")
|
|
|
|
|
col.prop(light, "distance", text="AO Distance")
|
2021-04-04 15:01:00 +02:00
|
|
|
|
2021-10-21 17:42:15 +02:00
|
|
|
if cscene.fast_gi_method == 'REPLACE':
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(cscene, "ao_bounces", text="Viewport Bounces")
|
|
|
|
|
col.prop(cscene, "ao_bounces_render", text="Render Bounces")
|
|
|
|
|
|
2021-04-04 15:01:00 +02:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_motion_blur(CyclesButtonsPanel, Panel):
|
2012-10-16 10:48:19 +00:00
|
|
|
bl_label = "Motion Blur"
|
2012-04-30 12:49:26 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
|
rd = context.scene.render
|
|
|
|
|
|
|
|
|
|
self.layout.prop(rd, "use_motion_blur", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2018-05-30 17:47:48 +02:00
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2012-04-30 12:49:26 +00:00
|
|
|
|
2015-06-29 17:40:13 +02:00
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
rd = scene.render
|
2012-04-30 12:49:26 +00:00
|
|
|
layout.active = rd.use_motion_blur
|
|
|
|
|
|
2015-06-29 17:40:13 +02:00
|
|
|
col = layout.column()
|
2024-02-08 16:49:18 +01:00
|
|
|
col.prop(rd, "motion_blur_position", text="Position")
|
2015-06-29 17:40:13 +02:00
|
|
|
col.prop(rd, "motion_blur_shutter")
|
2018-06-04 12:20:40 +02:00
|
|
|
col.separator()
|
|
|
|
|
col.prop(cscene, "rolling_shutter_type", text="Rolling Shutter")
|
|
|
|
|
sub = col.column()
|
|
|
|
|
sub.active = cscene.rolling_shutter_type != 'NONE'
|
|
|
|
|
sub.prop(cscene, "rolling_shutter_duration")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CYCLES_RENDER_PT_motion_blur_curve(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Shutter Curve"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_motion_blur"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
|
|
|
|
layout.active = rd.use_motion_blur
|
2012-04-30 12:49:26 +00:00
|
|
|
|
2015-10-27 19:00:51 +05:00
|
|
|
col = layout.column()
|
2018-06-04 12:20:40 +02:00
|
|
|
|
2015-10-27 19:00:51 +05:00
|
|
|
col.template_curve_mapping(rd, "motion_blur_shutter_curve")
|
|
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
|
row.operator("render.shutter_curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH'
|
|
|
|
|
row.operator("render.shutter_curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND'
|
|
|
|
|
row.operator("render.shutter_curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT'
|
|
|
|
|
row.operator("render.shutter_curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP'
|
|
|
|
|
row.operator("render.shutter_curve_preset", icon='LINCURVE', text="").shape = 'LINE'
|
|
|
|
|
row.operator("render.shutter_curve_preset", icon='NOCURVE', text="").shape = 'MAX'
|
|
|
|
|
|
2012-04-30 12:49:26 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_film(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Film"
|
2018-05-30 17:47:48 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2018-05-30 17:47:48 +02:00
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2011-08-28 13:55:59 +00:00
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2018-05-30 17:47:48 +02:00
|
|
|
col = layout.column()
|
2011-09-01 15:53:36 +00:00
|
|
|
col.prop(cscene, "film_exposure")
|
2018-05-30 17:47:48 +02:00
|
|
|
|
|
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
class CYCLES_RENDER_PT_film_transparency(CyclesButtonsPanel, Panel):
|
2019-05-16 17:03:16 +02:00
|
|
|
bl_label = "Transparent"
|
2018-06-04 12:20:40 +02:00
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_film"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
def draw_header(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
2019-05-16 17:03:16 +02:00
|
|
|
rd = scene.render
|
2018-06-04 12:20:40 +02:00
|
|
|
|
2019-05-16 17:03:16 +02:00
|
|
|
layout.prop(rd, "film_transparent", text="")
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 12:20:40 +02:00
|
|
|
scene = context.scene
|
2019-05-16 17:03:16 +02:00
|
|
|
rd = scene.render
|
2018-06-04 12:20:40 +02:00
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
2019-05-16 17:03:16 +02:00
|
|
|
layout.active = rd.film_transparent
|
2018-05-30 17:47:48 +02:00
|
|
|
|
|
|
|
|
col = layout.column()
|
2018-06-04 12:20:40 +02:00
|
|
|
col.prop(cscene, "film_transparent_glass", text="Transparent Glass")
|
|
|
|
|
|
2018-05-30 17:47:48 +02:00
|
|
|
sub = col.column()
|
2019-05-16 17:03:16 +02:00
|
|
|
sub.active = rd.film_transparent and cscene.film_transparent_glass
|
2018-06-04 12:20:40 +02:00
|
|
|
sub.prop(cscene, "film_transparent_roughness", text="Roughness Threshold")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CYCLES_RENDER_PT_film_pixel_filter(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Pixel Filter"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_film"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 12:20:40 +02:00
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
2018-05-30 17:47:48 +02:00
|
|
|
|
|
|
|
|
col = layout.column()
|
2018-06-04 12:20:40 +02:00
|
|
|
col.prop(cscene, "pixel_filter_type", text="Type")
|
|
|
|
|
if cscene.pixel_filter_type != 'BOX':
|
|
|
|
|
col.prop(cscene, "filter_width", text="Width")
|
2018-01-11 20:03:31 +01:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_performance(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Performance"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2022-07-13 15:23:50 +02:00
|
|
|
def draw_header_preset(self, context):
|
|
|
|
|
CYCLES_PT_performance_presets.draw_panel_header(self.layout)
|
|
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
2018-11-06 19:52:19 +01:00
|
|
|
pass
|
2018-06-03 16:34:55 +02:00
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
|
2024-05-14 15:49:20 +02:00
|
|
|
class CYCLES_RENDER_PT_performance_compositor(CyclesButtonsPanel, CompositorPerformanceButtonsPanel, Panel):
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_performance"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
|
2024-12-28 01:44:49 +01:00
|
|
|
class CYCLES_RENDER_PT_performance_compositor_denoise_settings(
|
|
|
|
|
CyclesButtonsPanel, CompositorDenoisePerformanceButtonsPanel, Panel):
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_performance_compositor"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
class CYCLES_RENDER_PT_performance_threads(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Threads"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_performance"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
2018-06-03 16:34:55 +02:00
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
col.prop(rd, "threads_mode")
|
2013-08-23 20:41:21 +00:00
|
|
|
sub = col.column(align=True)
|
2011-08-28 13:55:59 +00:00
|
|
|
sub.enabled = rd.threads_mode == 'FIXED'
|
|
|
|
|
sub.prop(rd, "threads")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
|
2021-09-23 18:24:34 +02:00
|
|
|
class CYCLES_RENDER_PT_performance_memory(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Memory"
|
2018-06-04 12:20:40 +02:00
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_performance"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
2017-08-21 15:09:03 +02:00
|
|
|
|
2018-05-30 17:47:48 +02:00
|
|
|
col = layout.column()
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
col.prop(cscene, "use_auto_tile")
|
2018-05-30 17:47:48 +02:00
|
|
|
sub = col.column()
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
sub.active = cscene.use_auto_tile
|
|
|
|
|
sub.prop(cscene, "tile_size")
|
2012-10-13 12:38:32 +00:00
|
|
|
|
2018-05-30 17:47:48 +02:00
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
class CYCLES_RENDER_PT_performance_acceleration_structure(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Acceleration Structure"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_performance"
|
2012-09-04 13:29:07 +00:00
|
|
|
|
2022-01-25 17:33:41 +01:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2022-02-03 09:57:24 +01:00
|
|
|
return not use_optix(context) or use_multi_device(context)
|
2022-01-25 17:33:41 +01:00
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
def draw(self, context):
|
2019-02-11 13:37:45 +01:00
|
|
|
import _cycles
|
|
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2013-07-12 00:08:55 +00:00
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
2018-05-30 17:47:48 +02:00
|
|
|
|
|
|
|
|
col = layout.column()
|
2013-07-12 00:08:55 +00:00
|
|
|
|
2022-01-25 17:33:41 +01:00
|
|
|
use_embree = _cycles.with_embree
|
|
|
|
|
|
2020-06-10 18:55:33 +02:00
|
|
|
if use_cpu(context):
|
2022-01-25 17:33:41 +01:00
|
|
|
col.prop(cscene, "debug_use_spatial_splits")
|
|
|
|
|
if use_embree:
|
|
|
|
|
col.prop(cscene, "debug_use_compact_bvh")
|
|
|
|
|
else:
|
|
|
|
|
sub = col.column()
|
|
|
|
|
sub.active = not cscene.debug_use_spatial_splits
|
|
|
|
|
sub.prop(cscene, "debug_bvh_time_steps")
|
|
|
|
|
|
|
|
|
|
col.prop(cscene, "debug_use_hair_bvh")
|
|
|
|
|
|
2020-06-10 18:55:33 +02:00
|
|
|
sub = col.column(align=True)
|
|
|
|
|
sub.label(text="Cycles built without Embree support")
|
|
|
|
|
sub.label(text="CPU raytracing performance will be poor")
|
2022-01-25 17:33:41 +01:00
|
|
|
else:
|
|
|
|
|
col.prop(cscene, "debug_use_spatial_splits")
|
|
|
|
|
sub = col.column()
|
|
|
|
|
sub.active = not cscene.debug_use_spatial_splits
|
|
|
|
|
sub.prop(cscene, "debug_bvh_time_steps")
|
2020-06-10 18:55:33 +02:00
|
|
|
|
2022-01-25 17:33:41 +01:00
|
|
|
col.prop(cscene, "debug_use_hair_bvh")
|
2018-05-30 17:47:48 +02:00
|
|
|
|
2022-01-25 17:33:41 +01:00
|
|
|
# CPU is used in addition to a GPU
|
|
|
|
|
if use_multi_device(context) and use_embree:
|
|
|
|
|
col.prop(cscene, "debug_use_compact_bvh")
|
2022-01-25 17:16:13 +01:00
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
class CYCLES_RENDER_PT_performance_final_render(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Final Render"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_performance"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
2017-01-17 14:37:32 +01:00
|
|
|
|
2017-08-21 15:09:03 +02:00
|
|
|
col = layout.column()
|
2018-06-04 12:20:40 +02:00
|
|
|
|
Render: faster animation and re-rendering with Persistent Data
For Cycles, when enabling the Persistent Data option, the full render data
will be preserved from frame-to-frame in animation renders and between
re-renders of the scene. This means that any modifier evaluation, BVH
building, OpenGL vertex buffer uploads, etc, can be done only once for
unchanged objects. This comes at an increased memory cost.
Previously there option was named Persistent Images and had a more limited
impact on render time and memory.
When using multiple view layers, only data from a single view layer is
preserved to keep memory usage somewhat under control. However objects
shared between view layers are preserved, and so this can speedup such
renders as well, even single frame renders.
For Eevee and Workbench this option is not available, however these engines
will now always reuse the depsgraph for animation and multiple view layers.
This can significantly speed up rendering.
These engines do not support sharing the depsgraph between re-renders, due
to technical issues regarding OpenGL contexts. Support for this could be added
if those are solved, see the code comments for details.
2021-04-04 23:51:24 +02:00
|
|
|
col.prop(rd, "use_persistent_data", text="Persistent Data")
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class CYCLES_RENDER_PT_performance_viewport(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Viewport"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_performance"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 12:20:40 +02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
col.prop(rd, "preview_pixel_size", text="Pixel Size")
|
2017-08-21 15:09:03 +02:00
|
|
|
|
2013-03-28 19:33:14 +00:00
|
|
|
|
2018-04-24 15:20:17 +02:00
|
|
|
class CYCLES_RENDER_PT_filter(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Filter"
|
2018-10-18 12:13:06 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2017-11-22 10:52:39 -02:00
|
|
|
bl_context = "view_layer"
|
2013-04-06 23:05:32 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2018-09-05 13:43:04 +02:00
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-09-05 13:43:04 +02:00
|
|
|
|
2013-04-06 23:05:32 +00:00
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
2018-04-24 15:20:17 +02:00
|
|
|
view_layer = context.view_layer
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Include")
|
2018-10-30 13:26:59 +01:00
|
|
|
col.prop(view_layer, "use_sky", text="Environment")
|
|
|
|
|
col.prop(view_layer, "use_solid", text="Surfaces")
|
2022-04-06 16:19:44 -05:00
|
|
|
col.prop(view_layer, "use_strand", text="Curves")
|
2020-03-11 11:22:13 +01:00
|
|
|
col.prop(view_layer, "use_volumes", text="Volumes")
|
2013-04-07 01:38:03 +00:00
|
|
|
|
2021-06-25 18:29:17 +02:00
|
|
|
col = layout.column(heading="Use")
|
|
|
|
|
sub = col.row()
|
|
|
|
|
sub.prop(view_layer, "use_motion_blur", text="Motion Blur")
|
|
|
|
|
sub.active = rd.use_motion_blur
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
sub = col.row()
|
2023-10-11 10:39:35 +11:00
|
|
|
sub.prop(view_layer.cycles, "use_denoising", text="Denoising")
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
sub.active = scene.cycles.use_denoising
|
2021-06-25 18:29:17 +02:00
|
|
|
|
2013-04-07 01:38:03 +00:00
|
|
|
|
2018-12-28 18:37:05 +01:00
|
|
|
class CYCLES_RENDER_PT_override(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Override"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
bl_context = "view_layer"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
|
|
view_layer = context.view_layer
|
|
|
|
|
|
|
|
|
|
layout.prop(view_layer, "material_override")
|
2024-02-09 12:16:16 +01:00
|
|
|
layout.prop(view_layer, "world_override")
|
2018-12-28 18:37:05 +01:00
|
|
|
layout.prop(view_layer, "samples")
|
|
|
|
|
|
|
|
|
|
|
2018-10-30 13:26:59 +01:00
|
|
|
class CYCLES_RENDER_PT_passes(CyclesButtonsPanel, Panel):
|
2013-04-07 08:42:08 +00:00
|
|
|
bl_label = "Passes"
|
2017-11-22 10:52:39 -02:00
|
|
|
bl_context = "view_layer"
|
2013-04-06 23:05:32 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
2018-10-30 13:26:59 +01:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CYCLES_RENDER_PT_passes_data(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Data"
|
|
|
|
|
bl_context = "view_layer"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_passes"
|
Render API/Cycles: Identify Render Passes by their name instead of a type flag
Previously, every RenderPass would have a bitfield that specified its type. That limits the number of passes to 32, which was reached a while ago.
However, most of the code already supported arbitrary RenderPasses since they were also used to store Multilayer EXR images.
Therefore, this commit completely removes the passflag from RenderPass and changes all code to use the unique pass name for identification.
Since Blender Internal relies on hardcoded passes and to preserve compatibility, 32 pass names are reserved for the old hardcoded passes.
To support these arbitrary passes, the Render Result compositor node now adds dynamic sockets. For compatibility, the old hardcoded sockets are always stored and just hidden when the corresponding pass isn't available.
To use these changes, the Render Engine API now includes a function that allows render engines to add arbitrary passes to the render result. To be able to add options for these passes, addons can now add their own properties to SceneRenderLayers.
To keep the compositor input node updated, render engine plugins have to implement a callback that registers all the passes that will be generated.
From a user perspective, nothing should change with this commit.
Differential Revision: https://developer.blender.org/D2443
Differential Revision: https://developer.blender.org/D2444
2017-05-03 00:21:18 +02:00
|
|
|
|
2018-10-30 13:26:59 +01:00
|
|
|
def draw(self, context):
|
2013-04-06 23:05:32 +00:00
|
|
|
layout = self.layout
|
2018-10-30 13:26:59 +01:00
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
2013-04-06 23:05:32 +00:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
2018-04-24 15:20:17 +02:00
|
|
|
view_layer = context.view_layer
|
2017-11-22 10:52:39 -02:00
|
|
|
cycles_view_layer = view_layer.cycles
|
Cycles: merging features from tomato branch.
=== BVH build time optimizations ===
* BVH building was multithreaded. Not all building is multithreaded, packing
and the initial bounding/splitting is still single threaded, but recursive
splitting is, which was the main bottleneck.
* Object splitting now uses binning rather than sorting of all elements, using
code from the Embree raytracer from Intel.
http://software.intel.com/en-us/articles/embree-photo-realistic-ray-tracing-kernels/
* Other small changes to avoid allocations, pack memory more tightly, avoid
some unnecessary operations, ...
These optimizations do not work yet when Spatial Splits are enabled, for that
more work is needed. There's also other optimizations still needed, in
particular for the case of many low poly objects, the packing step and node
memory allocation.
BVH raytracing time should remain about the same, but BVH build time should be
significantly reduced, test here show speedup of about 5x to 10x on a dual core
and 5x to 25x on an 8-core machine, depending on the scene.
=== Threads ===
Centralized task scheduler for multithreading, which is basically the
CPU device threading code wrapped into something reusable.
Basic idea is that there is a single TaskScheduler that keeps a pool of threads,
one for each core. Other places in the code can then create a TaskPool that they
can drop Tasks in to be executed by the scheduler, and wait for them to complete
or cancel them early.
=== Normal ====
Added a Normal output to the texture coordinate node. This currently
gives the object space normal, which is the same under object animation.
In the future this might become a "generated" normal so it's also stable for
deforming objects, but for now it's already useful for non-deforming objects.
=== Render Layers ===
Per render layer Samples control, leaving it to 0 will use the common scene
setting.
Environment pass will now render environment even if film is set to transparent.
Exclude Layers" added. Scene layers (all object that influence the render,
directly or indirectly) are shared between all render layers. However sometimes
it's useful to leave out some object influence for a particular render layer.
That's what this option allows you to do.
=== Filter Glossy ===
When using a value higher than 0.0, this will blur glossy reflections after
blurry bounces, to reduce noise at the cost of accuracy. 1.0 is a good
starting value to tweak.
Some light paths have a low probability of being found while contributing much
light to the pixel. As a result these light paths will be found in some pixels
and not in others, causing fireflies. An example of such a difficult path might
be a small light that is causing a small specular highlight on a sharp glossy
material, which we are seeing through a rough glossy material. With path tracing
it is difficult to find the specular highlight, but if we increase the roughness
on the material the highlight gets bigger and softer, and so easier to find.
Often this blurring will be hardly noticeable, because we are seeing it through
a blurry material anyway, but there are also cases where this will lead to a
loss of detail in lighting.
2012-04-28 08:53:59 +00:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Include", align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
col.prop(view_layer, "use_pass_combined")
|
|
|
|
|
col.prop(view_layer, "use_pass_z")
|
|
|
|
|
col.prop(view_layer, "use_pass_mist")
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
col.prop(view_layer, "use_pass_position")
|
2017-11-22 10:52:39 -02:00
|
|
|
col.prop(view_layer, "use_pass_normal")
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
sub = col.column()
|
|
|
|
|
sub.active = not rd.use_motion_blur
|
|
|
|
|
sub.prop(view_layer, "use_pass_vector")
|
2017-11-22 10:52:39 -02:00
|
|
|
col.prop(view_layer, "use_pass_uv")
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
|
|
|
|
|
col.prop(cycles_view_layer, "denoising_store_passes", text="Denoising Data")
|
|
|
|
|
|
|
|
|
|
col = layout.column(heading="Indexes", align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
col.prop(view_layer, "use_pass_object_index")
|
|
|
|
|
col.prop(view_layer, "use_pass_material_index")
|
2018-10-30 13:26:59 +01:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Debug", align=True)
|
2020-03-05 12:05:42 +01:00
|
|
|
col.prop(cycles_view_layer, "pass_debug_sample_count", text="Sample Count")
|
2018-10-30 13:26:59 +01:00
|
|
|
|
2018-10-31 17:23:43 +01:00
|
|
|
layout.prop(view_layer, "pass_alpha_threshold")
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
|
2018-10-30 13:26:59 +01:00
|
|
|
|
|
|
|
|
class CYCLES_RENDER_PT_passes_light(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Light"
|
|
|
|
|
bl_context = "view_layer"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_passes"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
|
|
view_layer = context.view_layer
|
|
|
|
|
cycles_view_layer = view_layer.cycles
|
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Diffuse", align=True)
|
|
|
|
|
col.prop(view_layer, "use_pass_diffuse_direct", text="Direct")
|
|
|
|
|
col.prop(view_layer, "use_pass_diffuse_indirect", text="Indirect")
|
|
|
|
|
col.prop(view_layer, "use_pass_diffuse_color", text="Color")
|
2013-08-23 04:04:46 +00:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Glossy", align=True)
|
|
|
|
|
col.prop(view_layer, "use_pass_glossy_direct", text="Direct")
|
|
|
|
|
col.prop(view_layer, "use_pass_glossy_indirect", text="Indirect")
|
|
|
|
|
col.prop(view_layer, "use_pass_glossy_color", text="Color")
|
|
|
|
|
|
|
|
|
|
col = layout.column(heading="Transmission", align=True)
|
|
|
|
|
col.prop(view_layer, "use_pass_transmission_direct", text="Direct")
|
|
|
|
|
col.prop(view_layer, "use_pass_transmission_indirect", text="Indirect")
|
|
|
|
|
col.prop(view_layer, "use_pass_transmission_color", text="Color")
|
|
|
|
|
|
2023-02-23 22:00:57 +01:00
|
|
|
col = layout.column(heading="Volume", heading_ctxt=i18n_contexts.id_id, align=True)
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col.prop(cycles_view_layer, "use_pass_volume_direct", text="Direct")
|
|
|
|
|
col.prop(cycles_view_layer, "use_pass_volume_indirect", text="Indirect")
|
|
|
|
|
|
|
|
|
|
col = layout.column(heading="Other", align=True)
|
2017-11-22 10:52:39 -02:00
|
|
|
col.prop(view_layer, "use_pass_emit", text="Emission")
|
|
|
|
|
col.prop(view_layer, "use_pass_environment")
|
2018-10-30 13:26:59 +01:00
|
|
|
col.prop(view_layer, "use_pass_ambient_occlusion", text="Ambient Occlusion")
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
col.prop(cycles_view_layer, "use_pass_shadow_catcher")
|
2018-10-30 13:26:59 +01:00
|
|
|
|
|
|
|
|
|
2024-08-20 14:25:56 +10:00
|
|
|
class CYCLES_RENDER_PT_passes_crypto(CyclesButtonsPanel, ViewLayerCryptomattePanelHelper, Panel):
|
2018-10-30 13:26:59 +01:00
|
|
|
bl_label = "Cryptomatte"
|
|
|
|
|
bl_context = "view_layer"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_passes"
|
|
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2024-08-20 14:25:56 +10:00
|
|
|
class CYCLES_RENDER_PT_passes_aov(CyclesButtonsPanel, ViewLayerAOVPanelHelper, Panel):
|
2019-12-04 19:57:28 +01:00
|
|
|
bl_label = "Shader AOV"
|
|
|
|
|
bl_context = "view_layer"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_passes"
|
|
|
|
|
|
|
|
|
|
|
2024-08-20 14:25:56 +10:00
|
|
|
class CYCLES_RENDER_PT_passes_lightgroups(CyclesButtonsPanel, ViewLayerLightgroupsPanelHelper, Panel):
|
2022-04-02 00:11:11 +02:00
|
|
|
bl_label = "Light Groups"
|
|
|
|
|
bl_context = "view_layer"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_passes"
|
|
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_PT_post_processing(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Post Processing"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2018-11-02 11:56:41 +11:00
|
|
|
bl_context = "output"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2018-05-30 17:47:48 +02:00
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
rd = context.scene.render
|
2011-04-27 11:58:34 +00:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(align=True, heading="Pipeline")
|
2011-08-28 13:55:59 +00:00
|
|
|
col.prop(rd, "use_compositing")
|
|
|
|
|
col.prop(rd, "use_sequencer")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2018-05-30 17:47:48 +02:00
|
|
|
layout.prop(rd, "dither_intensity", text="Dither", slider=True)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_CAMERA_PT_dof(CyclesButtonsPanel, Panel):
|
2011-09-16 13:14:02 +00:00
|
|
|
bl_label = "Depth of Field"
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_context = "data"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2011-09-16 13:14:02 +00:00
|
|
|
return context.camera and CyclesButtonsPanel.poll(context)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2019-05-17 16:57:31 +02:00
|
|
|
def draw_header(self, context):
|
|
|
|
|
cam = context.camera
|
|
|
|
|
dof = cam.dof
|
|
|
|
|
self.layout.prop(dof, "use_dof", text="")
|
|
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2018-06-10 21:27:43 +02:00
|
|
|
layout.use_property_split = True
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-09-16 13:14:02 +00:00
|
|
|
cam = context.camera
|
2019-05-17 16:57:31 +02:00
|
|
|
dof = cam.dof
|
|
|
|
|
layout.active = dof.use_dof
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-09-16 13:14:02 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
2024-07-15 15:26:32 +02:00
|
|
|
col.prop(dof, "focus_object", text="Focus on Object")
|
2022-07-15 13:30:57 +02:00
|
|
|
if dof.focus_object and dof.focus_object.type == 'ARMATURE':
|
|
|
|
|
col.prop_search(dof, "focus_subtarget", dof.focus_object.data, "bones", text="Focus Bone")
|
2011-09-16 13:14:02 +00:00
|
|
|
|
|
|
|
|
sub = col.row()
|
2019-05-17 16:57:31 +02:00
|
|
|
sub.active = dof.focus_object is None
|
2024-07-15 15:26:32 +02:00
|
|
|
sub.prop(dof, "focus_distance", text="Focus Distance")
|
|
|
|
|
sub.operator(
|
|
|
|
|
"ui.eyedropper_depth",
|
|
|
|
|
icon='EYEDROPPER',
|
|
|
|
|
text="").prop_data_path = "scene.camera.data.dof.focus_distance"
|
2015-03-30 12:47:37 +02:00
|
|
|
|
2018-06-10 21:27:43 +02:00
|
|
|
|
|
|
|
|
class CYCLES_CAMERA_PT_dof_aperture(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Aperture"
|
|
|
|
|
bl_parent_id = "CYCLES_CAMERA_PT_dof"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.camera and CyclesButtonsPanel.poll(context)
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
|
|
|
|
cam = context.camera
|
2019-05-17 16:57:31 +02:00
|
|
|
dof = cam.dof
|
|
|
|
|
layout.active = dof.use_dof
|
2018-07-01 09:23:51 +02:00
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
2018-06-10 21:27:43 +02:00
|
|
|
|
2019-05-17 16:57:31 +02:00
|
|
|
col = flow.column()
|
|
|
|
|
col.prop(dof, "aperture_fstop")
|
|
|
|
|
col.prop(dof, "aperture_blades")
|
|
|
|
|
col.prop(dof, "aperture_rotation")
|
|
|
|
|
col.prop(dof, "aperture_ratio")
|
2015-05-17 17:17:31 +10:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_PT_context_material(CyclesButtonsPanel, Panel):
|
2012-01-24 20:10:37 +00:00
|
|
|
bl_label = ""
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_context = "material"
|
|
|
|
|
bl_options = {'HIDE_HEADER'}
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2024-11-26 12:18:37 +01:00
|
|
|
if context.active_object and context.active_object.type == 'GREASEPENCIL':
|
2018-07-31 10:22:19 +02:00
|
|
|
return False
|
|
|
|
|
else:
|
|
|
|
|
return (context.material or context.object) and CyclesButtonsPanel.poll(context)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
mat = context.material
|
|
|
|
|
ob = context.object
|
|
|
|
|
slot = context.material_slot
|
|
|
|
|
space = context.space_data
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
if ob:
|
2016-02-10 10:34:19 +01:00
|
|
|
is_sortable = len(ob.material_slots) > 1
|
2021-08-02 19:54:04 +02:00
|
|
|
rows = 3
|
2015-05-15 01:25:03 +02:00
|
|
|
if (is_sortable):
|
|
|
|
|
rows = 4
|
|
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
row = layout.row()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2015-05-15 01:25:03 +02:00
|
|
|
row.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=rows)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
col = row.column(align=True)
|
2018-10-01 10:45:50 +02:00
|
|
|
col.operator("object.material_slot_add", icon='ADD', text="")
|
|
|
|
|
col.operator("object.material_slot_remove", icon='REMOVE', text="")
|
2021-07-20 17:22:59 -04:00
|
|
|
col.separator()
|
2019-03-13 09:53:07 +01:00
|
|
|
col.menu("MATERIAL_MT_context_menu", icon='DOWNARROW_HLT', text="")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2015-05-15 01:25:03 +02:00
|
|
|
if is_sortable:
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
|
|
col.operator("object.material_slot_move", icon='TRIA_UP', text="").direction = 'UP'
|
|
|
|
|
col.operator("object.material_slot_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
|
|
|
|
|
|
2018-04-06 18:31:32 +02:00
|
|
|
if ob.mode == 'EDIT':
|
2011-08-28 13:55:59 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.operator("object.material_slot_assign", text="Assign")
|
|
|
|
|
row.operator("object.material_slot_select", text="Select")
|
|
|
|
|
row.operator("object.material_slot_deselect", text="Deselect")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2021-07-20 17:22:59 -04:00
|
|
|
row = layout.row()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
if ob:
|
2021-07-20 17:22:59 -04:00
|
|
|
row.template_ID(ob, "active_material", new="material.new")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
if slot:
|
2021-07-20 17:22:59 -04:00
|
|
|
icon_link = 'MESH_DATA' if slot.link == 'DATA' else 'OBJECT_DATA'
|
|
|
|
|
row.prop(slot, "link", text="", icon=icon_link, icon_only=True)
|
|
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
elif mat:
|
2021-10-13 18:47:31 +02:00
|
|
|
layout.template_ID(space, "pin_id")
|
|
|
|
|
layout.separator()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_OBJECT_PT_motion_blur(CyclesButtonsPanel, Panel):
|
2014-03-29 13:03:47 +01:00
|
|
|
bl_label = "Motion Blur"
|
|
|
|
|
bl_context = "object"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
ob = context.object
|
2015-06-12 13:54:17 +02:00
|
|
|
if CyclesButtonsPanel.poll(context) and ob:
|
2022-04-20 16:07:03 +10:00
|
|
|
if ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT',
|
|
|
|
|
'META', 'CAMERA', 'CURVES', 'POINTCLOUD', 'VOLUME'}:
|
2015-06-12 13:54:17 +02:00
|
|
|
return True
|
2018-12-03 10:38:46 +01:00
|
|
|
if ob.instance_type == 'COLLECTION' and ob.instance_collection:
|
2015-06-12 13:54:17 +02:00
|
|
|
return True
|
|
|
|
|
# TODO(sergey): More duplicator types here?
|
|
|
|
|
return False
|
2014-04-03 09:24:09 +11:00
|
|
|
|
2014-03-29 13:03:47 +01:00
|
|
|
def draw_header(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
rd = context.scene.render
|
2014-09-17 18:36:17 +10:00
|
|
|
# scene = context.scene
|
2014-03-29 13:03:47 +01:00
|
|
|
|
2014-03-31 02:18:29 +02:00
|
|
|
layout.active = rd.use_motion_blur
|
2014-03-29 13:03:47 +01:00
|
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
|
cob = ob.cycles
|
|
|
|
|
|
|
|
|
|
layout.prop(cob, "use_motion_blur", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2020-06-30 13:22:43 -04:00
|
|
|
layout.use_property_split = True
|
2014-03-29 13:03:47 +01:00
|
|
|
|
|
|
|
|
rd = context.scene.render
|
2014-09-17 18:36:17 +10:00
|
|
|
# scene = context.scene
|
2014-03-29 13:03:47 +01:00
|
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
|
cob = ob.cycles
|
|
|
|
|
|
2014-03-31 02:18:29 +02:00
|
|
|
layout.active = (rd.use_motion_blur and cob.use_motion_blur)
|
2014-03-29 13:03:47 +01:00
|
|
|
|
2020-06-30 13:22:43 -04:00
|
|
|
col = layout.column()
|
|
|
|
|
col.prop(cob, "motion_steps", text="Steps")
|
2018-03-10 01:36:09 +01:00
|
|
|
if ob.type != 'CAMERA':
|
2020-06-30 13:22:43 -04:00
|
|
|
col.prop(cob, "use_deform_motion", text="Deformation")
|
2014-03-29 13:03:47 +01:00
|
|
|
|
|
|
|
|
|
2021-06-28 13:54:18 +02:00
|
|
|
class CYCLES_OBJECT_PT_shading_shadow_terminator(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Shadow Terminator"
|
2024-10-03 18:41:06 +02:00
|
|
|
bl_parent_id = "OBJECT_PT_shading"
|
2021-06-28 13:54:18 +02:00
|
|
|
bl_context = "object"
|
2020-05-05 13:55:24 +02:00
|
|
|
|
2022-04-02 22:42:05 +02:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2024-10-03 18:41:06 +02:00
|
|
|
return CyclesButtonsPanel.poll(context) and context.object.type != 'LIGHT'
|
2022-04-02 22:42:05 +02:00
|
|
|
|
2020-05-05 13:55:24 +02:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
2021-06-28 13:54:18 +02:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True)
|
|
|
|
|
|
2020-05-05 13:55:24 +02:00
|
|
|
ob = context.object
|
|
|
|
|
cob = ob.cycles
|
2021-06-28 13:54:18 +02:00
|
|
|
flow.prop(cob, "shadow_terminator_geometry_offset", text="Geometry Offset")
|
|
|
|
|
flow.prop(cob, "shadow_terminator_offset", text="Shading Offset")
|
2019-05-20 13:42:16 +02:00
|
|
|
|
2020-07-01 12:21:21 -04:00
|
|
|
|
2021-08-04 20:49:50 +02:00
|
|
|
class CYCLES_OBJECT_PT_shading_gi_approximation(CyclesButtonsPanel, Panel):
|
2021-08-03 12:20:28 +02:00
|
|
|
bl_label = "Fast GI Approximation"
|
2024-10-03 18:41:06 +02:00
|
|
|
bl_parent_id = "OBJECT_PT_shading"
|
2021-08-03 12:20:28 +02:00
|
|
|
bl_context = "object"
|
|
|
|
|
|
2022-04-02 22:42:05 +02:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2024-10-03 18:41:06 +02:00
|
|
|
return CyclesButtonsPanel.poll(context) and context.object.type != 'LIGHT'
|
2022-04-02 22:42:05 +02:00
|
|
|
|
2021-08-03 12:20:28 +02:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
ob = context.object
|
|
|
|
|
|
|
|
|
|
cob = ob.cycles
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
col.active = cscene.use_fast_gi
|
|
|
|
|
col.prop(cob, "ao_distance")
|
|
|
|
|
|
|
|
|
|
|
Cycles: approximate shadow caustics using manifold next event estimation
This adds support for selective rendering of caustics in shadows of refractive
objects. Example uses are rendering of underwater caustics and eye caustics.
This is based on "Manifold Next Event Estimation", a method developed for
production rendering. The idea is to selectively enable shadow caustics on a
few objects in the scene where they have a big visual impact, without impacting
render performance for the rest of the scene.
The Shadow Caustic option must be manually enabled on light, caustic receiver
and caster objects. For such light paths, the Filter Glossy option will be
ignored and replaced by sharp caustics.
Currently this method has a various limitations:
* Only caustics in shadows of refractive objects work, which means no caustics
from reflection or caustics that outside shadows. Only up to 4 refractive
caustic bounces are supported.
* Caustic caster objects should have smooth normals.
* Not currently support for Metal GPU rendering.
In the future this method may be extended for more general caustics.
TECHNICAL DETAILS
This code adds manifold next event estimation through refractive surface(s) as a
new sampling technique for direct lighting, i.e. finding the point on the
refractive surface(s) along the path to a light sample, which satisfies Fermat's
principle for a given microfacet normal and the path's end points. This
technique involves walking on the "specular manifold" using a pseudo newton
solver. Such a manifold is defined by the specular constraint matrix from the
manifold exploration framework [2]. For each refractive interface, this
constraint is defined by enforcing that the generalized half-vector projection
onto the interface local tangent plane is null. The newton solver guides the
walk by linearizing the manifold locally before reprojecting the linear solution
onto the refractive surface. See paper [1] for more details about the technique
itself and [3] for the half-vector light transport formulation, from which it is
derived.
[1] Manifold Next Event Estimation
Johannes Hanika, Marc Droske, and Luca Fascione. 2015.
Comput. Graph. Forum 34, 4 (July 2015), 87–97.
https://jo.dreggn.org/home/2015_mnee.pdf
[2] Manifold exploration: a Markov Chain Monte Carlo technique for rendering
scenes with difficult specular transport Wenzel Jakob and Steve Marschner.
2012. ACM Trans. Graph. 31, 4, Article 58 (July 2012), 13 pages.
https://www.cs.cornell.edu/projects/manifolds-sg12/
[3] The Natural-Constraint Representation of the Path Space for Efficient
Light Transport Simulation. Anton S. Kaplanyan, Johannes Hanika, and Carsten
Dachsbacher. 2014. ACM Trans. Graph. 33, 4, Article 102 (July 2014), 13 pages.
https://cg.ivd.kit.edu/english/HSLT.php
The code for this samping technique was inserted at the light sampling stage
(direct lighting). If the walk is successful, it turns off path regularization
using a specialized flag in the path state (PATH_MNEE_SUCCESS). This flag tells
the integrator not to blur the brdf roughness further down the path (in a child
ray created from BSDF sampling). In addition, using a cascading mechanism of
flag values, we cull connections to caustic lights for this and children rays,
which should be resolved through MNEE.
This mechanism also cancels the MIS bsdf counter part at the casutic receiver
depth, in essence leaving MNEE as the only sampling technique from receivers
through refractive casters to caustic lights. This choice might not be optimal
when the light gets large wrt to the receiver, though this is usually not when
you want to use MNEE.
This connection culling strategy removes a fair amount of fireflies, at the cost
of introducing a slight bias. Because of the selective nature of the culling
mechanism, reflective caustics still benefit from the native path
regularization, which further removes fireflies on other surfaces (bouncing
light off casters).
Differential Revision: https://developer.blender.org/D13533
2022-04-01 15:44:24 +02:00
|
|
|
class CYCLES_OBJECT_PT_shading_caustics(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Caustics"
|
2024-10-03 18:41:06 +02:00
|
|
|
bl_parent_id = "OBJECT_PT_shading"
|
Cycles: approximate shadow caustics using manifold next event estimation
This adds support for selective rendering of caustics in shadows of refractive
objects. Example uses are rendering of underwater caustics and eye caustics.
This is based on "Manifold Next Event Estimation", a method developed for
production rendering. The idea is to selectively enable shadow caustics on a
few objects in the scene where they have a big visual impact, without impacting
render performance for the rest of the scene.
The Shadow Caustic option must be manually enabled on light, caustic receiver
and caster objects. For such light paths, the Filter Glossy option will be
ignored and replaced by sharp caustics.
Currently this method has a various limitations:
* Only caustics in shadows of refractive objects work, which means no caustics
from reflection or caustics that outside shadows. Only up to 4 refractive
caustic bounces are supported.
* Caustic caster objects should have smooth normals.
* Not currently support for Metal GPU rendering.
In the future this method may be extended for more general caustics.
TECHNICAL DETAILS
This code adds manifold next event estimation through refractive surface(s) as a
new sampling technique for direct lighting, i.e. finding the point on the
refractive surface(s) along the path to a light sample, which satisfies Fermat's
principle for a given microfacet normal and the path's end points. This
technique involves walking on the "specular manifold" using a pseudo newton
solver. Such a manifold is defined by the specular constraint matrix from the
manifold exploration framework [2]. For each refractive interface, this
constraint is defined by enforcing that the generalized half-vector projection
onto the interface local tangent plane is null. The newton solver guides the
walk by linearizing the manifold locally before reprojecting the linear solution
onto the refractive surface. See paper [1] for more details about the technique
itself and [3] for the half-vector light transport formulation, from which it is
derived.
[1] Manifold Next Event Estimation
Johannes Hanika, Marc Droske, and Luca Fascione. 2015.
Comput. Graph. Forum 34, 4 (July 2015), 87–97.
https://jo.dreggn.org/home/2015_mnee.pdf
[2] Manifold exploration: a Markov Chain Monte Carlo technique for rendering
scenes with difficult specular transport Wenzel Jakob and Steve Marschner.
2012. ACM Trans. Graph. 31, 4, Article 58 (July 2012), 13 pages.
https://www.cs.cornell.edu/projects/manifolds-sg12/
[3] The Natural-Constraint Representation of the Path Space for Efficient
Light Transport Simulation. Anton S. Kaplanyan, Johannes Hanika, and Carsten
Dachsbacher. 2014. ACM Trans. Graph. 33, 4, Article 102 (July 2014), 13 pages.
https://cg.ivd.kit.edu/english/HSLT.php
The code for this samping technique was inserted at the light sampling stage
(direct lighting). If the walk is successful, it turns off path regularization
using a specialized flag in the path state (PATH_MNEE_SUCCESS). This flag tells
the integrator not to blur the brdf roughness further down the path (in a child
ray created from BSDF sampling). In addition, using a cascading mechanism of
flag values, we cull connections to caustic lights for this and children rays,
which should be resolved through MNEE.
This mechanism also cancels the MIS bsdf counter part at the casutic receiver
depth, in essence leaving MNEE as the only sampling technique from receivers
through refractive casters to caustic lights. This choice might not be optimal
when the light gets large wrt to the receiver, though this is usually not when
you want to use MNEE.
This connection culling strategy removes a fair amount of fireflies, at the cost
of introducing a slight bias. Because of the selective nature of the culling
mechanism, reflective caustics still benefit from the native path
regularization, which further removes fireflies on other surfaces (bouncing
light off casters).
Differential Revision: https://developer.blender.org/D13533
2022-04-01 15:44:24 +02:00
|
|
|
bl_context = "object"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2022-10-25 19:36:13 +01:00
|
|
|
return CyclesButtonsPanel.poll(context) and use_mnee(context) and context.object.type != 'LIGHT'
|
Cycles: approximate shadow caustics using manifold next event estimation
This adds support for selective rendering of caustics in shadows of refractive
objects. Example uses are rendering of underwater caustics and eye caustics.
This is based on "Manifold Next Event Estimation", a method developed for
production rendering. The idea is to selectively enable shadow caustics on a
few objects in the scene where they have a big visual impact, without impacting
render performance for the rest of the scene.
The Shadow Caustic option must be manually enabled on light, caustic receiver
and caster objects. For such light paths, the Filter Glossy option will be
ignored and replaced by sharp caustics.
Currently this method has a various limitations:
* Only caustics in shadows of refractive objects work, which means no caustics
from reflection or caustics that outside shadows. Only up to 4 refractive
caustic bounces are supported.
* Caustic caster objects should have smooth normals.
* Not currently support for Metal GPU rendering.
In the future this method may be extended for more general caustics.
TECHNICAL DETAILS
This code adds manifold next event estimation through refractive surface(s) as a
new sampling technique for direct lighting, i.e. finding the point on the
refractive surface(s) along the path to a light sample, which satisfies Fermat's
principle for a given microfacet normal and the path's end points. This
technique involves walking on the "specular manifold" using a pseudo newton
solver. Such a manifold is defined by the specular constraint matrix from the
manifold exploration framework [2]. For each refractive interface, this
constraint is defined by enforcing that the generalized half-vector projection
onto the interface local tangent plane is null. The newton solver guides the
walk by linearizing the manifold locally before reprojecting the linear solution
onto the refractive surface. See paper [1] for more details about the technique
itself and [3] for the half-vector light transport formulation, from which it is
derived.
[1] Manifold Next Event Estimation
Johannes Hanika, Marc Droske, and Luca Fascione. 2015.
Comput. Graph. Forum 34, 4 (July 2015), 87–97.
https://jo.dreggn.org/home/2015_mnee.pdf
[2] Manifold exploration: a Markov Chain Monte Carlo technique for rendering
scenes with difficult specular transport Wenzel Jakob and Steve Marschner.
2012. ACM Trans. Graph. 31, 4, Article 58 (July 2012), 13 pages.
https://www.cs.cornell.edu/projects/manifolds-sg12/
[3] The Natural-Constraint Representation of the Path Space for Efficient
Light Transport Simulation. Anton S. Kaplanyan, Johannes Hanika, and Carsten
Dachsbacher. 2014. ACM Trans. Graph. 33, 4, Article 102 (July 2014), 13 pages.
https://cg.ivd.kit.edu/english/HSLT.php
The code for this samping technique was inserted at the light sampling stage
(direct lighting). If the walk is successful, it turns off path regularization
using a specialized flag in the path state (PATH_MNEE_SUCCESS). This flag tells
the integrator not to blur the brdf roughness further down the path (in a child
ray created from BSDF sampling). In addition, using a cascading mechanism of
flag values, we cull connections to caustic lights for this and children rays,
which should be resolved through MNEE.
This mechanism also cancels the MIS bsdf counter part at the casutic receiver
depth, in essence leaving MNEE as the only sampling technique from receivers
through refractive casters to caustic lights. This choice might not be optimal
when the light gets large wrt to the receiver, though this is usually not when
you want to use MNEE.
This connection culling strategy removes a fair amount of fireflies, at the cost
of introducing a slight bias. Because of the selective nature of the culling
mechanism, reflective caustics still benefit from the native path
regularization, which further removes fireflies on other surfaces (bouncing
light off casters).
Differential Revision: https://developer.blender.org/D13533
2022-04-01 15:44:24 +02:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
|
cob = ob.cycles
|
|
|
|
|
col.prop(cob, "is_caustics_caster")
|
|
|
|
|
col.prop(cob, "is_caustics_receiver")
|
|
|
|
|
|
|
|
|
|
|
2022-04-02 00:11:11 +02:00
|
|
|
class CYCLES_OBJECT_PT_lightgroup(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Light Group"
|
2024-10-03 18:41:06 +02:00
|
|
|
bl_parent_id = "OBJECT_PT_shading"
|
2022-04-02 00:11:11 +02:00
|
|
|
bl_context = "object"
|
2023-05-24 13:36:13 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2022-04-02 00:11:11 +02:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
|
|
|
|
|
|
view_layer = context.view_layer
|
|
|
|
|
|
2022-04-04 03:50:55 +02:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.use_property_decorate = False
|
|
|
|
|
|
|
|
|
|
sub = row.column(align=True)
|
|
|
|
|
sub.prop_search(ob, "lightgroup", view_layer, "lightgroups", text="Light Group", results_are_suggestions=True)
|
|
|
|
|
|
|
|
|
|
sub = row.column(align=True)
|
2022-07-11 14:00:49 +02:00
|
|
|
sub.enabled = bool(ob.lightgroup) and not any(lg.name == ob.lightgroup for lg in view_layer.lightgroups)
|
2022-04-04 03:50:55 +02:00
|
|
|
sub.operator("scene.view_layer_add_lightgroup", icon='ADD', text="").name = ob.lightgroup
|
2022-04-02 00:11:11 +02:00
|
|
|
|
|
|
|
|
|
2019-05-20 13:42:16 +02:00
|
|
|
class CYCLES_OBJECT_PT_visibility(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Visibility"
|
2011-09-01 15:53:36 +00:00
|
|
|
bl_context = "object"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2019-05-20 13:42:16 +02:00
|
|
|
return CyclesButtonsPanel.poll(context) and (context.object)
|
2011-09-01 15:53:36 +00:00
|
|
|
|
2018-09-05 13:43:04 +02:00
|
|
|
def draw(self, context):
|
2019-05-20 13:42:16 +02:00
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
layout.prop(ob, "hide_select", text="Selectable", invert_checkbox=True, toggle=False)
|
|
|
|
|
|
2020-10-24 11:42:17 -07:00
|
|
|
col = layout.column(heading="Show In")
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col.prop(ob, "hide_viewport", text="Viewports", invert_checkbox=True, toggle=False)
|
|
|
|
|
col.prop(ob, "hide_render", text="Renders", invert_checkbox=True, toggle=False)
|
2019-05-20 13:42:16 +02:00
|
|
|
|
|
|
|
|
if has_geometry_visibility(ob):
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Mask")
|
2021-08-04 19:43:40 +02:00
|
|
|
col.prop(ob, "is_shadow_catcher")
|
|
|
|
|
col.prop(ob, "is_holdout")
|
2018-09-05 13:43:04 +02:00
|
|
|
|
|
|
|
|
|
2019-05-20 13:42:16 +02:00
|
|
|
class CYCLES_OBJECT_PT_visibility_ray_visibility(CyclesButtonsPanel, Panel):
|
2018-09-05 13:43:04 +02:00
|
|
|
bl_label = "Ray Visibility"
|
2019-05-20 13:42:16 +02:00
|
|
|
bl_parent_id = "CYCLES_OBJECT_PT_visibility"
|
2018-09-05 13:43:04 +02:00
|
|
|
bl_context = "object"
|
|
|
|
|
|
2019-05-20 13:42:16 +02:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
ob = context.object
|
|
|
|
|
return CyclesButtonsPanel.poll(context) and has_geometry_visibility(ob)
|
|
|
|
|
|
2011-09-01 15:53:36 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2018-09-05 13:43:04 +02:00
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2011-09-01 15:53:36 +00:00
|
|
|
|
2015-04-10 18:09:58 +05:00
|
|
|
scene = context.scene
|
2011-09-01 15:53:36 +00:00
|
|
|
ob = context.object
|
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column()
|
2021-08-04 19:43:40 +02:00
|
|
|
col.prop(ob, "visible_camera", text="Camera")
|
|
|
|
|
col.prop(ob, "visible_diffuse", text="Diffuse")
|
|
|
|
|
col.prop(ob, "visible_glossy", text="Glossy")
|
|
|
|
|
col.prop(ob, "visible_transmission", text="Transmission")
|
|
|
|
|
col.prop(ob, "visible_volume_scatter", text="Volume Scatter")
|
2013-06-10 20:34:34 +00:00
|
|
|
|
2018-06-27 14:41:53 +02:00
|
|
|
if ob.type != 'LIGHT':
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
sub = col.column()
|
2021-08-04 19:43:40 +02:00
|
|
|
sub.prop(ob, "visible_shadow", text="Shadow")
|
2017-03-27 21:51:56 +02:00
|
|
|
|
2018-09-05 13:43:04 +02:00
|
|
|
|
2019-05-20 13:42:16 +02:00
|
|
|
class CYCLES_OBJECT_PT_visibility_culling(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Culling"
|
|
|
|
|
bl_parent_id = "CYCLES_OBJECT_PT_visibility"
|
2018-09-05 13:43:04 +02:00
|
|
|
bl_context = "object"
|
|
|
|
|
|
2019-05-20 13:42:16 +02:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
ob = context.object
|
|
|
|
|
return CyclesButtonsPanel.poll(context) and has_geometry_visibility(ob)
|
2018-09-05 13:43:04 +02:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-09-05 13:43:04 +02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
ob = context.object
|
|
|
|
|
cob = ob.cycles
|
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
row = layout.row()
|
|
|
|
|
row.active = scene.render.use_simplify and cscene.use_camera_cull
|
|
|
|
|
row.prop(cob, "use_camera_cull")
|
2018-09-05 13:43:04 +02:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
row = layout.row()
|
|
|
|
|
row.active = scene.render.use_simplify and cscene.use_distance_cull
|
|
|
|
|
row.prop(cob, "use_distance_cull")
|
2015-04-10 18:09:58 +05:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2018-07-05 12:44:15 +02:00
|
|
|
def panel_node_draw(layout, id_data, output_type, input_name):
|
2024-10-01 10:01:16 +10:00
|
|
|
from bpy_extras.node_utils import find_node_input
|
|
|
|
|
|
2012-03-08 19:53:01 +00:00
|
|
|
if not id_data.use_nodes:
|
2013-06-25 16:38:40 +00:00
|
|
|
layout.operator("cycles.use_shading_nodes", icon='NODETREE')
|
2011-11-10 13:00:53 +00:00
|
|
|
return False
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-24 19:36:12 +00:00
|
|
|
ntree = id_data.node_tree
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2018-07-05 12:44:15 +02:00
|
|
|
node = ntree.get_output_node('CYCLES')
|
2017-08-01 18:03:16 +02:00
|
|
|
if node:
|
2011-08-28 13:55:59 +00:00
|
|
|
input = find_node_input(node, input_name)
|
2017-08-01 18:03:16 +02:00
|
|
|
if input:
|
|
|
|
|
layout.template_node_view(ntree, node, input)
|
|
|
|
|
else:
|
|
|
|
|
layout.label(text="Incompatible output node")
|
|
|
|
|
else:
|
|
|
|
|
layout.label(text="No output node")
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-11-10 13:00:53 +00:00
|
|
|
return True
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2018-06-27 14:41:53 +02:00
|
|
|
class CYCLES_LIGHT_PT_preview(CyclesButtonsPanel, Panel):
|
2013-01-29 17:30:26 +00:00
|
|
|
bl_label = "Preview"
|
|
|
|
|
bl_context = "data"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-05-30 17:47:48 +02:00
|
|
|
return (
|
2018-06-27 14:41:53 +02:00
|
|
|
context.light and
|
2018-05-30 17:47:48 +02:00
|
|
|
not (
|
2018-06-27 14:41:53 +02:00
|
|
|
context.light.type == 'AREA' and
|
|
|
|
|
context.light.cycles.is_portal
|
2018-05-30 17:47:48 +02:00
|
|
|
) and
|
|
|
|
|
CyclesButtonsPanel.poll(context)
|
|
|
|
|
)
|
2013-01-29 17:30:26 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
2018-06-27 14:41:53 +02:00
|
|
|
self.layout.template_preview(context.light)
|
2013-01-29 17:30:26 +00:00
|
|
|
|
|
|
|
|
|
2018-06-27 14:41:53 +02:00
|
|
|
class CYCLES_LIGHT_PT_light(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Light"
|
2011-09-27 20:37:24 +00:00
|
|
|
bl_context = "data"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-06-27 14:41:53 +02:00
|
|
|
return context.light and CyclesButtonsPanel.poll(context)
|
2011-09-27 20:37:24 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
2018-06-27 14:41:53 +02:00
|
|
|
light = context.light
|
|
|
|
|
clamp = light.cycles
|
2011-09-27 20:37:24 +00:00
|
|
|
|
2019-03-17 17:52:05 +01:00
|
|
|
if self.bl_space_type == 'PROPERTIES':
|
|
|
|
|
layout.row().prop(light, "type", expand=True)
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
else:
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.row().prop(light, "type")
|
|
|
|
|
|
2018-06-27 14:23:17 +02:00
|
|
|
col = layout.column()
|
2011-09-27 20:37:24 +00:00
|
|
|
|
2019-05-12 13:41:23 +02:00
|
|
|
col.prop(light, "color")
|
|
|
|
|
col.prop(light, "energy")
|
|
|
|
|
col.separator()
|
|
|
|
|
|
2019-05-15 14:45:33 +02:00
|
|
|
if light.type in {'POINT', 'SPOT'}:
|
2024-02-07 19:07:11 +01:00
|
|
|
col.prop(light, "use_soft_falloff")
|
2020-06-02 07:15:41 +02:00
|
|
|
col.prop(light, "shadow_soft_size", text="Radius")
|
2019-05-15 14:45:33 +02:00
|
|
|
elif light.type == 'SUN':
|
|
|
|
|
col.prop(light, "angle")
|
2018-06-27 14:41:53 +02:00
|
|
|
elif light.type == 'AREA':
|
|
|
|
|
col.prop(light, "shape", text="Shape")
|
2011-09-27 20:37:24 +00:00
|
|
|
sub = col.column(align=True)
|
|
|
|
|
|
2018-06-27 14:41:53 +02:00
|
|
|
if light.shape in {'SQUARE', 'DISK'}:
|
|
|
|
|
sub.prop(light, "size")
|
|
|
|
|
elif light.shape in {'RECTANGLE', 'ELLIPSE'}:
|
|
|
|
|
sub.prop(light, "size", text="Size X")
|
|
|
|
|
sub.prop(light, "size_y", text="Y")
|
2011-09-27 20:37:24 +00:00
|
|
|
|
2018-06-27 14:41:53 +02:00
|
|
|
if not (light.type == 'AREA' and clamp.is_portal):
|
2024-02-07 19:07:11 +01:00
|
|
|
col.separator()
|
2018-06-27 14:23:17 +02:00
|
|
|
sub = col.column()
|
Cycles: Added support for light portals
This patch adds support for light portals: objects that help sampling the
environment light, therefore improving convergence. Using them tor other
lights in a unidirectional pathtracer is virtually useless.
The sampling is done with the area-preserving code already used for area lamps.
MIS is used both for combination of different portals and for combining portal-
and envmap-sampling.
The direction of portals is considered, they aren't used if the sampling point
is behind them.
Reviewers: sergey, dingto, #cycles
Reviewed By: dingto, #cycles
Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto
Differential Revision: https://developer.blender.org/D1133
2015-04-28 00:51:55 +05:00
|
|
|
sub.prop(clamp, "max_bounces")
|
2012-06-13 11:44:48 +00:00
|
|
|
|
Cycles: Added support for light portals
This patch adds support for light portals: objects that help sampling the
environment light, therefore improving convergence. Using them tor other
lights in a unidirectional pathtracer is virtually useless.
The sampling is done with the area-preserving code already used for area lamps.
MIS is used both for combination of different portals and for combining portal-
and envmap-sampling.
The direction of portals is considered, they aren't used if the sampling point
is behind them.
Reviewers: sergey, dingto, #cycles
Reviewed By: dingto, #cycles
Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto
Differential Revision: https://developer.blender.org/D1133
2015-04-28 00:51:55 +05:00
|
|
|
sub = col.column(align=True)
|
2018-06-27 14:41:53 +02:00
|
|
|
sub.active = not (light.type == 'AREA' and clamp.is_portal)
|
2024-05-15 22:00:55 +02:00
|
|
|
sub.prop(light, "use_shadow", text="Cast Shadow")
|
Cycles: Added support for light portals
This patch adds support for light portals: objects that help sampling the
environment light, therefore improving convergence. Using them tor other
lights in a unidirectional pathtracer is virtually useless.
The sampling is done with the area-preserving code already used for area lamps.
MIS is used both for combination of different portals and for combining portal-
and envmap-sampling.
The direction of portals is considered, they aren't used if the sampling point
is behind them.
Reviewers: sergey, dingto, #cycles
Reviewed By: dingto, #cycles
Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto
Differential Revision: https://developer.blender.org/D1133
2015-04-28 00:51:55 +05:00
|
|
|
sub.prop(clamp, "use_multiple_importance_sampling", text="Multiple Importance")
|
2022-10-25 19:36:13 +01:00
|
|
|
if use_mnee(context):
|
Cycles: approximate shadow caustics using manifold next event estimation
This adds support for selective rendering of caustics in shadows of refractive
objects. Example uses are rendering of underwater caustics and eye caustics.
This is based on "Manifold Next Event Estimation", a method developed for
production rendering. The idea is to selectively enable shadow caustics on a
few objects in the scene where they have a big visual impact, without impacting
render performance for the rest of the scene.
The Shadow Caustic option must be manually enabled on light, caustic receiver
and caster objects. For such light paths, the Filter Glossy option will be
ignored and replaced by sharp caustics.
Currently this method has a various limitations:
* Only caustics in shadows of refractive objects work, which means no caustics
from reflection or caustics that outside shadows. Only up to 4 refractive
caustic bounces are supported.
* Caustic caster objects should have smooth normals.
* Not currently support for Metal GPU rendering.
In the future this method may be extended for more general caustics.
TECHNICAL DETAILS
This code adds manifold next event estimation through refractive surface(s) as a
new sampling technique for direct lighting, i.e. finding the point on the
refractive surface(s) along the path to a light sample, which satisfies Fermat's
principle for a given microfacet normal and the path's end points. This
technique involves walking on the "specular manifold" using a pseudo newton
solver. Such a manifold is defined by the specular constraint matrix from the
manifold exploration framework [2]. For each refractive interface, this
constraint is defined by enforcing that the generalized half-vector projection
onto the interface local tangent plane is null. The newton solver guides the
walk by linearizing the manifold locally before reprojecting the linear solution
onto the refractive surface. See paper [1] for more details about the technique
itself and [3] for the half-vector light transport formulation, from which it is
derived.
[1] Manifold Next Event Estimation
Johannes Hanika, Marc Droske, and Luca Fascione. 2015.
Comput. Graph. Forum 34, 4 (July 2015), 87–97.
https://jo.dreggn.org/home/2015_mnee.pdf
[2] Manifold exploration: a Markov Chain Monte Carlo technique for rendering
scenes with difficult specular transport Wenzel Jakob and Steve Marschner.
2012. ACM Trans. Graph. 31, 4, Article 58 (July 2012), 13 pages.
https://www.cs.cornell.edu/projects/manifolds-sg12/
[3] The Natural-Constraint Representation of the Path Space for Efficient
Light Transport Simulation. Anton S. Kaplanyan, Johannes Hanika, and Carsten
Dachsbacher. 2014. ACM Trans. Graph. 33, 4, Article 102 (July 2014), 13 pages.
https://cg.ivd.kit.edu/english/HSLT.php
The code for this samping technique was inserted at the light sampling stage
(direct lighting). If the walk is successful, it turns off path regularization
using a specialized flag in the path state (PATH_MNEE_SUCCESS). This flag tells
the integrator not to blur the brdf roughness further down the path (in a child
ray created from BSDF sampling). In addition, using a cascading mechanism of
flag values, we cull connections to caustic lights for this and children rays,
which should be resolved through MNEE.
This mechanism also cancels the MIS bsdf counter part at the casutic receiver
depth, in essence leaving MNEE as the only sampling technique from receivers
through refractive casters to caustic lights. This choice might not be optimal
when the light gets large wrt to the receiver, though this is usually not when
you want to use MNEE.
This connection culling strategy removes a fair amount of fireflies, at the cost
of introducing a slight bias. Because of the selective nature of the culling
mechanism, reflective caustics still benefit from the native path
regularization, which further removes fireflies on other surfaces (bouncing
light off casters).
Differential Revision: https://developer.blender.org/D13533
2022-04-01 15:44:24 +02:00
|
|
|
sub.prop(clamp, "is_caustics_light", text="Shadow Caustics")
|
Cycles: Added support for light portals
This patch adds support for light portals: objects that help sampling the
environment light, therefore improving convergence. Using them tor other
lights in a unidirectional pathtracer is virtually useless.
The sampling is done with the area-preserving code already used for area lamps.
MIS is used both for combination of different portals and for combining portal-
and envmap-sampling.
The direction of portals is considered, they aren't used if the sampling point
is behind them.
Reviewers: sergey, dingto, #cycles
Reviewed By: dingto, #cycles
Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto
Differential Revision: https://developer.blender.org/D1133
2015-04-28 00:51:55 +05:00
|
|
|
|
2018-06-27 14:41:53 +02:00
|
|
|
if light.type == 'AREA':
|
Cycles: Added support for light portals
This patch adds support for light portals: objects that help sampling the
environment light, therefore improving convergence. Using them tor other
lights in a unidirectional pathtracer is virtually useless.
The sampling is done with the area-preserving code already used for area lamps.
MIS is used both for combination of different portals and for combining portal-
and envmap-sampling.
The direction of portals is considered, they aren't used if the sampling point
is behind them.
Reviewers: sergey, dingto, #cycles
Reviewed By: dingto, #cycles
Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto
Differential Revision: https://developer.blender.org/D1133
2015-04-28 00:51:55 +05:00
|
|
|
col.prop(clamp, "is_portal", text="Portal")
|
2013-01-30 15:57:15 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2018-06-27 14:41:53 +02:00
|
|
|
class CYCLES_LIGHT_PT_nodes(CyclesButtonsPanel, Panel):
|
2011-10-12 23:03:12 +00:00
|
|
|
bl_label = "Nodes"
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_context = "data"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-06-27 14:41:53 +02:00
|
|
|
return context.light and not (context.light.type == 'AREA' and
|
2018-07-12 11:04:53 +02:00
|
|
|
context.light.cycles.is_portal) and \
|
2018-05-30 17:47:48 +02:00
|
|
|
CyclesButtonsPanel.poll(context)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2020-05-01 15:21:41 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
2018-06-27 14:41:53 +02:00
|
|
|
light = context.light
|
2019-05-12 13:41:23 +02:00
|
|
|
panel_node_draw(layout, light, 'OUTPUT_LIGHT', 'Surface')
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-06-19 22:17:19 +00:00
|
|
|
|
2021-04-01 05:35:56 +02:00
|
|
|
class CYCLES_LIGHT_PT_beam_shape(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Beam Shape"
|
2020-12-21 13:58:12 +01:00
|
|
|
bl_parent_id = "CYCLES_LIGHT_PT_light"
|
2012-06-04 17:17:10 +00:00
|
|
|
bl_context = "data"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2021-04-01 05:35:56 +02:00
|
|
|
if context.light.type in {'SPOT', 'AREA'}:
|
|
|
|
|
return context.light and CyclesButtonsPanel.poll(context)
|
2012-06-04 17:17:10 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2018-06-27 14:41:53 +02:00
|
|
|
light = context.light
|
2018-06-27 14:23:17 +02:00
|
|
|
layout.use_property_split = True
|
2012-06-04 17:17:10 +00:00
|
|
|
|
2018-06-27 14:23:17 +02:00
|
|
|
col = layout.column()
|
2021-04-01 05:35:56 +02:00
|
|
|
if light.type == 'SPOT':
|
|
|
|
|
col.prop(light, "spot_size", text="Spot Size")
|
|
|
|
|
col.prop(light, "spot_blend", text="Blend", slider=True)
|
|
|
|
|
col.prop(light, "show_cone")
|
|
|
|
|
elif light.type == 'AREA':
|
|
|
|
|
col.prop(light, "spread", text="Spread")
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2012-06-19 22:17:19 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_WORLD_PT_preview(CyclesButtonsPanel, Panel):
|
2013-01-29 17:30:26 +00:00
|
|
|
bl_label = "Preview"
|
|
|
|
|
bl_context = "world"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.world and CyclesButtonsPanel.poll(context)
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
self.layout.template_preview(context.world)
|
|
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_WORLD_PT_surface(CyclesButtonsPanel, Panel):
|
2011-10-12 23:03:12 +00:00
|
|
|
bl_label = "Surface"
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_context = "world"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.world and CyclesButtonsPanel.poll(context)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2020-05-01 15:21:41 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
2011-11-10 13:00:53 +00:00
|
|
|
world = context.world
|
2012-01-20 17:49:17 +00:00
|
|
|
|
2018-07-05 12:44:15 +02:00
|
|
|
if not panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Surface'):
|
2018-07-17 12:35:45 +02:00
|
|
|
layout.prop(world, "color")
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-03-08 05:36:05 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_WORLD_PT_volume(CyclesButtonsPanel, Panel):
|
2012-02-28 16:45:08 +00:00
|
|
|
bl_label = "Volume"
|
2023-02-23 22:00:57 +01:00
|
|
|
bl_translation_context = i18n_contexts.id_id
|
2012-01-20 17:49:17 +00:00
|
|
|
bl_context = "world"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2013-12-28 16:56:19 +01:00
|
|
|
world = context.world
|
|
|
|
|
return world and world.node_tree and CyclesButtonsPanel.poll(context)
|
2012-01-20 17:49:17 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
2020-05-01 15:21:41 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
2012-01-20 17:49:17 +00:00
|
|
|
world = context.world
|
2018-07-05 12:44:15 +02:00
|
|
|
panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Volume')
|
2012-01-20 17:49:17 +00:00
|
|
|
|
2012-03-08 05:36:05 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_WORLD_PT_mist(CyclesButtonsPanel, Panel):
|
2013-06-07 12:45:26 +00:00
|
|
|
bl_label = "Mist Pass"
|
|
|
|
|
bl_context = "world"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
if CyclesButtonsPanel.poll(context):
|
2014-04-05 17:52:06 -03:00
|
|
|
if context.world:
|
2017-11-22 10:52:39 -02:00
|
|
|
for view_layer in context.scene.view_layers:
|
|
|
|
|
if view_layer.use_pass_mist:
|
2014-04-05 17:52:06 -03:00
|
|
|
return True
|
2013-06-07 12:45:26 +00:00
|
|
|
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2020-09-09 21:15:05 -04:00
|
|
|
layout.use_property_split = True
|
2013-06-07 12:45:26 +00:00
|
|
|
|
|
|
|
|
world = context.world
|
|
|
|
|
|
2020-09-09 21:15:05 -04:00
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(world.mist_settings, "start")
|
|
|
|
|
col.prop(world.mist_settings, "depth")
|
2013-06-07 12:45:26 +00:00
|
|
|
|
2020-09-09 21:15:05 -04:00
|
|
|
col = layout.column()
|
|
|
|
|
col.prop(world.mist_settings, "falloff")
|
2013-06-07 12:45:26 +00:00
|
|
|
|
2012-03-08 05:36:05 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_WORLD_PT_ray_visibility(CyclesButtonsPanel, Panel):
|
2013-06-10 20:34:34 +00:00
|
|
|
bl_label = "Ray Visibility"
|
|
|
|
|
bl_context = "world"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return CyclesButtonsPanel.poll(context) and context.world
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2020-06-29 17:12:19 -04:00
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
2013-06-10 20:34:34 +00:00
|
|
|
|
|
|
|
|
world = context.world
|
|
|
|
|
visibility = world.cycles_visibility
|
|
|
|
|
|
2020-06-29 17:12:19 -04:00
|
|
|
col = layout.column()
|
|
|
|
|
col.prop(visibility, "camera")
|
|
|
|
|
col.prop(visibility, "diffuse")
|
|
|
|
|
col.prop(visibility, "glossy")
|
|
|
|
|
col.prop(visibility, "transmission")
|
|
|
|
|
col.prop(visibility, "scatter")
|
2013-06-10 20:34:34 +00:00
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_WORLD_PT_settings(CyclesButtonsPanel, Panel):
|
2012-02-28 16:45:08 +00:00
|
|
|
bl_label = "Settings"
|
2011-10-12 23:03:12 +00:00
|
|
|
bl_context = "world"
|
2011-10-19 00:13:41 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-10-12 23:03:12 +00:00
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2012-02-28 16:45:08 +00:00
|
|
|
return context.world and CyclesButtonsPanel.poll(context)
|
2011-10-12 23:03:12 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2018-06-04 12:20:40 +02:00
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2011-10-12 23:03:12 +00:00
|
|
|
|
2018-11-26 09:26:38 +11:00
|
|
|
layout.column()
|
2014-06-07 18:47:14 +02:00
|
|
|
|
|
|
|
|
|
2018-06-04 17:26:47 +02:00
|
|
|
class CYCLES_WORLD_PT_settings_surface(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Surface"
|
|
|
|
|
bl_parent_id = "CYCLES_WORLD_PT_settings"
|
|
|
|
|
bl_context = "world"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.world and CyclesButtonsPanel.poll(context)
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 17:26:47 +02:00
|
|
|
|
|
|
|
|
world = context.world
|
|
|
|
|
cworld = world.cycles
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
2018-06-14 16:18:34 +02:00
|
|
|
col.prop(cworld, "sampling_method", text="Sampling")
|
2012-02-28 16:45:08 +00:00
|
|
|
|
2018-06-04 17:26:47 +02:00
|
|
|
sub = col.column()
|
2018-06-14 16:18:34 +02:00
|
|
|
sub.active = cworld.sampling_method != 'NONE'
|
|
|
|
|
subsub = sub.row(align=True)
|
|
|
|
|
subsub.active = cworld.sampling_method == 'MANUAL'
|
|
|
|
|
subsub.prop(cworld, "sample_map_resolution")
|
2015-07-12 17:56:54 +02:00
|
|
|
sub.prop(cworld, "max_bounces")
|
Cycles: approximate shadow caustics using manifold next event estimation
This adds support for selective rendering of caustics in shadows of refractive
objects. Example uses are rendering of underwater caustics and eye caustics.
This is based on "Manifold Next Event Estimation", a method developed for
production rendering. The idea is to selectively enable shadow caustics on a
few objects in the scene where they have a big visual impact, without impacting
render performance for the rest of the scene.
The Shadow Caustic option must be manually enabled on light, caustic receiver
and caster objects. For such light paths, the Filter Glossy option will be
ignored and replaced by sharp caustics.
Currently this method has a various limitations:
* Only caustics in shadows of refractive objects work, which means no caustics
from reflection or caustics that outside shadows. Only up to 4 refractive
caustic bounces are supported.
* Caustic caster objects should have smooth normals.
* Not currently support for Metal GPU rendering.
In the future this method may be extended for more general caustics.
TECHNICAL DETAILS
This code adds manifold next event estimation through refractive surface(s) as a
new sampling technique for direct lighting, i.e. finding the point on the
refractive surface(s) along the path to a light sample, which satisfies Fermat's
principle for a given microfacet normal and the path's end points. This
technique involves walking on the "specular manifold" using a pseudo newton
solver. Such a manifold is defined by the specular constraint matrix from the
manifold exploration framework [2]. For each refractive interface, this
constraint is defined by enforcing that the generalized half-vector projection
onto the interface local tangent plane is null. The newton solver guides the
walk by linearizing the manifold locally before reprojecting the linear solution
onto the refractive surface. See paper [1] for more details about the technique
itself and [3] for the half-vector light transport formulation, from which it is
derived.
[1] Manifold Next Event Estimation
Johannes Hanika, Marc Droske, and Luca Fascione. 2015.
Comput. Graph. Forum 34, 4 (July 2015), 87–97.
https://jo.dreggn.org/home/2015_mnee.pdf
[2] Manifold exploration: a Markov Chain Monte Carlo technique for rendering
scenes with difficult specular transport Wenzel Jakob and Steve Marschner.
2012. ACM Trans. Graph. 31, 4, Article 58 (July 2012), 13 pages.
https://www.cs.cornell.edu/projects/manifolds-sg12/
[3] The Natural-Constraint Representation of the Path Space for Efficient
Light Transport Simulation. Anton S. Kaplanyan, Johannes Hanika, and Carsten
Dachsbacher. 2014. ACM Trans. Graph. 33, 4, Article 102 (July 2014), 13 pages.
https://cg.ivd.kit.edu/english/HSLT.php
The code for this samping technique was inserted at the light sampling stage
(direct lighting). If the walk is successful, it turns off path regularization
using a specialized flag in the path state (PATH_MNEE_SUCCESS). This flag tells
the integrator not to blur the brdf roughness further down the path (in a child
ray created from BSDF sampling). In addition, using a cascading mechanism of
flag values, we cull connections to caustic lights for this and children rays,
which should be resolved through MNEE.
This mechanism also cancels the MIS bsdf counter part at the casutic receiver
depth, in essence leaving MNEE as the only sampling technique from receivers
through refractive casters to caustic lights. This choice might not be optimal
when the light gets large wrt to the receiver, though this is usually not when
you want to use MNEE.
This connection culling strategy removes a fair amount of fireflies, at the cost
of introducing a slight bias. Because of the selective nature of the culling
mechanism, reflective caustics still benefit from the native path
regularization, which further removes fireflies on other surfaces (bouncing
light off casters).
Differential Revision: https://developer.blender.org/D13533
2022-04-01 15:44:24 +02:00
|
|
|
sub.prop(cworld, "is_caustics_light", text="Shadow Caustics")
|
|
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2018-06-04 17:26:47 +02:00
|
|
|
class CYCLES_WORLD_PT_settings_volume(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Volume"
|
2023-02-23 22:00:57 +01:00
|
|
|
bl_translation_context = i18n_contexts.id_id
|
2018-06-04 17:26:47 +02:00
|
|
|
bl_parent_id = "CYCLES_WORLD_PT_settings"
|
|
|
|
|
bl_context = "world"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.world and CyclesButtonsPanel.poll(context)
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 17:26:47 +02:00
|
|
|
|
|
|
|
|
world = context.world
|
|
|
|
|
cworld = world.cycles
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
2014-08-24 14:54:48 +02:00
|
|
|
sub = col.column()
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
col.prop(cworld, "volume_sampling", text="Sampling")
|
2018-06-04 17:26:47 +02:00
|
|
|
col.prop(cworld, "volume_interpolation", text="Interpolation")
|
2014-06-07 18:47:14 +02:00
|
|
|
col.prop(cworld, "homogeneous_volume", text="Homogeneous")
|
2020-03-07 14:38:52 +01:00
|
|
|
sub = col.column()
|
|
|
|
|
sub.active = not cworld.homogeneous_volume
|
|
|
|
|
sub.prop(cworld, "volume_step_size")
|
2014-06-07 18:47:14 +02:00
|
|
|
|
2012-03-08 05:36:05 +00:00
|
|
|
|
2022-05-04 21:20:17 +02:00
|
|
|
class CYCLES_WORLD_PT_settings_light_group(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Light Group"
|
|
|
|
|
bl_parent_id = "CYCLES_WORLD_PT_settings"
|
|
|
|
|
bl_context = "world"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.world and CyclesButtonsPanel.poll(context)
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
|
|
world = context.world
|
|
|
|
|
view_layer = context.view_layer
|
|
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
|
|
|
|
|
sub = row.column(align=True)
|
|
|
|
|
sub.prop_search(
|
|
|
|
|
world,
|
|
|
|
|
"lightgroup",
|
|
|
|
|
view_layer,
|
|
|
|
|
"lightgroups",
|
|
|
|
|
text="Light Group",
|
|
|
|
|
results_are_suggestions=True,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
sub = row.column(align=True)
|
2022-07-11 14:00:49 +02:00
|
|
|
sub.enabled = bool(world.lightgroup) and not any(lg.name == world.lightgroup for lg in view_layer.lightgroups)
|
2022-05-04 21:20:17 +02:00
|
|
|
sub.operator("scene.view_layer_add_lightgroup", icon='ADD', text="").name = world.lightgroup
|
|
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_MATERIAL_PT_preview(CyclesButtonsPanel, Panel):
|
2013-01-29 17:30:26 +00:00
|
|
|
bl_label = "Preview"
|
|
|
|
|
bl_context = "material"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
mat = context.material
|
|
|
|
|
return mat and (not mat.grease_pencil) and CyclesButtonsPanel.poll(context)
|
2013-01-29 17:30:26 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
self.layout.template_preview(context.material)
|
|
|
|
|
|
|
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_MATERIAL_PT_surface(CyclesButtonsPanel, Panel):
|
2011-10-12 23:03:12 +00:00
|
|
|
bl_label = "Surface"
|
|
|
|
|
bl_context = "material"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
mat = context.material
|
|
|
|
|
return mat and (not mat.grease_pencil) and CyclesButtonsPanel.poll(context)
|
2011-10-12 23:03:12 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
2020-05-01 15:21:41 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
2011-10-12 23:03:12 +00:00
|
|
|
mat = context.material
|
2018-07-05 12:44:15 +02:00
|
|
|
if not panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Surface'):
|
2011-11-10 13:00:53 +00:00
|
|
|
layout.prop(mat, "diffuse_color")
|
2011-10-12 23:03:12 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_MATERIAL_PT_volume(CyclesButtonsPanel, Panel):
|
2011-10-12 23:03:12 +00:00
|
|
|
bl_label = "Volume"
|
2023-02-23 22:00:57 +01:00
|
|
|
bl_translation_context = i18n_contexts.id_id
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_context = "material"
|
2011-10-19 00:13:41 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2013-12-28 16:56:19 +01:00
|
|
|
mat = context.material
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
return mat and (not mat.grease_pencil) and mat.node_tree and CyclesButtonsPanel.poll(context)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2020-05-01 15:21:41 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
mat = context.material
|
2014-09-17 18:36:17 +10:00
|
|
|
# cmat = mat.cycles
|
2011-10-12 23:03:12 +00:00
|
|
|
|
2018-07-05 12:44:15 +02:00
|
|
|
panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Volume')
|
2011-10-12 23:03:12 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_MATERIAL_PT_displacement(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Displacement"
|
|
|
|
|
bl_context = "material"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2011-10-22 18:51:45 +00:00
|
|
|
mat = context.material
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
return mat and (not mat.grease_pencil) and mat.node_tree and CyclesButtonsPanel.poll(context)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2020-05-01 15:21:41 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
mat = context.material
|
2018-07-05 12:44:15 +02:00
|
|
|
panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Displacement')
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_MATERIAL_PT_settings(CyclesButtonsPanel, Panel):
|
2011-08-28 13:55:59 +00:00
|
|
|
bl_label = "Settings"
|
|
|
|
|
bl_context = "material"
|
2018-09-21 11:24:56 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2018-06-04 17:26:47 +02:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
mat = context.material
|
|
|
|
|
return mat and (not mat.grease_pencil) and CyclesButtonsPanel.poll(context)
|
2018-06-04 17:26:47 +02:00
|
|
|
|
2018-12-07 00:43:07 +01:00
|
|
|
@staticmethod
|
|
|
|
|
def draw_shared(self, mat):
|
2018-06-04 17:26:47 +02:00
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 17:26:47 +02:00
|
|
|
|
|
|
|
|
layout.prop(mat, "pass_index")
|
|
|
|
|
|
2018-12-07 00:43:07 +01:00
|
|
|
def draw(self, context):
|
|
|
|
|
self.draw_shared(self, context.material)
|
|
|
|
|
|
2018-06-04 17:26:47 +02:00
|
|
|
|
|
|
|
|
class CYCLES_MATERIAL_PT_settings_surface(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Surface"
|
|
|
|
|
bl_parent_id = "CYCLES_MATERIAL_PT_settings"
|
|
|
|
|
bl_context = "material"
|
|
|
|
|
|
2018-12-07 00:43:07 +01:00
|
|
|
@staticmethod
|
|
|
|
|
def draw_shared(self, mat):
|
2011-08-28 13:55:59 +00:00
|
|
|
layout = self.layout
|
2018-06-04 12:20:40 +02:00
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-09-27 20:37:24 +00:00
|
|
|
cmat = mat.cycles
|
|
|
|
|
|
2018-06-04 12:20:40 +02:00
|
|
|
col = layout.column()
|
2023-11-21 19:55:38 +01:00
|
|
|
col.prop(mat, "displacement_method", text="Displacement")
|
2022-11-30 20:50:11 +01:00
|
|
|
col.prop(cmat, "emission_sampling")
|
2023-11-06 15:45:00 +01:00
|
|
|
col.prop(mat, "use_transparent_shadow")
|
2023-10-11 15:07:21 +02:00
|
|
|
col.prop(cmat, "use_bump_map_correction")
|
2016-08-02 05:13:58 -04:00
|
|
|
|
2018-12-07 00:43:07 +01:00
|
|
|
def draw(self, context):
|
|
|
|
|
self.draw_shared(self, context.material)
|
|
|
|
|
|
2018-06-04 17:26:47 +02:00
|
|
|
|
|
|
|
|
class CYCLES_MATERIAL_PT_settings_volume(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Volume"
|
2023-02-23 22:00:57 +01:00
|
|
|
bl_translation_context = i18n_contexts.id_id
|
2018-06-04 17:26:47 +02:00
|
|
|
bl_parent_id = "CYCLES_MATERIAL_PT_settings"
|
|
|
|
|
bl_context = "material"
|
|
|
|
|
|
2018-12-07 00:43:07 +01:00
|
|
|
@staticmethod
|
|
|
|
|
def draw_shared(self, context, mat):
|
2018-06-04 17:26:47 +02:00
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 17:26:47 +02:00
|
|
|
|
|
|
|
|
cmat = mat.cycles
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
2014-08-24 14:54:48 +02:00
|
|
|
sub = col.column()
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
col.prop(cmat, "volume_sampling", text="Sampling")
|
2018-06-04 12:20:40 +02:00
|
|
|
col.prop(cmat, "volume_interpolation", text="Interpolation")
|
2014-06-07 18:47:14 +02:00
|
|
|
col.prop(cmat, "homogeneous_volume", text="Homogeneous")
|
2020-03-07 14:38:52 +01:00
|
|
|
sub = col.column()
|
|
|
|
|
sub.active = not cmat.homogeneous_volume
|
|
|
|
|
sub.prop(cmat, "volume_step_rate")
|
2014-06-07 18:47:14 +02:00
|
|
|
|
2018-12-07 00:43:07 +01:00
|
|
|
def draw(self, context):
|
|
|
|
|
self.draw_shared(self, context, context.material)
|
|
|
|
|
|
2018-06-04 17:26:47 +02:00
|
|
|
|
2017-09-01 16:08:25 +10:00
|
|
|
class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
|
2014-01-02 19:05:07 -02:00
|
|
|
bl_label = "Bake"
|
|
|
|
|
bl_context = "render"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2018-05-30 17:47:48 +02:00
|
|
|
layout.use_property_split = True
|
2018-07-01 09:23:51 +02:00
|
|
|
layout.use_property_decorate = False # No animation.
|
2014-01-02 19:05:07 -02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
cbk = scene.render.bake
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
rd = scene.render
|
2014-07-22 12:03:15 +10:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
if rd.use_bake_multires:
|
2019-02-18 14:47:51 +11:00
|
|
|
layout.operator("object.bake_image", icon='RENDER_STILL')
|
|
|
|
|
layout.prop(rd, "use_bake_multires")
|
|
|
|
|
layout.prop(rd, "bake_type")
|
2014-01-02 19:05:07 -02:00
|
|
|
|
2019-02-18 14:47:51 +11:00
|
|
|
else:
|
|
|
|
|
layout.operator("object.bake", icon='RENDER_STILL').type = cscene.bake_type
|
|
|
|
|
layout.prop(rd, "use_bake_multires")
|
|
|
|
|
layout.prop(cscene, "bake_type")
|
2014-01-02 19:05:07 -02:00
|
|
|
|
2022-10-03 19:26:02 +02:00
|
|
|
if not rd.use_bake_multires and cscene.bake_type not in {
|
|
|
|
|
"AO", "POSITION", "NORMAL", "UV", "ROUGHNESS", "ENVIRONMENT"}:
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(cbk, "view_from")
|
|
|
|
|
row.active = scene.camera is not None
|
|
|
|
|
|
2018-05-30 17:47:48 +02:00
|
|
|
|
2019-02-18 14:47:51 +11:00
|
|
|
class CYCLES_RENDER_PT_bake_influence(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Influence"
|
|
|
|
|
bl_context = "render"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_bake"
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
2020-10-02 10:15:51 +10:00
|
|
|
|
2019-02-18 14:47:51 +11:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
rd = scene.render
|
|
|
|
|
if rd.use_bake_multires == False and cscene.bake_type in {
|
2020-02-14 12:20:12 +01:00
|
|
|
'NORMAL', 'COMBINED', 'DIFFUSE', 'GLOSSY', 'TRANSMISSION'}:
|
2019-02-18 14:47:51 +11:00
|
|
|
return True
|
2018-05-30 17:47:48 +02:00
|
|
|
|
2019-02-18 14:47:51 +11:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False # No animation.
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
cbk = scene.render.bake
|
|
|
|
|
rd = scene.render
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
|
|
if cscene.bake_type == 'NORMAL':
|
|
|
|
|
col.prop(cbk, "normal_space", text="Space")
|
|
|
|
|
|
|
|
|
|
sub = col.column(align=True)
|
|
|
|
|
sub.prop(cbk, "normal_r", text="Swizzle R")
|
2024-04-15 12:02:17 +02:00
|
|
|
sub.prop(cbk, "normal_g", text="G", text_ctxt=i18n_contexts.color)
|
|
|
|
|
sub.prop(cbk, "normal_b", text="B", text_ctxt=i18n_contexts.color)
|
2019-02-18 14:47:51 +11:00
|
|
|
|
|
|
|
|
elif cscene.bake_type == 'COMBINED':
|
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Lighting", align=True)
|
|
|
|
|
col.prop(cbk, "use_pass_direct")
|
|
|
|
|
col.prop(cbk, "use_pass_indirect")
|
2019-02-18 14:47:51 +11:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Contributions", align=True)
|
|
|
|
|
col.active = cbk.use_pass_direct or cbk.use_pass_indirect
|
|
|
|
|
col.prop(cbk, "use_pass_diffuse")
|
|
|
|
|
col.prop(cbk, "use_pass_glossy")
|
|
|
|
|
col.prop(cbk, "use_pass_transmission")
|
|
|
|
|
col.prop(cbk, "use_pass_emit")
|
2019-02-18 14:47:51 +11:00
|
|
|
|
2020-02-14 12:20:12 +01:00
|
|
|
elif cscene.bake_type in {'DIFFUSE', 'GLOSSY', 'TRANSMISSION'}:
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
col = layout.column(heading="Contributions", align=True)
|
|
|
|
|
col.prop(cbk, "use_pass_direct")
|
|
|
|
|
col.prop(cbk, "use_pass_indirect")
|
|
|
|
|
col.prop(cbk, "use_pass_color")
|
2019-02-18 14:47:51 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class CYCLES_RENDER_PT_bake_selected_to_active(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Selected to Active"
|
|
|
|
|
bl_context = "render"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_bake"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
|
|
|
|
return rd.use_bake_multires == False
|
|
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cbk = scene.render.bake
|
|
|
|
|
self.layout.prop(cbk, "use_selected_to_active", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False # No animation.
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
cbk = scene.render.bake
|
|
|
|
|
rd = scene.render
|
|
|
|
|
|
|
|
|
|
layout.active = cbk.use_selected_to_active
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
|
|
col.prop(cbk, "use_cage", text="Cage")
|
|
|
|
|
if cbk.use_cage:
|
2020-05-18 15:50:36 +02:00
|
|
|
col.prop(cbk, "cage_object")
|
|
|
|
|
col = layout.column()
|
|
|
|
|
col.prop(cbk, "cage_extrusion")
|
|
|
|
|
col.active = cbk.cage_object is None
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
else:
|
2020-05-18 15:50:36 +02:00
|
|
|
col.prop(cbk, "cage_extrusion", text="Extrusion")
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
col.prop(cbk, "max_ray_distance")
|
2018-05-30 17:47:48 +02:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
|
2019-02-18 14:47:51 +11:00
|
|
|
class CYCLES_RENDER_PT_bake_output(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Output"
|
|
|
|
|
bl_context = "render"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_bake"
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
2014-01-02 19:05:07 -02:00
|
|
|
|
2019-02-18 14:47:51 +11:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False # No animation.
|
2018-07-01 09:23:51 +02:00
|
|
|
|
2019-02-18 14:47:51 +11:00
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
cbk = scene.render.bake
|
|
|
|
|
rd = scene.render
|
|
|
|
|
|
|
|
|
|
if rd.use_bake_multires:
|
|
|
|
|
layout.prop(rd, "use_bake_clear", text="Clear Image")
|
|
|
|
|
if rd.bake_type == 'DISPLACEMENT':
|
2019-12-30 11:07:17 -03:00
|
|
|
layout.prop(rd, "use_bake_lores_mesh")
|
2019-02-18 14:47:51 +11:00
|
|
|
else:
|
2020-12-23 21:03:00 +01:00
|
|
|
layout.prop(cbk, "target")
|
|
|
|
|
if cbk.target == 'IMAGE_TEXTURES':
|
|
|
|
|
layout.prop(cbk, "use_clear", text="Clear Image")
|
2018-05-30 17:47:48 +02:00
|
|
|
|
2022-04-20 16:07:03 +10:00
|
|
|
|
2022-01-17 18:00:35 +01:00
|
|
|
class CYCLES_RENDER_PT_bake_output_margin(CyclesButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Margin"
|
|
|
|
|
bl_context = "render"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_bake_output"
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cbk = scene.render.bake
|
|
|
|
|
return cbk.target == 'IMAGE_TEXTURES'
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False # No animation.
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
cbk = scene.render.bake
|
|
|
|
|
rd = scene.render
|
|
|
|
|
|
2022-04-08 17:43:44 +02:00
|
|
|
if (cscene.bake_type == 'NORMAL' and cbk.normal_space == 'TANGENT') or cscene.bake_type == 'UV':
|
|
|
|
|
if rd.use_bake_multires:
|
|
|
|
|
layout.prop(rd, "bake_margin", text="Size")
|
|
|
|
|
else:
|
|
|
|
|
if cbk.target == 'IMAGE_TEXTURES':
|
|
|
|
|
layout.prop(cbk, "margin", text="Size")
|
2022-01-17 18:00:35 +01:00
|
|
|
else:
|
2022-04-08 17:43:44 +02:00
|
|
|
if rd.use_bake_multires:
|
|
|
|
|
layout.prop(rd, "bake_margin_type", text="Type")
|
|
|
|
|
layout.prop(rd, "bake_margin", text="Size")
|
|
|
|
|
else:
|
|
|
|
|
if cbk.target == 'IMAGE_TEXTURES':
|
|
|
|
|
layout.prop(cbk, "margin_type", text="Type")
|
|
|
|
|
layout.prop(cbk, "margin", text="Size")
|
2022-01-17 18:00:35 +01:00
|
|
|
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
class CYCLES_RENDER_PT_debug(CyclesDebugButtonsPanel, Panel):
|
2016-01-12 16:00:48 +05:00
|
|
|
bl_label = "Debug"
|
|
|
|
|
bl_context = "render"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2021-11-25 14:32:53 +01:00
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False # No animation.
|
2016-01-12 16:00:48 +05:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
2021-11-25 14:32:53 +01:00
|
|
|
col = layout.column(heading="CPU")
|
2016-01-12 16:00:48 +05:00
|
|
|
|
2016-01-19 18:38:41 +01:00
|
|
|
row = col.row(align=True)
|
2024-02-09 17:25:58 +01:00
|
|
|
row.prop(cscene, "debug_use_cpu_sse42", toggle=True)
|
2016-01-12 16:00:48 +05:00
|
|
|
row.prop(cscene, "debug_use_cpu_avx2", toggle=True)
|
2021-11-25 14:32:53 +01:00
|
|
|
col.prop(cscene, "debug_bvh_layout", text="BVH")
|
2016-01-12 16:00:48 +05:00
|
|
|
|
2024-12-30 16:45:02 +01:00
|
|
|
import platform
|
|
|
|
|
is_macos = platform.system() == 'Darwin'
|
2017-08-21 15:09:03 +02:00
|
|
|
col.separator()
|
|
|
|
|
|
2024-12-30 16:45:02 +01:00
|
|
|
if is_macos:
|
|
|
|
|
col = layout.column(heading="Metal")
|
|
|
|
|
col.prop(cscene, "debug_use_metal_adaptive_compile")
|
|
|
|
|
else:
|
|
|
|
|
col = layout.column(heading="CUDA")
|
|
|
|
|
col.prop(cscene, "debug_use_cuda_adaptive_compile")
|
|
|
|
|
col = layout.column(heading="OptiX")
|
|
|
|
|
col.prop(cscene, "debug_use_optix_debug", text="Module Debug")
|
|
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
|
|
col = layout.column(heading="HIP")
|
|
|
|
|
col.prop(cscene, "debug_use_hip_adaptive_compile")
|
2016-05-06 22:34:15 +02:00
|
|
|
|
2017-08-21 15:09:03 +02:00
|
|
|
col.separator()
|
|
|
|
|
|
2021-11-25 14:32:53 +01:00
|
|
|
col.prop(cscene, "debug_bvh_type", text="Viewport BVH")
|
2016-01-12 16:00:48 +05:00
|
|
|
|
2017-08-21 15:09:03 +02:00
|
|
|
col.separator()
|
|
|
|
|
|
2021-11-25 14:32:53 +01:00
|
|
|
import _cycles
|
|
|
|
|
if _cycles.with_debug:
|
|
|
|
|
col.prop(cscene, "direct_light_sampling_type")
|
2017-08-21 15:09:03 +02:00
|
|
|
|
2016-01-12 16:00:48 +05:00
|
|
|
|
2018-11-03 05:12:45 +01:00
|
|
|
class CYCLES_RENDER_PT_simplify(CyclesButtonsPanel, Panel):
|
2012-04-26 12:13:26 +00:00
|
|
|
bl_label = "Simplify"
|
2018-11-03 05:12:45 +01:00
|
|
|
bl_context = "render"
|
2018-10-18 12:13:06 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2012-04-26 12:13:26 +00:00
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
|
rd = context.scene.render
|
|
|
|
|
self.layout.prop(rd, "use_simplify", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
2018-06-05 13:34:32 +02:00
|
|
|
pass
|
2016-11-25 18:59:43 +01:00
|
|
|
|
2018-05-30 17:47:48 +02:00
|
|
|
|
2018-11-03 05:12:45 +01:00
|
|
|
class CYCLES_RENDER_PT_simplify_viewport(CyclesButtonsPanel, Panel):
|
2018-06-04 17:26:47 +02:00
|
|
|
bl_label = "Viewport"
|
2018-11-03 05:12:45 +01:00
|
|
|
bl_context = "render"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_simplify"
|
2018-06-04 17:26:47 +02:00
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 17:26:47 +02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
layout.active = rd.use_simplify
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
col.prop(rd, "simplify_subdivision", text="Max Subdivision")
|
|
|
|
|
col.prop(rd, "simplify_child_particles", text="Child Particles")
|
|
|
|
|
col.prop(cscene, "texture_limit", text="Texture Limit")
|
2020-10-01 17:58:43 +02:00
|
|
|
col.prop(rd, "simplify_volumes", text="Volume Resolution")
|
2023-12-16 00:18:41 +01:00
|
|
|
col.prop(rd, "use_simplify_normals", text="Normals")
|
2020-03-26 16:28:06 -04:00
|
|
|
|
2018-06-04 17:26:47 +02:00
|
|
|
|
2018-11-03 05:12:45 +01:00
|
|
|
class CYCLES_RENDER_PT_simplify_render(CyclesButtonsPanel, Panel):
|
2018-06-04 17:26:47 +02:00
|
|
|
bl_label = "Render"
|
2018-11-03 05:12:45 +01:00
|
|
|
bl_context = "render"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_simplify"
|
2018-06-04 17:26:47 +02:00
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-04 17:26:47 +02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
layout.active = rd.use_simplify
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
|
|
col.prop(rd, "simplify_subdivision_render", text="Max Subdivision")
|
|
|
|
|
col.prop(rd, "simplify_child_particles_render", text="Child Particles")
|
|
|
|
|
col.prop(cscene, "texture_limit_render", text="Texture Limit")
|
|
|
|
|
|
|
|
|
|
|
2018-11-03 05:12:45 +01:00
|
|
|
class CYCLES_RENDER_PT_simplify_culling(CyclesButtonsPanel, Panel):
|
2018-06-05 13:34:32 +02:00
|
|
|
bl_label = "Culling"
|
2018-11-03 05:12:45 +01:00
|
|
|
bl_context = "render"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_simplify"
|
2018-06-05 13:34:32 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-05 13:34:32 +02:00
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
|
|
|
|
cscene = scene.cycles
|
|
|
|
|
|
|
|
|
|
layout.active = rd.use_simplify
|
|
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
row = layout.row(heading="Camera Culling")
|
|
|
|
|
row.prop(cscene, "use_camera_cull", text="")
|
|
|
|
|
sub = row.column()
|
2018-06-05 13:34:32 +02:00
|
|
|
sub.active = cscene.use_camera_cull
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
sub.prop(cscene, "camera_cull_margin", text="")
|
2018-06-05 13:34:32 +02:00
|
|
|
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
row = layout.row(heading="Distance Culling")
|
|
|
|
|
row.prop(cscene, "use_distance_cull", text="")
|
|
|
|
|
sub = row.column()
|
2018-06-05 13:34:32 +02:00
|
|
|
sub.active = cscene.use_distance_cull
|
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.
Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.
We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.
* Changes the property split percentage from 50/50% to 40/60%. This is
needed to give enough space for the checkboxes. But in most cases this
looks better anyway - see Transform panel. In some cases it simply
fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
When we did this, the alignment was never quite right, and the layout
code was a mess.
* Adds column headings to many places where a list of checkboxes all
share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
poorly with column headings, and also they would mess alignment up
badly. The grid flow layouts also often made buttons and controls jump
around on the screen if you would just resize editors slightly,
causing visual confusion, making users lose their place. The logic for
at what time the list of items would re-flow was often flawed, jumping
to multiple columns too fast or too late - and frankly, the grid flow
layouts would often just look bad.
Maniphest Task: https://developer.blender.org/T65965
Differential Revision: https://developer.blender.org/D7430
Reviewed by: Brecht Van Lommel, Pablo Vazquez.
Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 16:54:03 +02:00
|
|
|
sub.prop(cscene, "distance_cull_margin", text="")
|
2018-06-05 13:34:32 +02:00
|
|
|
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
class CyclesShadingButtonsPanel(CyclesButtonsPanel):
|
2019-09-05 12:47:20 +02:00
|
|
|
bl_space_type = 'VIEW_3D'
|
|
|
|
|
bl_region_type = 'HEADER'
|
|
|
|
|
bl_parent_id = 'VIEW3D_PT_shading'
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return (
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
CyclesButtonsPanel.poll(context) and
|
2019-09-05 12:47:20 +02:00
|
|
|
context.space_data.shading.type == 'RENDERED'
|
|
|
|
|
)
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
|
|
|
|
|
class CYCLES_VIEW3D_PT_shading_render_pass(CyclesShadingButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Render Pass"
|
|
|
|
|
|
2019-09-05 12:47:20 +02:00
|
|
|
def draw(self, context):
|
|
|
|
|
shading = context.space_data.shading
|
|
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.prop(shading.cycles, "render_pass", text="")
|
|
|
|
|
|
|
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
class CYCLES_VIEW3D_PT_shading_debug(CyclesDebugButtonsPanel,
|
|
|
|
|
CyclesShadingButtonsPanel,
|
|
|
|
|
Panel):
|
|
|
|
|
bl_label = "Debug"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return (
|
|
|
|
|
CyclesDebugButtonsPanel.poll(context) and
|
|
|
|
|
CyclesShadingButtonsPanel.poll(context)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
shading = context.space_data.shading
|
|
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.active = context.scene.cycles.use_preview_adaptive_sampling
|
|
|
|
|
layout.prop(shading.cycles, "show_active_pixels")
|
|
|
|
|
|
|
|
|
|
|
2019-08-27 15:47:30 +02:00
|
|
|
class CYCLES_VIEW3D_PT_shading_lighting(Panel):
|
|
|
|
|
bl_space_type = 'VIEW_3D'
|
|
|
|
|
bl_region_type = 'HEADER'
|
|
|
|
|
bl_label = "Lighting"
|
|
|
|
|
bl_parent_id = 'VIEW3D_PT_shading'
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return (
|
|
|
|
|
context.engine in cls.COMPAT_ENGINES and
|
|
|
|
|
context.space_data.shading.type == 'RENDERED'
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
col = layout.column()
|
|
|
|
|
split = col.split(factor=0.9)
|
|
|
|
|
|
|
|
|
|
shading = context.space_data.shading
|
|
|
|
|
col.prop(shading, "use_scene_lights_render")
|
|
|
|
|
col.prop(shading, "use_scene_world_render")
|
|
|
|
|
|
|
|
|
|
if not shading.use_scene_world_render:
|
|
|
|
|
col = layout.column()
|
|
|
|
|
split = col.split(factor=0.9)
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
sub = col.row()
|
|
|
|
|
sub.scale_y = 0.6
|
|
|
|
|
sub.template_icon_view(shading, "studio_light", scale_popup=3)
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
2024-05-24 14:08:31 +10:00
|
|
|
col.operator("screen.userpref_show", emboss=False, text="", icon='PREFERENCES').section = 'LIGHTS'
|
2019-08-27 15:47:30 +02:00
|
|
|
|
|
|
|
|
split = layout.split(factor=0.9)
|
|
|
|
|
col = split.column()
|
|
|
|
|
col.prop(shading, "studiolight_rotate_z", text="Rotation")
|
2019-09-04 16:22:47 +02:00
|
|
|
col.prop(shading, "studiolight_intensity")
|
2019-08-27 15:47:30 +02:00
|
|
|
col.prop(shading, "studiolight_background_alpha")
|
|
|
|
|
|
2020-10-02 10:15:51 +10:00
|
|
|
|
2019-09-12 16:12:19 +02:00
|
|
|
class CYCLES_VIEW3D_PT_simplify_greasepencil(CyclesButtonsPanel, Panel, GreasePencilSimplifyPanel):
|
|
|
|
|
bl_label = "Grease Pencil"
|
|
|
|
|
bl_parent_id = "CYCLES_RENDER_PT_simplify"
|
|
|
|
|
COMPAT_ENGINES = {'CYCLES'}
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2019-08-27 15:47:30 +02:00
|
|
|
|
2020-10-02 10:15:51 +10:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
def draw_device(self, context):
|
2011-08-28 13:55:59 +00:00
|
|
|
scene = context.scene
|
|
|
|
|
layout = self.layout
|
2018-05-30 17:47:48 +02:00
|
|
|
layout.use_property_split = True
|
2018-10-16 17:11:37 +02:00
|
|
|
layout.use_property_decorate = False
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2017-10-16 17:15:03 -02:00
|
|
|
if context.engine == 'CYCLES':
|
2012-12-13 08:45:55 +00:00
|
|
|
from . import engine
|
2011-08-28 13:55:59 +00:00
|
|
|
cscene = scene.cycles
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2018-05-30 17:47:48 +02:00
|
|
|
col = layout.column()
|
|
|
|
|
col.prop(cscene, "feature_set")
|
2011-09-01 19:43:57 +00:00
|
|
|
|
2018-11-06 19:52:19 +01:00
|
|
|
col = layout.column()
|
|
|
|
|
col.active = show_device_active(context)
|
|
|
|
|
col.prop(cscene, "device")
|
|
|
|
|
|
|
|
|
|
from . import engine
|
2022-11-10 11:17:16 +11:00
|
|
|
if engine.with_osl() and (
|
2024-01-10 19:52:06 +01:00
|
|
|
use_cpu(context) or (
|
|
|
|
|
use_optix(context) and (
|
|
|
|
|
engine.osl_version()[1] >= 13 or engine.osl_version()[0] > 1))):
|
|
|
|
|
osl_col = layout.column()
|
|
|
|
|
osl_col.prop(cscene, "shading_system")
|
2018-11-06 19:52:19 +01:00
|
|
|
|
2012-01-17 18:01:16 +00:00
|
|
|
|
2011-08-29 16:54:13 +00:00
|
|
|
def draw_pause(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
scene = context.scene
|
|
|
|
|
|
2017-10-16 17:15:03 -02:00
|
|
|
if context.engine == "CYCLES":
|
2011-08-29 16:54:13 +00:00
|
|
|
view = context.space_data
|
|
|
|
|
|
2018-05-31 23:55:10 +02:00
|
|
|
if view.shading.type == 'RENDERED':
|
|
|
|
|
cscene = scene.cycles
|
2019-10-23 11:16:47 +02:00
|
|
|
layout.prop(cscene, "preview_pause", icon='PLAY' if cscene.preview_pause else 'PAUSE', text="")
|
2017-05-01 14:55:59 +02:00
|
|
|
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
def get_panels():
|
2016-07-05 22:26:15 +02:00
|
|
|
exclude_panels = {
|
|
|
|
|
'DATA_PT_camera_dof',
|
|
|
|
|
'DATA_PT_falloff_curve',
|
2018-06-27 14:41:53 +02:00
|
|
|
'DATA_PT_light',
|
2016-07-05 22:26:15 +02:00
|
|
|
'DATA_PT_preview',
|
|
|
|
|
'DATA_PT_spot',
|
|
|
|
|
'MATERIAL_PT_context_material',
|
|
|
|
|
'MATERIAL_PT_preview',
|
2019-03-17 17:52:05 +01:00
|
|
|
'NODE_DATA_PT_light',
|
|
|
|
|
'NODE_DATA_PT_spot',
|
2019-05-20 13:42:16 +02:00
|
|
|
'OBJECT_PT_visibility',
|
2018-04-24 15:20:17 +02:00
|
|
|
'VIEWLAYER_PT_filter',
|
2017-11-22 10:52:39 -02:00
|
|
|
'VIEWLAYER_PT_layer_passes',
|
2016-07-05 22:26:15 +02:00
|
|
|
'RENDER_PT_post_processing',
|
2018-11-03 05:12:45 +01:00
|
|
|
'RENDER_PT_simplify',
|
2018-05-30 17:47:48 +02:00
|
|
|
}
|
2016-07-05 22:26:15 +02:00
|
|
|
|
|
|
|
|
panels = []
|
2016-07-06 21:43:55 +02:00
|
|
|
for panel in bpy.types.Panel.__subclasses__():
|
|
|
|
|
if hasattr(panel, 'COMPAT_ENGINES') and 'BLENDER_RENDER' in panel.COMPAT_ENGINES:
|
|
|
|
|
if panel.__name__ not in exclude_panels:
|
|
|
|
|
panels.append(panel)
|
2016-07-05 22:26:15 +02:00
|
|
|
|
|
|
|
|
return panels
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2017-03-20 12:16:51 +11:00
|
|
|
|
|
|
|
|
classes = (
|
2018-10-23 14:52:01 +02:00
|
|
|
CYCLES_PT_sampling_presets,
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
CYCLES_PT_viewport_sampling_presets,
|
2018-10-23 14:52:01 +02:00
|
|
|
CYCLES_PT_integrator_presets,
|
2022-07-13 15:23:50 +02:00
|
|
|
CYCLES_PT_performance_presets,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_RENDER_PT_sampling,
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
CYCLES_RENDER_PT_sampling_viewport,
|
|
|
|
|
CYCLES_RENDER_PT_sampling_viewport_denoise,
|
|
|
|
|
CYCLES_RENDER_PT_sampling_render,
|
|
|
|
|
CYCLES_RENDER_PT_sampling_render_denoise,
|
2022-09-21 17:58:34 +02:00
|
|
|
CYCLES_RENDER_PT_sampling_path_guiding,
|
|
|
|
|
CYCLES_RENDER_PT_sampling_path_guiding_debug,
|
2022-12-02 19:04:00 +01:00
|
|
|
CYCLES_RENDER_PT_sampling_lights,
|
2018-10-16 17:11:37 +02:00
|
|
|
CYCLES_RENDER_PT_sampling_advanced,
|
2025-01-15 07:41:16 +01:00
|
|
|
CYCLES_RENDER_PT_sampling_advanced_sample_subset,
|
2018-11-06 11:03:40 +01:00
|
|
|
CYCLES_RENDER_PT_light_paths,
|
|
|
|
|
CYCLES_RENDER_PT_light_paths_max_bounces,
|
2018-11-06 19:52:19 +01:00
|
|
|
CYCLES_RENDER_PT_light_paths_clamping,
|
2018-11-06 11:03:40 +01:00
|
|
|
CYCLES_RENDER_PT_light_paths_caustics,
|
2021-04-04 15:01:00 +02:00
|
|
|
CYCLES_RENDER_PT_light_paths_fast_gi,
|
2018-11-06 19:52:19 +01:00
|
|
|
CYCLES_RENDER_PT_volumes,
|
|
|
|
|
CYCLES_RENDER_PT_subdivision,
|
2022-04-06 16:19:44 -05:00
|
|
|
CYCLES_RENDER_PT_curves,
|
|
|
|
|
CYCLES_RENDER_PT_curves_viewport_display,
|
2018-11-06 11:03:40 +01:00
|
|
|
CYCLES_RENDER_PT_simplify,
|
|
|
|
|
CYCLES_RENDER_PT_simplify_viewport,
|
|
|
|
|
CYCLES_RENDER_PT_simplify_render,
|
|
|
|
|
CYCLES_RENDER_PT_simplify_culling,
|
2019-09-12 16:12:19 +02:00
|
|
|
CYCLES_VIEW3D_PT_simplify_greasepencil,
|
2019-08-27 15:47:30 +02:00
|
|
|
CYCLES_VIEW3D_PT_shading_lighting,
|
2019-09-05 12:47:20 +02:00
|
|
|
CYCLES_VIEW3D_PT_shading_render_pass,
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
CYCLES_VIEW3D_PT_shading_debug,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_RENDER_PT_motion_blur,
|
2018-06-04 12:20:40 +02:00
|
|
|
CYCLES_RENDER_PT_motion_blur_curve,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_RENDER_PT_film,
|
2018-06-04 12:20:40 +02:00
|
|
|
CYCLES_RENDER_PT_film_pixel_filter,
|
2018-11-06 19:52:19 +01:00
|
|
|
CYCLES_RENDER_PT_film_transparency,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_RENDER_PT_performance,
|
2024-05-14 15:49:20 +02:00
|
|
|
CYCLES_RENDER_PT_performance_compositor,
|
2024-12-28 01:44:49 +01:00
|
|
|
CYCLES_RENDER_PT_performance_compositor_denoise_settings,
|
2018-06-04 12:20:40 +02:00
|
|
|
CYCLES_RENDER_PT_performance_threads,
|
2021-09-23 18:24:34 +02:00
|
|
|
CYCLES_RENDER_PT_performance_memory,
|
2018-06-04 12:20:40 +02:00
|
|
|
CYCLES_RENDER_PT_performance_acceleration_structure,
|
|
|
|
|
CYCLES_RENDER_PT_performance_final_render,
|
|
|
|
|
CYCLES_RENDER_PT_performance_viewport,
|
2018-10-30 13:26:59 +01:00
|
|
|
CYCLES_RENDER_PT_passes,
|
|
|
|
|
CYCLES_RENDER_PT_passes_data,
|
|
|
|
|
CYCLES_RENDER_PT_passes_light,
|
|
|
|
|
CYCLES_RENDER_PT_passes_crypto,
|
2019-12-04 19:57:28 +01:00
|
|
|
CYCLES_RENDER_PT_passes_aov,
|
2022-04-02 00:11:11 +02:00
|
|
|
CYCLES_RENDER_PT_passes_lightgroups,
|
2019-05-02 14:37:33 +02:00
|
|
|
CYCLES_RENDER_PT_filter,
|
|
|
|
|
CYCLES_RENDER_PT_override,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_PT_post_processing,
|
|
|
|
|
CYCLES_CAMERA_PT_dof,
|
2018-06-10 21:27:43 +02:00
|
|
|
CYCLES_CAMERA_PT_dof_aperture,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_PT_context_material,
|
|
|
|
|
CYCLES_OBJECT_PT_motion_blur,
|
2021-06-28 13:54:18 +02:00
|
|
|
CYCLES_OBJECT_PT_shading_shadow_terminator,
|
2021-08-04 20:49:50 +02:00
|
|
|
CYCLES_OBJECT_PT_shading_gi_approximation,
|
Cycles: approximate shadow caustics using manifold next event estimation
This adds support for selective rendering of caustics in shadows of refractive
objects. Example uses are rendering of underwater caustics and eye caustics.
This is based on "Manifold Next Event Estimation", a method developed for
production rendering. The idea is to selectively enable shadow caustics on a
few objects in the scene where they have a big visual impact, without impacting
render performance for the rest of the scene.
The Shadow Caustic option must be manually enabled on light, caustic receiver
and caster objects. For such light paths, the Filter Glossy option will be
ignored and replaced by sharp caustics.
Currently this method has a various limitations:
* Only caustics in shadows of refractive objects work, which means no caustics
from reflection or caustics that outside shadows. Only up to 4 refractive
caustic bounces are supported.
* Caustic caster objects should have smooth normals.
* Not currently support for Metal GPU rendering.
In the future this method may be extended for more general caustics.
TECHNICAL DETAILS
This code adds manifold next event estimation through refractive surface(s) as a
new sampling technique for direct lighting, i.e. finding the point on the
refractive surface(s) along the path to a light sample, which satisfies Fermat's
principle for a given microfacet normal and the path's end points. This
technique involves walking on the "specular manifold" using a pseudo newton
solver. Such a manifold is defined by the specular constraint matrix from the
manifold exploration framework [2]. For each refractive interface, this
constraint is defined by enforcing that the generalized half-vector projection
onto the interface local tangent plane is null. The newton solver guides the
walk by linearizing the manifold locally before reprojecting the linear solution
onto the refractive surface. See paper [1] for more details about the technique
itself and [3] for the half-vector light transport formulation, from which it is
derived.
[1] Manifold Next Event Estimation
Johannes Hanika, Marc Droske, and Luca Fascione. 2015.
Comput. Graph. Forum 34, 4 (July 2015), 87–97.
https://jo.dreggn.org/home/2015_mnee.pdf
[2] Manifold exploration: a Markov Chain Monte Carlo technique for rendering
scenes with difficult specular transport Wenzel Jakob and Steve Marschner.
2012. ACM Trans. Graph. 31, 4, Article 58 (July 2012), 13 pages.
https://www.cs.cornell.edu/projects/manifolds-sg12/
[3] The Natural-Constraint Representation of the Path Space for Efficient
Light Transport Simulation. Anton S. Kaplanyan, Johannes Hanika, and Carsten
Dachsbacher. 2014. ACM Trans. Graph. 33, 4, Article 102 (July 2014), 13 pages.
https://cg.ivd.kit.edu/english/HSLT.php
The code for this samping technique was inserted at the light sampling stage
(direct lighting). If the walk is successful, it turns off path regularization
using a specialized flag in the path state (PATH_MNEE_SUCCESS). This flag tells
the integrator not to blur the brdf roughness further down the path (in a child
ray created from BSDF sampling). In addition, using a cascading mechanism of
flag values, we cull connections to caustic lights for this and children rays,
which should be resolved through MNEE.
This mechanism also cancels the MIS bsdf counter part at the casutic receiver
depth, in essence leaving MNEE as the only sampling technique from receivers
through refractive casters to caustic lights. This choice might not be optimal
when the light gets large wrt to the receiver, though this is usually not when
you want to use MNEE.
This connection culling strategy removes a fair amount of fireflies, at the cost
of introducing a slight bias. Because of the selective nature of the culling
mechanism, reflective caustics still benefit from the native path
regularization, which further removes fireflies on other surfaces (bouncing
light off casters).
Differential Revision: https://developer.blender.org/D13533
2022-04-01 15:44:24 +02:00
|
|
|
CYCLES_OBJECT_PT_shading_caustics,
|
2022-04-02 00:11:11 +02:00
|
|
|
CYCLES_OBJECT_PT_lightgroup,
|
2019-05-20 13:42:16 +02:00
|
|
|
CYCLES_OBJECT_PT_visibility,
|
|
|
|
|
CYCLES_OBJECT_PT_visibility_ray_visibility,
|
|
|
|
|
CYCLES_OBJECT_PT_visibility_culling,
|
2018-06-27 14:41:53 +02:00
|
|
|
CYCLES_LIGHT_PT_preview,
|
|
|
|
|
CYCLES_LIGHT_PT_light,
|
|
|
|
|
CYCLES_LIGHT_PT_nodes,
|
2021-04-01 05:35:56 +02:00
|
|
|
CYCLES_LIGHT_PT_beam_shape,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_WORLD_PT_preview,
|
|
|
|
|
CYCLES_WORLD_PT_surface,
|
|
|
|
|
CYCLES_WORLD_PT_volume,
|
|
|
|
|
CYCLES_WORLD_PT_mist,
|
|
|
|
|
CYCLES_WORLD_PT_ray_visibility,
|
|
|
|
|
CYCLES_WORLD_PT_settings,
|
2018-06-04 17:26:47 +02:00
|
|
|
CYCLES_WORLD_PT_settings_surface,
|
|
|
|
|
CYCLES_WORLD_PT_settings_volume,
|
2022-05-04 21:20:17 +02:00
|
|
|
CYCLES_WORLD_PT_settings_light_group,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_MATERIAL_PT_preview,
|
|
|
|
|
CYCLES_MATERIAL_PT_surface,
|
|
|
|
|
CYCLES_MATERIAL_PT_volume,
|
|
|
|
|
CYCLES_MATERIAL_PT_displacement,
|
|
|
|
|
CYCLES_MATERIAL_PT_settings,
|
2018-06-04 17:26:47 +02:00
|
|
|
CYCLES_MATERIAL_PT_settings_surface,
|
|
|
|
|
CYCLES_MATERIAL_PT_settings_volume,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_RENDER_PT_bake,
|
2019-02-18 14:47:51 +11:00
|
|
|
CYCLES_RENDER_PT_bake_influence,
|
|
|
|
|
CYCLES_RENDER_PT_bake_selected_to_active,
|
|
|
|
|
CYCLES_RENDER_PT_bake_output,
|
2022-01-17 18:00:35 +01:00
|
|
|
CYCLES_RENDER_PT_bake_output_margin,
|
2017-09-01 16:08:25 +10:00
|
|
|
CYCLES_RENDER_PT_debug,
|
2019-03-17 17:52:05 +01:00
|
|
|
node_panel(CYCLES_MATERIAL_PT_settings),
|
|
|
|
|
node_panel(CYCLES_MATERIAL_PT_settings_surface),
|
|
|
|
|
node_panel(CYCLES_MATERIAL_PT_settings_volume),
|
|
|
|
|
node_panel(CYCLES_WORLD_PT_ray_visibility),
|
|
|
|
|
node_panel(CYCLES_WORLD_PT_settings),
|
|
|
|
|
node_panel(CYCLES_WORLD_PT_settings_surface),
|
|
|
|
|
node_panel(CYCLES_WORLD_PT_settings_volume),
|
|
|
|
|
node_panel(CYCLES_LIGHT_PT_light),
|
2021-04-01 05:35:56 +02:00
|
|
|
node_panel(CYCLES_LIGHT_PT_beam_shape)
|
2017-03-20 12:16:51 +11:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
def register():
|
2017-03-20 12:16:51 +11:00
|
|
|
from bpy.utils import register_class
|
|
|
|
|
|
2018-05-24 18:09:45 +02:00
|
|
|
bpy.types.RENDER_PT_context.append(draw_device)
|
2011-08-29 16:54:13 +00:00
|
|
|
bpy.types.VIEW3D_HT_header.append(draw_pause)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
for panel in get_panels():
|
|
|
|
|
panel.COMPAT_ENGINES.add('CYCLES')
|
2011-11-15 02:58:01 +00:00
|
|
|
|
2017-03-20 12:16:51 +11:00
|
|
|
for cls in classes:
|
|
|
|
|
register_class(cls)
|
|
|
|
|
|
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
def unregister():
|
2017-03-20 12:16:51 +11:00
|
|
|
from bpy.utils import unregister_class
|
|
|
|
|
|
2018-05-24 18:09:45 +02:00
|
|
|
bpy.types.RENDER_PT_context.remove(draw_device)
|
2011-08-29 16:54:13 +00:00
|
|
|
bpy.types.VIEW3D_HT_header.remove(draw_pause)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-08-28 13:55:59 +00:00
|
|
|
for panel in get_panels():
|
2016-07-06 21:43:55 +02:00
|
|
|
if 'CYCLES' in panel.COMPAT_ENGINES:
|
|
|
|
|
panel.COMPAT_ENGINES.remove('CYCLES')
|
2017-03-20 12:16:51 +11:00
|
|
|
|
|
|
|
|
for cls in classes:
|
|
|
|
|
unregister_class(cls)
|