Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-04-01Cleanup: Use const for bounding boxes where possibleHans Goudey
2022-03-28Cleanup: Move scene.c to C++Hans Goudey
This is meant to allow using C++ data structures in this file as a performance improvement. Particularly `Vector` instead of `ListBase` for `duplilist`. This change builds and passes tests on all platforms on the buildbot.
2022-03-28Cleanup: use "num" as a suffix in: source/blender/renderCampbell Barton
See T85728
2022-03-25Cleanup: use array syntax for sizeof, zero before float suffixCampbell Barton
2022-03-24Cleanup: use "filepath" instead of "filename" for full pathsCampbell Barton
Reserve "filename" when only the name component is used.
2022-03-23Color Management: support different settings for render and compositing outputBrecht Van Lommel
The Output Properties > Output panel now has a Color Management subpanel to override scene settings. When set to Override instead of Follow Scene, there are settings to: * For OpenEXR, choose a (linear) colorspace for RGBA passes * For other file formats, use different display/view/look/exposure/gamma These settings affect animation render output, image save of renders and the compositor file output node. Additionally, the image save operator and compositor file output nodes also support overriding color management. Includes some layout changes to the relevant panels to accomdate the new settings and to improve consistency. Ideally subpanels would be used to better organize these settings, however nodes and operators don't currently support creating subpanels. Differential Revision: https://developer.blender.org/D14402
2022-03-22Fix T96524: Regression: The Material Preview doesn't showSergey Sharybin
The preview does not work well with deferred render result pixels allocation: it breaks the refresh and requires to toggle current panels. Since there is no tiled rendering for previews we don't save any memory by deferring pixels allocations, so do it for the render result during the render result creation. Differential Revision: https://developer.blender.org/D14414
2022-03-22Cleanup: refactor passing of color management settings for image saveBrecht Van Lommel
Make a copy of ImageFormatData that contains the effective color management settings, and pass that along to the various functions. This will make it possible to add more complex logic later. For compositing nodes, passing along view and display settings through many functions made it harder to add additional settings, so just get those from the scene now. Differential Revision: https://developer.blender.org/D14401
2022-03-22Cleanup: add proper IMB_openexr.h instead of including file from intern/Brecht Van Lommel
2022-03-22Fix build error when WITH_OPENEXR=OFF, after recent refactorBrecht Van Lommel
2022-03-22Cleanup: Small changes to multires bake normals accessHans Goudey
- Order return arguments last, add `r_` prefix - Use explicit size on array argument - Avoid double negative in if statement
2022-03-22Fix T96401: Broken multires baked normals resultHans Goudey
A 7 year old commit, 2ec00ea0c1be1ace7c, used incorrect indexing for the optional array of precomputed poly normals. Apparently that code path was never used, or this issue would have been discovered earlier. Recent changes calculate normals on a temporary mesh and use those for the "low-res" layer, meaning the precomputed path was always taken.
2022-03-21Cleanup: move render image and multilayer EXR write code to image_save.ccBrecht Van Lommel
These share a lot of logic with regular image saving and should be unified more in the future.
2022-03-21Cleanup: move OpenEXR channel name construction to OpenEXR codeBrecht Van Lommel
2022-03-21Cleanup: add image_format.cc for functions related to ImageFormatDataBrecht Van Lommel
Also fixes missing code to read/write/free/copy color management settings in various places. This can't be set through the UI currently, but still should be handled consistently.
2022-03-18EEVEE: Add new experimental "EEVEE Next" optionClément Foucault
This is supposed to hold the latest improvement from the EEVEE rewrite branch. Note that a restart is necessary in order for the engine to appear. The registration code is a bit convoluted as it needs to be after the WM_init.
2022-03-17Cleanup: spelling in commentsCampbell Barton
Use <pre>..</pre> for pseudo-code.
2022-03-16Cleanup: incorrect comments, use C commentsCampbell Barton
2022-03-16Cleanup: Remove volatile from RenderResult and related APIsJesse Yurkovich
Volatile fields were introduced to the RenderResult struct years ago[1]. However, volatile is most likely not doing what it was intended to do in this instance, and is problematic when moving files to c++ (see discussion from D13962). There are complex rules around what happens to these fields but none of them guarantee what the above commit alluded to. This patch drops the volatile and cleans up the APIs surrounding it. [1] rB7930c40051ef1b1a26140629cf1299aa89eed859 Passing on all platforms: https://builder.blender.org/admin/#/builders/18/builds/338 Differential Revision: https://developer.blender.org/D14298
2022-03-15Fix T96263: command line rendering affected by current scene subframeBrecht Van Lommel
2022-03-08Cleanup: spelling in commentsCampbell Barton
2022-03-07Cleanup: use doxy-sections for pipeline, text_drag & effectsCampbell Barton
Also improve on the doc-string for RE_RenderFrame & RE_RenderAnim.
2022-02-21Merge branch 'blender-v3.1-release'Hans Goudey
2022-02-21Fix: Avoid potential use of dirty normalsHans Goudey
Instead of accessing the `CD_NORMAL` layer directly, use the proper API for accessing mesh normals. Even if the layer exists, the values might be incorrect due to a deformation. Related to ef0e21f0ae71d, 969c4a45ce09100e, and T95839.
2022-02-19Merge branch 'blender-v3.1-release'Hans Goudey
2022-02-18Fix T95338: missing image editor refresh after render compositingBrecht Van Lommel
This was an old issue, but recent image partial update changes made this more likely to happen in some cases. Now ensure that whenever the rendered scene switches the image is updated.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-10Fix T95334: Crash with no vertex normals in multires bakeHans Goudey
This is partially caused by a stupid mistake in cfa53e0fbeed7178c78 where I missed initializing the `vert_normals` pointer in `MResolvePixelData`. It's also caused by questionable assumptions from DerivedMesh code that vertex normals would be valid. The fix used here is to create a temporary mesh with the data necessary to compute vertex normals, and ensure them here. This is used because normal calculation is only implemented for `Mesh` and edit mesh, not `DerivedMesh`. While this might not be great for performance, it's potentially aligned with future refactoring of this code to remove `DerivedMesh` completely. Since this is one of the last places the data structure is used, that would be a great improvement. Differential Revision: https://developer.blender.org/D13960
2022-02-04Cleanup: Grammar in comments and tooltipsHans Goudey
- "own" -> "its own" - "it's" -> "its" - Use proper plural
2022-02-04Merge branch 'blender-v3.1-release'Clément Foucault
2022-02-04Fix T95471: baking normals wrong after recent MVert normals refactorBrecht Van Lommel
2022-02-03Fix T95334: Crash with no vertex normals in multires bakeHans Goudey
This is partially caused by a stupid mistake in cfa53e0fbeed7178c78 where I missed initializing the `vert_normals` pointer in `MResolvePixelData`. It's also caused by questionable assumptions from DerivedMesh code that vertex normals would be valid. The fix used here is to create a temporary mesh with the data necessary to compute vertex normals, and ensure them here. This is used because normal calculation is only implemented for `Mesh` and edit mesh, not `DerivedMesh`. While this might not be great for performance, it's potentially aligned with future refactoring of this code to remove `DerivedMesh` completely. Since this is one of the last places the data structure is used, that would be a great improvement. Differential Revision: https://developer.blender.org/D13960
2022-02-02Cleanup: spelling in commentsCampbell Barton
2022-01-31Fix crash with non-closed meshes in recent bugfix for texture marginBrecht Van Lommel
Ref T95249, D13935
2022-01-31Fix T95249: bake margin adjacent faces fails in some directionsMartijn Versteegh
The new adjacent faces method border lookup fails in some directions around 45 degrees * Use 8 Dijkstra directions (also diagonally) to determine which polygon is the closest to each pixel. Using only Manhattan distance lead to large parts of the texture which were matched with the wrong polygon. * Use neighbroing polygons for edge search. The Adjacent Faces algorithm needs to determine the closest edge, in UV space, each pixel. To speed this up first as map is built which finds the closest polygon for each pixel along horizontal, vertical and diagonal steps. Because this can sometimes be one edge off we first look in the polygon from the map, if that fails also check the edges of its neighbouring UV polygons. Differential Revision: https://developer.blender.org/D13935
2022-01-31Cleanup: remove wrong assertMartijn Versteegh
Was accidentally left in after refactoring. Fixes T95347 Differential Revision: https://developer.blender.org/D13963
2022-01-28Fix compilation error in previous commit.Jeroen Bakker
2022-01-28Remove compilation warnings TexResult.Jeroen Bakker
2022-01-27Cleanup: Clang tidyHans Goudey
Use nullptr, use named parameters, fix deprecated header
2022-01-27Cleanup: Fix const correctness warningClément Foucault
2022-01-27Cleanup: Add more const correctness to some functionsClément Foucault
These are functions that are used by eevee-rewrite which has more strict const correctness.
2022-01-25Cleanup: Correct location of node function declarationsHans Goudey
Currently there are many function declarations in `BKE_node.h` that don't actually have implementations in blenkernel. This commit moves the declarations to `NOD_composite.h`, `NOD_texture.h`, and `NOD_shader.h` instead. This helps to clarify the purpose of the different modules. Differential Revision: https://developer.blender.org/D13869
2022-01-24Cleanup: spelling in commentsCampbell Barton
2022-01-18Cleanup: spelling in commentsCampbell Barton
2022-01-18Cleanup: move docs to definitionCampbell Barton
2022-01-17Baking: new method to generate margin, based on adjacent facesMartijn Versteegh
This significantly reduces discontinuities on UV seams, by giving a better match of the texture filtered colors on both sides of the seam. It works by using pixels from adjacent faces across the UV seam. This new option is called "Adjacent Faces" and is the default. The old option is called "Extend", and extends border pixels outwards. Differential Revision: https://developer.blender.org/D13303
2022-01-14Cleanup: spelling in comments, C++ style comments for disabled codeCampbell Barton
Also ensure space at end of comment.
2022-01-13Refactor: Move normals out of MVert, lazy calculationHans Goudey
As described in T91186, this commit moves mesh vertex normals into a contiguous array of float vectors in a custom data layer, how face normals are currently stored. The main interface is documented in `BKE_mesh.h`. Vertex and face normals are now calculated on-demand and cached, retrieved with an "ensure" function. Since the logical state of a mesh is now "has normals when necessary", they can be retrieved from a `const` mesh. The goal is to use on-demand calculation for all derived data, but leave room for eager calculation for performance purposes (modifier evaluation is threaded, but viewport data generation is not). **Benefits** This moves us closer to a SoA approach rather than the current AoS paradigm. Accessing a contiguous `float3` is much more efficient than retrieving data from a larger struct. The memory requirements for accessing only normals or vertex locations are smaller, and at the cost of more memory usage for just normals, they now don't have to be converted between float and short, which also simplifies code In the future, the remaining items can be removed from `MVert`, leaving only `float3`, which has similar benefits (see T93602). Removing the combination of derived and original data makes it conceptually simpler to only calculate normals when necessary. This is especially important now that we have more opportunities for temporary meshes in geometry nodes. **Performance** In addition to the theoretical future performance improvements by making `MVert == float3`, I've done some basic performance testing on this patch directly. The data is fairly rough, but it gives an idea about where things stand generally. - Mesh line primitive 4m Verts: 1.16x faster (36 -> 31 ms), showing that accessing just `MVert` is now more efficient. - Spring Splash Screen: 1.03-1.06 -> 1.06-1.11 FPS, a very slight change that at least shows there is no regression. - Sprite Fright Snail Smoosh: 3.30-3.40 -> 3.42-3.50 FPS, a small but observable speedup. - Set Position Node with Scaled Normal: 1.36x faster (53 -> 39 ms), shows that using normals in geometry nodes is faster. - Normal Calculation 1.6m Vert Cube: 1.19x faster (25 -> 21 ms), shows that calculating normals is slightly faster now. - File Size of 1.6m Vert Cube: 1.03x smaller (214.7 -> 208.4 MB), Normals are not saved in files, which can help with large meshes. As for memory usage, it may be slightly more in some cases, but I didn't observe any difference in the production files I tested. **Tests** Some modifiers and cycles test results need to be updated with this commit, for two reasons: - The subdivision surface modifier is not responsible for calculating normals anymore. In master, the modifier creates different normals than the result of the `Mesh` normal calculation, so this is a bug fix. - There are small differences in the results of some modifiers that use normals because they are not converted to and from `short` anymore. **Future improvements** - Remove `ModifierTypeInfo::dependsOnNormals`. Code in each modifier already retrieves normals if they are needed anyway. - Copy normals as part of a better CoW system for attributes. - Make more areas use lazy instead of eager normal calculation. - Remove `BKE_mesh_normals_tag_dirty` in more places since that is now the default state of a new mesh. - Possibly apply a similar change to derived face corner normals. Differential Revision: https://developer.blender.org/D12770
2022-01-10Cleanup: note that compositor vector blur shares logic with zbuf.cCampbell Barton
Note that some functions have been copied between these files. De-duplication isn't trivial as there are differences in some functions.
2022-01-10Cleanup: typos in comments, remove libnumaapi referenceCampbell Barton