Page MenuHome

Cycles does need recalculate MIP after modifying a material
Open, Confirmed, MediumPublic

Description

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.

Details

Type
Bug

Event Timeline

Brecht Van Lommel (brecht) triaged this task as Needs Information from User priority.

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.

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.

Philipp Oeser (lichtwerk) raised the priority of this task from Needs Information from User to Needs Triage by Developer.Apr 24 2019, 11:17 AM

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.

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.

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.

Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.

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:

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:

Thank you very much for your work!

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