Cycles does need recalculate MIP after modifying a material #63588

Closed
opened 2019-04-14 10:05:17 +02:00 by Robert Brian · 21 comments

System Information
Operating system: Windows 10, Ubuntu Linux 18.04
Graphics card: Geforce GTX 1060, Geforce RTX 2060

Blender Version
Broken: Blender 2.79.7 - April 13., 2.80 Beta - April 14.

Cycles GPU does need recalculate the Multiple Importance Map with HDRi after modifying a material. For some reason Octane and mostly other render engines doesn't need that. When it's a bug or not that makes it unreasonably difficult the shading process.

System Information Operating system: Windows 10, Ubuntu Linux 18.04 Graphics card: Geforce GTX 1060, Geforce RTX 2060 Blender Version Broken: Blender 2.79.7 - April 13., 2.80 Beta - April 14. Cycles GPU does need recalculate the Multiple Importance Map with HDRi after modifying a material. For some reason Octane and mostly other render engines doesn't need that. When it's a bug or not that makes it unreasonably difficult the shading process.
Author

Added subscriber: @obertbrian

Added subscriber: @obertbrian

Added subscriber: @brecht

Added subscriber: @brecht

Please mention Blender version, attach a .blend and provide exact steps to redo.

Also check if any add-ons you have enabled affect on this.

Please mention Blender version, attach a .blend and provide exact steps to redo. Also check if any add-ons you have enabled affect on this.
Author

If I change any of the values for the material, then Cycles always recalculates the Importance Map.

There is no enabled addons.

Note: the HDRI included the sample is part of a free pack from Maxime Roz.

cycles_gpu_mip.blend

