April 23, 2014, 00:32 (GMT) |
Cycles-Bake: divide the in/direct passes by the color passes Otherwise the in/direct passes are 'contamined' by the texture/color of the faces. |
April 23, 2014, 00:29 (GMT) |
Cycles-Bake: 1st round of code-review For the individual commits: https://github.com/dfelinto/blender-git/tree/bake-cycles-0.1 Documentation: http://wiki.blender.org/index.php/User:Dfelinto/CyclesBaking Open Issues: https://github.com/dfelinto/blender-git/issues?labels=bake-cycles&page=1&state=open Supported Features: ------------------ * Margin * User Interface (no more need to fiddle with Python scripts) * Selected to Active * Cage Extrusion * Custom Cage * File Formats (save as PNG, JPG, OpenEXR, Tiff, Targa and BMP) * Color Depth/Mode: RGB/RGBA - 8/16/32 * Normal swizzle (change the axis that gets mapped to RGB) * Normal space (save as tangent, world, object) 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 Implementation Notes: --------------------- Baking for Cycles was implemented in two fronts: In Blender we created a new operator that will try to bake using the current engine. So far only Cycles has this implemented, but other engines (even the Blender Internal) could go through this API/pipeline. The operator is responsible for the image handling, normal space transformation, populate the UVs, loop over faces, ... In Cycles we extended the baking functionality available for environment and displacement for the other render passes (not all of them since some of them doesn't make sense for baking). The API is simple. Blender send a populated array of BakePixels to the renderer, and gets back an array of floats with the result. BakePixel is tjhe following struct: struct BakePixel { int primitive_id; float u, v; float dudx, dudy; float dvdx, dvdy; }; intern/cycles/blender/addon/__init__.py intern/cycles/blender/addon/engine.py intern/cycles/blender/addon/properties.py intern/cycles/blender/addon/ui.py intern/cycles/blender/blender_python.cpp intern/cycles/blender/blender_session.cpp intern/cycles/blender/blender_session.h intern/cycles/kernel/kernel_accumulate.h intern/cycles/kernel/kernel_displace.h intern/cycles/kernel/kernel_path.h intern/cycles/kernel/kernel_types.h intern/cycles/render/CMakeLists.txt intern/cycles/render/bake.cpp intern/cycles/render/bake.h intern/cycles/render/film.cpp intern/cycles/render/integrator.cpp intern/cycles/render/integrator.h intern/cycles/render/scene.cpp intern/cycles/render/scene.h intern/cycles/render/session.cpp intern/cycles/render/session.h source/blender/blenkernel/BKE_mesh.h source/blender/blenkernel/intern/mesh.c source/blender/editors/object/CMakeLists.txt source/blender/editors/object/object_bake.c source/blender/editors/object/object_bake_new.c source/blender/editors/object/object_intern.h source/blender/editors/object/object_ops.c source/blender/makesdna/DNA_scene_types.h source/blender/makesrna/RNA_enum_types.h source/blender/makesrna/intern/rna_main_api.c source/blender/makesrna/intern/rna_render.c source/blender/makesrna/intern/rna_scene.c source/blender/render/CMakeLists.txt source/blender/render/extern/include/RE_bake.h source/blender/render/extern/include/RE_engine.h source/blender/render/intern/source/bake.c source/blender/render/intern/source/bake_new.c source/blender/render/intern/source/external_engine.c source/blender/windowmanager/WM_api.h |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: Selected to Active - using global coordinates The user no longer needs to apply the transformation before baking |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: remove unused code |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: Fix for "missing" rays generating spurious result in tangent maps missing rays are rays cast from the low poly mesh (or the cage) that dont hit the high poly object |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: support non-alpha saving of png, openexr, ... |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: Support for float formats (openexr, png, ...) Next: Support for saving with no alpha |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: Saving different file formats * Todo: * I still can't have PNG to save without alpha * I think it's always saving as 8 bit Apart from that UI is working. |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: Fix for padding (margin) not working in tangent maps Note: you cannot save png without alpha for now, Im working on that in a separate branch |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: accept relative path in filepath |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: another compile fix attempt |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: Fix warnings and compile errors (hopefully) |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: ui fix - cage works for non-normal passes too |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: User Interface |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: remove invoke |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: Custom Cage support New Python argument: "custom_cage", that should be a name of the object to use as custom cage |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: silenting warning: set default string value as NULL - no more crashes |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: Fix Linux build error |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: Tangent Normal space mode TANGENT gives no crash and bluish results, so it seems correct. There are some differences from BI and Cycles, I'll have to test further to see which one is correct. Apart from that there is a chance the swizzle is wrong. In other words, the directions may be swapped, or inverted. It will be an easy fix though. I just need to put time on testing this against other applications and simple test files. * Refactored calculateTriTessFaces to store tangent. * Re-set neutral color for WORLD/OBJECT maps to be 0,0,0 from Cycles |
April 23, 2014, 00:18 (GMT) |
Cycles-Bake: normal swizzle, and OBJECT and WORLD normal spaces The user can now decide between the normal_space (OBJECT, WORLD) The user can now decide on the swizzle (+X,+Y,+Z): * normal_r, normal_g, normal_b + barebones code for TANGENT normal space Though this is not working, thus it's disabled in operator enum. |
|
|
|


Master Commits
MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021