2008-04-16 22:40:48 +00:00
|
|
|
# ***** BEGIN GPL LICENSE BLOCK *****
|
2006-11-17 02:27:12 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
2008-04-16 22:40:48 +00:00
|
|
|
# of the License, or (at your option) any later version.
|
2006-11-17 02:27:12 +00:00
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2006-11-17 02:27:12 +00:00
|
|
|
#
|
|
|
|
# The Original Code is Copyright (C) 2006, Blender Foundation
|
|
|
|
# All rights reserved.
|
2008-04-16 22:40:48 +00:00
|
|
|
# ***** END GPL LICENSE BLOCK *****
|
2006-11-17 02:27:12 +00:00
|
|
|
|
|
|
|
|
2018-06-08 08:07:48 +02:00
|
|
|
set(INC
|
2010-09-07 01:13:10 +00:00
|
|
|
extern/include
|
2011-07-17 09:11:13 +00:00
|
|
|
intern/include
|
|
|
|
../blenkernel
|
2010-09-07 01:13:10 +00:00
|
|
|
../blenlib
|
2015-08-16 17:32:01 +10:00
|
|
|
../blentranslation
|
2011-07-17 09:11:13 +00:00
|
|
|
../imbuf
|
Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:
- More granular dependency relation nature, which solves issues with fake cycles
in the dependencies.
- Move towards all-animatable, by better integration of drivers into the system.
- Lay down some basis for upcoming copy-on-write, overrides and so on.
The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.
It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.
There are number of assorted documents related on the design of the new system:
* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph
There are also some user-related information online:
* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/
Kudos to everyone who was involved into the project:
- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 15:05:57 +05:00
|
|
|
../depsgraph
|
2010-09-07 01:13:10 +00:00
|
|
|
../makesdna
|
2009-09-18 22:25:49 +00:00
|
|
|
../makesrna
|
Render API/Cycles: Identify Render Passes by their name instead of a type flag
Previously, every RenderPass would have a bitfield that specified its type. That limits the number of passes to 32, which was reached a while ago.
However, most of the code already supported arbitrary RenderPasses since they were also used to store Multilayer EXR images.
Therefore, this commit completely removes the passflag from RenderPass and changes all code to use the unique pass name for identification.
Since Blender Internal relies on hardcoded passes and to preserve compatibility, 32 pass names are reserved for the old hardcoded passes.
To support these arbitrary passes, the Render Result compositor node now adds dynamic sockets. For compatibility, the old hardcoded sockets are always stored and just hidden when the corresponding pass isn't available.
To use these changes, the Render Engine API now includes a function that allows render engines to add arbitrary passes to the render result. To be able to add options for these passes, addons can now add their own properties to SceneRenderLayers.
To keep the compositor input node updated, render engine plugins have to implement a callback that registers all the passes that will be generated.
From a user perspective, nothing should change with this commit.
Differential Revision: https://developer.blender.org/D2443
Differential Revision: https://developer.blender.org/D2444
2017-05-03 00:21:18 +02:00
|
|
|
../nodes
|
2014-10-31 20:29:51 +01:00
|
|
|
../physics
|
2017-02-07 11:20:15 +01:00
|
|
|
../draw
|
2018-07-17 21:11:23 +02:00
|
|
|
../gpu
|
2017-03-01 12:45:51 +01:00
|
|
|
../../../intern/atomic
|
2010-09-07 01:13:10 +00:00
|
|
|
../../../intern/guardedalloc
|
2011-07-17 09:11:13 +00:00
|
|
|
../../../intern/mikktspace
|
|
|
|
../../../intern/smoke/extern
|
2006-11-17 02:27:12 +00:00
|
|
|
)
|
|
|
|
|
2011-05-31 01:15:44 +00:00
|
|
|
set(INC_SYS
|
2018-06-11 13:00:21 +02:00
|
|
|
${GLEW_INCLUDE_PATH}
|
2011-05-31 01:15:44 +00:00
|
|
|
)
|
|
|
|
|
2010-12-08 08:43:06 +00:00
|
|
|
set(SRC
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
intern/source/bake_api.c
|
2011-10-22 16:24:28 +00:00
|
|
|
intern/source/external_engine.c
|
2010-10-23 04:05:55 +00:00
|
|
|
intern/source/imagetexture.c
|
|
|
|
intern/source/initrender.c
|
2012-12-18 17:46:26 +00:00
|
|
|
intern/source/multires_bake.c
|
2010-10-23 04:05:55 +00:00
|
|
|
intern/source/pipeline.c
|
|
|
|
intern/source/pointdensity.c
|
2012-01-05 17:50:09 +00:00
|
|
|
intern/source/render_result.c
|
2011-02-05 13:10:20 +00:00
|
|
|
intern/source/render_texture.c
|
2010-10-23 04:05:55 +00:00
|
|
|
intern/source/zbuf.c
|
2010-11-29 04:35:56 +00:00
|
|
|
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
extern/include/RE_bake.h
|
2019-01-25 08:30:33 +11:00
|
|
|
extern/include/RE_engine.h
|
2012-12-18 17:46:26 +00:00
|
|
|
extern/include/RE_multires_bake.h
|
2010-11-29 04:35:56 +00:00
|
|
|
extern/include/RE_pipeline.h
|
|
|
|
extern/include/RE_render_ext.h
|
|
|
|
extern/include/RE_shader_ext.h
|
|
|
|
intern/include/initrender.h
|
2012-01-05 17:50:09 +00:00
|
|
|
intern/include/render_result.h
|
2019-01-25 08:30:33 +11:00
|
|
|
intern/include/render_types.h
|
2010-11-29 04:35:56 +00:00
|
|
|
intern/include/renderpipeline.h
|
|
|
|
intern/include/texture.h
|
|
|
|
intern/include/zbuf.h
|
2010-10-23 04:05:55 +00:00
|
|
|
)
|
|
|
|
|
2019-04-14 15:18:44 +02:00
|
|
|
set(LIB
|
|
|
|
)
|
|
|
|
|
2011-10-22 17:01:54 +00:00
|
|
|
if(WITH_PYTHON)
|
|
|
|
add_definitions(-DWITH_PYTHON)
|
|
|
|
list(APPEND INC
|
|
|
|
../python
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2010-12-08 08:43:06 +00:00
|
|
|
if(WITH_IMAGE_OPENEXR)
|
2019-04-16 06:18:52 +02:00
|
|
|
list(APPEND LIB
|
|
|
|
bf_imbuf_openexr
|
|
|
|
)
|
2010-12-08 08:43:06 +00:00
|
|
|
add_definitions(-DWITH_OPENEXR)
|
|
|
|
endif()
|
2006-11-17 02:27:12 +00:00
|
|
|
|
2011-07-13 18:40:21 +00:00
|
|
|
if(WITH_MOD_SMOKE)
|
|
|
|
add_definitions(-DWITH_SMOKE)
|
|
|
|
endif()
|
|
|
|
|
2012-12-20 07:57:26 +00:00
|
|
|
if(WITH_FREESTYLE)
|
|
|
|
list(APPEND INC
|
|
|
|
../freestyle
|
|
|
|
)
|
2019-04-16 06:18:52 +02:00
|
|
|
list(APPEND LIB
|
|
|
|
bf_freestyle
|
|
|
|
)
|
2012-12-20 07:57:26 +00:00
|
|
|
add_definitions(-DWITH_FREESTYLE)
|
|
|
|
endif()
|
|
|
|
|
2013-03-10 16:55:01 +00:00
|
|
|
if(WITH_INTERNATIONAL)
|
|
|
|
add_definitions(-DWITH_INTERNATIONAL)
|
|
|
|
endif()
|
|
|
|
|
2010-12-08 08:43:06 +00:00
|
|
|
if(APPLE)
|
2013-03-24 12:13:13 +00:00
|
|
|
# SSE math is enabled by default on x86_64
|
2013-02-26 21:58:06 +00:00
|
|
|
if(CMAKE_OSX_ARCHITECTURES MATCHES "i386")
|
2010-12-08 08:43:06 +00:00
|
|
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mfpmath=sse")
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpmath=sse")
|
|
|
|
endif()
|
|
|
|
endif()
|
2009-11-09 17:52:13 +00:00
|
|
|
|
2019-04-14 15:18:44 +02:00
|
|
|
blender_add_lib_nolist(bf_render "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|