From eec3eaba084725a978f4aefb773a16ae9c0420db Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Thu, 2 Jan 2014 19:05:07 -0200 Subject: Cycles Bake Expand Cycles to use the new baking API in Blender. It works on the selected object, and the panel can be accessed in the Render panel (similar to where it is for the Blender Internal). It bakes for the active texture of each material of the object. The active texture is currently defined as the active Image Texture node present in the material nodetree. If you don't want the baking to override an existent material, make sure the active Image Texture node is not connected to the nodetree. The active texture is also the texture shown in the viewport in the rendered mode. Remember to save your images after the baking is complete. Note: Bake currently only works in the CPU Note: This is not supported by Cycles standalone because a lot of the work is done in Blender as part of the operator only, not the engine (Cycles). Documentation: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Bake Supported Passes: ----------------- Data Passes * Normal * UV * Diffuse/Glossy/Transmission/Subsurface/Emit Color Light Passes * AO * Combined * Shadow * Diffuse/Glossy/Transmission/Subsurface/Emit Direct/Indirect * Environment Review: D421 Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge Original design by Brecht van Lommel. The entire commit history can be found on the branch: bake-cycles --- intern/cycles/render/light.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'intern/cycles/render/light.cpp') diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp index dd5694582e6..a5e3fabb19d 100644 --- a/intern/cycles/render/light.cpp +++ b/intern/cycles/render/light.cpp @@ -29,7 +29,7 @@ CCL_NAMESPACE_BEGIN -static void shade_background_pixels(Device *device, DeviceScene *dscene, int res, vector& pixels) +static void shade_background_pixels(Device *device, DeviceScene *dscene, int res, vector& pixels, Progress& progress) { /* create input */ int width = res; @@ -66,6 +66,7 @@ static void shade_background_pixels(Device *device, DeviceScene *dscene, int res main_task.shader_eval_type = SHADER_EVAL_BACKGROUND; main_task.shader_x = 0; main_task.shader_w = width*height; + main_task.get_cancel = function_bind(&Progress::get_cancel, &progress); /* disabled splitting for now, there's an issue with multi-GPU mem_copy_from */ list split_tasks; @@ -396,7 +397,7 @@ void LightManager::device_update_background(Device *device, DeviceScene *dscene, assert(res > 0); vector pixels; - shade_background_pixels(device, dscene, res, pixels); + shade_background_pixels(device, dscene, res, pixels, progress); if(progress.get_cancel()) return; -- cgit v1.2.3