Blender Git Loki

Git Commits -> Revision b5f58c1

Revision b5f58c1 by Sergey Sharybin (master)
April 6, 2015, 14:22 (GMT)
Cycles: Experiment with making previews more interactive

There were two major problems with the interactivity of material previews:

- Beckmann tables were re-generated on every material tweak.
This is because preview scene is not set to be persistent, so re-triggering
the render leads to the full scene re-sync.

- Images could take rather noticeable time to load with OIIO from the disk
on every tweak.

This patch addressed this two issues in the following way:

- Beckmann tables are now static on CPU memory.

They're couple of hundred kilobytes only, so wouldn't expect this to be
an issue. And they're needed for almost every render anyway.

This actually also makes blackbody table to be static, but it's even smaller
than beckmann table.

Not totally happy with this approach, but others seems to complicate things
quite a bit with all this render engine life time and so..

- For preview rendering all images are considered to be built-in. This means
instead of OIIO which re-loads images on every re-render they're coming
from ImBuf cache which is fully manageable from blender side and unused
images gets freed later.

This would make it impossible to have mipmapping with OSL for now, but we'll
be working on that later anyway and don't think mipmaps are really so crucial
for the material preview.

This seems to be a better alternative to making preview scene persistent,
because of much optimal memory control from blender side.

Reviewers: brecht, juicyfruit, campbellbarton, dingto

Subscribers: eyecandy, venomgfx

Differential Revision: https://developer.blender.org/D1132

Commit Details:

Full Hash: b5f58c1ad9b19f3fe7ee06a4ab5ec5498dfc0652
Parent Commit: 36f352a
Lines Changed: +70, -18

4 Modified Paths:

/intern/cycles/blender/blender_shader.cpp (+53, -13) (Diff)
/intern/cycles/blender/blender_sync.cpp (+2, -1) (Diff)
/intern/cycles/render/shader.cpp (+11, -2) (Diff)
/intern/cycles/render/shader.h (+4, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021