If I change any of the values for the material, then Cycles always recalculates the Importance Map. There is no enabled addons. Note: the HDRI included the sample is part of a free pack from Maxime Roz. [cycles_gpu_mip.blend](https://archive.blender.org/developer/F6944856/cycles_gpu_mip.blend)

Added subscribers: @Jeroen-Bakker, @ZedDB

Added subscribers: @Jeroen-Bakker, @ZedDB

I can't render with a GPU so I can't reproduce this. @brecht, @Jeroen-Bakker are you able to reproduce?

I can't render with a GPU so I can't reproduce this. @brecht, @Jeroen-Bakker are you able to reproduce?

Added subscriber: @esminis

Added subscriber: @esminis

In #63588#660571, @obertbrian wrote:
If I change any of the values for the material, then Cycles always recalculates the Importance Map.

There is no enabled addons.

Note: the HDRI included the sample is part of a free pack from Maxime Roz.

cycles_gpu_mip.blend

I think you should see message "Updating lights" or "Updating Lights | Importance map".

If I understand well it should happen even without GPU rendering (it is independent of rendering device), essentially any time you modify environment HDRI image, material, ... lights are updated and during lights update importance map is regenerated. Need to explore code a bit more but I think only solution would be cache importance map in some cases (not sure it is worth).

In code this is happening in:

void LightManager::device_update_background(Device *device,
                                            DeviceScene *dscene,
                                            Scene *scene,
                                            Progress &progress)
{
  // ...
  progress.set_status("Updating Lights", "Importance map");
  // ...
}
> In #63588#660571, @obertbrian wrote: > If I change any of the values for the material, then Cycles always recalculates the Importance Map. > > There is no enabled addons. > > Note: the HDRI included the sample is part of a free pack from Maxime Roz. > > [cycles_gpu_mip.blend](https://archive.blender.org/developer/F6944856/cycles_gpu_mip.blend) I think you should see message "Updating lights" or "Updating Lights | Importance map". If I understand well it should happen even without GPU rendering (it is independent of rendering device), essentially any time you modify environment HDRI image, material, ... lights are updated and during lights update importance map is regenerated. Need to explore code a bit more but I think only solution would be cache importance map in some cases (not sure it is worth). In code this is happening in: ``` void LightManager::device_update_background(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress) { // ... progress.set_status("Updating Lights", "Importance map"); // ... } ```

Just an update - yes importance map recalculations is not needed every time material, light, ... is changed, it is only needed when background or it`s resolution is changed in any way.

If importance map is regenerated only when it is really needed whole experience is much more fluid in such cases, as regeneration takes quite some time.

Solution would be to somehow track when background is changed then mark multiple importance map for regeneration (for now not sure how easy it is to track if background was changed).

Quick workaround for users would be to decrease environment map resolution while editing, as smaller resolution of environment map makes smaller resolution of importance map.

Just an update - yes importance map recalculations is not needed every time material, light, ... is changed, it is only needed when background or it`s resolution is changed in any way. If importance map is regenerated only when it is really needed whole experience is much more fluid in such cases, as regeneration takes quite some time. Solution would be to somehow track when background is changed then mark multiple importance map for regeneration (for now not sure how easy it is to track if background was changed). Quick workaround for users would be to decrease environment map resolution while editing, as smaller resolution of environment map makes smaller resolution of importance map.
Author

In #63588#667058, @esminis wrote:
Just an update - yes importance map recalculations is not needed every time material, light, ... is changed, it is only needed when background or it`s resolution is changed in any way.

If importance map is regenerated only when it is really needed whole experience is much more fluid in such cases, as regeneration takes quite some time.

Solution would be to somehow track when background is changed then mark multiple importance map for regeneration (for now not sure how easy it is to track if background was changed).

Quick workaround for users would be to decrease environment map resolution while editing, as smaller resolution of environment map makes smaller resolution of importance map.

Thank you for your time! As you said the whole experience would be very fluid (especially in the render preview) if there was a way not to be updated at every time when the background isn't changed. I have an i7-4790 cpu and even with smaller resolution of importance map need noticeable time to calculate. And the drawback of the small resolution is noise.

Even an experimental button would be fantastic to turn off the constant reloading.

> In #63588#667058, @esminis wrote: > Just an update - yes importance map recalculations is not needed every time material, light, ... is changed, it is only needed when background or it`s resolution is changed in any way. > > If importance map is regenerated only when it is really needed whole experience is much more fluid in such cases, as regeneration takes quite some time. > > Solution would be to somehow track when background is changed then mark multiple importance map for regeneration (for now not sure how easy it is to track if background was changed). > > Quick workaround for users would be to decrease environment map resolution while editing, as smaller resolution of environment map makes smaller resolution of importance map. Thank you for your time! As you said the whole experience would be very fluid (especially in the render preview) if there was a way not to be updated at every time when the background isn't changed. I have an i7-4790 cpu and even with smaller resolution of importance map need noticeable time to calculate. And the drawback of the small resolution is noise. Even an experimental button would be fantastic to turn off the constant reloading.
Brecht Van Lommel was assigned by Sebastian Parborg 2019-04-30 10:13:17 +02:00

I have created patch with fix, but need someone to review it in case I have missed something (as I am not so very familiar with Blender code base), parent commit from master branch 22cc69ace8d441750856816453d5a1c16e53f2bf:

#63588-Cycles-does-need-recalculate-MIP-after-modify.patch

I have created patch with fix, but need someone to review it in case I have missed something (as I am not so very familiar with Blender code base), parent commit from master branch 22cc69ace8d441750856816453d5a1c16e53f2bf: [#63588-Cycles-does-need-recalculate-MIP-after-modify.patch](https://archive.blender.org/developer/F6996132/T63588-Cycles-does-need-recalculate-MIP-after-modify.patch)
Author

In #63588#668946, @esminis wrote:
I have created patch with fix, but need someone to review it in case I have missed something (as I am not so very familiar with Blender code base), parent commit from master branch 22cc69ace8d441750856816453d5a1c16e53f2bf:

#63588-Cycles-does-need-recalculate-MIP-after-modify.patch

Thank you very much for your work!

I hope it will be included in both Blender version soon.

> In #63588#668946, @esminis wrote: > I have created patch with fix, but need someone to review it in case I have missed something (as I am not so very familiar with Blender code base), parent commit from master branch 22cc69ace8d441750856816453d5a1c16e53f2bf: > > [#63588-Cycles-does-need-recalculate-MIP-after-modify.patch](https://archive.blender.org/developer/F6996132/T63588-Cycles-does-need-recalculate-MIP-after-modify.patch) Thank you very much for your work! I hope it will be included in both Blender version soon.
Brecht Van Lommel was unassigned by Dalai Felinto 2019-12-23 16:34:39 +01:00
Member

Added subscriber: @BrendonMurphy

Added subscriber: @BrendonMurphy
Member

removing addons, cycles has own tracker

removing addons, cycles has own tracker

This issue was referenced by blender/cycles@6d60c36170

This issue was referenced by blender/cycles@6d60c36170a38652a8bb189118b0305fc911bbc8

This issue was referenced by ffb3365fb2

This issue was referenced by ffb3365fb2063966ead370d8668a259a5525175f

This issue was referenced by blender/cycles@8749951498

This issue was referenced by blender/cycles@874995149851ebf54e43d1d5bbababb5a39da016

This issue was referenced by 33ce0cb5a1

This issue was referenced by 33ce0cb5a1edea4b5aaa7d37f6ad74b3b35b95f8

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2020-05-14 17:57:00 +02:00

This issue was referenced by blender/cycles@0b6dbc0a90

This issue was referenced by blender/cycles@0b6dbc0a904f2526ce1274c70b367a337134f7fa

This issue was referenced by 52cc412e0f

This issue was referenced by 52cc412e0f56f249d932e1025ea191939c1a6edb
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#63588
No description provided.