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
2021-06-29Fix T89523: Cycles OpenCL compile error after recent changesBrecht Van Lommel
Also correctly used inverse transposed matrix for normal transform.
2021-06-29Fix Cycles hair render error on GPU after recent changesBrecht Van Lommel
Volumes primitive needs to be part of traceable primitives.
2021-06-29Fix T70615: Cycles ignores BSDF inputs when nodes are optimizedKévin Dietrich
When compiling BSDF nodes, we only assing stack space to the normal and tangent inputs if they are linked. However, it could be that the ConstantFolder removed the link, so checking if there is a link fails to take this into account. To fix this, added a flag to ShaderInput to keep track of whether a constant was folded into the input, and use it as well to verify that the socket is linked when assigning stack space. Reviewed By: brecht Maniphest Tasks: T70615 Differential Revision: https://developer.blender.org/D11731
2021-06-29Cleanup: clang-formatCampbell Barton
2021-06-28Fix T87194: custom attributes not accessible with Cycles VolumeKévin Dietrich
Custom properties defined on objects are not accessible from the attribute node when rendering a volume in Cycles. This is because this case is not handled. To handle it, added a primitive type for volumes in the kernel, which is then used in the initialization of ShaderData and to check whether an attribute lookup is for a volume. `volume_attribute_float4` is also now checking the attribute element type to dispatch to the right lookup function. Reviewed By: #cycles, brecht Maniphest Tasks: T87194 Differential Revision: https://developer.blender.org/D11728
2021-06-28Cycles: reduce shadow terminator artifactsMikhail Matrosov
Offset rays from the flat surface to match where they would be for a smooth surface as specified by the normals. In the shading panel there is now a Shading Offset (existing option) and Geometry Offset (new). The Geometry Offset works as follows: * 0: disabled * 0.001: only terminated triangles (normal points to the light, geometry doesn't) are affected * 0.1 (default): triangles at grazing angles are affected, and the effect fades out * 1: all triangles are affected Limitations: * The artifact is still visible in some cases, it could be that some quads require to be treated specifically as quads. * Inconsistent normals cause artifacts. * If small objects cast shadows to a big low poly surface, the shadows can appear to be in a wrong place - because the surface moved slightly above the geometry. This can be noticed only at grazing angles to light. * Approximated surfaces of two non-intersecting low-poly objects can overlap that causes off-the-wall shadows. Generally, using one or a few levels of subdivision can get rid of artifacts faster than before. Differential Revision: https://developer.blender.org/D11065
2021-06-28Fix Cycles not rendering motion vector passes after recent changesBrecht Van Lommel
Causing regression tests to fail.
2021-06-28Cleanup: repeated terms in code comments & error messagesCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-25Cycles: add view layer option to disable motion blur, in the Filter panelBrecht Van Lommel
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-24Cleanup: use '#if 0' for commented code-blockCampbell Barton
2021-06-23Fix T89331: Cycles lights flicker when transformedKévin Dietrich
The check on the transformation introduced in rBb313525c1bd0 to fix T88515 would sometimes prevent to update the light if the Blender object changed. To fix this, reverse the order in which the checks happen so that we do not shortcuit the object change check.
2021-06-23Cleanup: reformat trailing comments that caused line wrappingCampbell Barton
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-06-22OptiX: select BVH build options from Scene paramsKévin Dietrich
Currently, the OptiX BVH build options are selected based on whether we are in background mode (final renders) or not (viewport renders). In background mode, the BVH is built for fast path tracing and low memory footprint, while in viewport, it is built for fast updates. However, on platforms without OpenGL support, the background flag is always set to true and prevents using fast BVH builds in the viewport. Now, the BVH options derive from the Scene BVH settings: * if BVH is static, a fast to trace BVH is built * if BVH is dynamic, a fast to update BVH is built Reviewed By: #cycles, brecht Differential Revision: https://developer.blender.org/D11154
2021-06-16Alembic procedural: support reading per-vertex UV setsKévin Dietrich
This adds support for importing UV sets which are defined per vertex, instead of per face corners. Such UV sets can be generated when the mesh is split according to UV islands, or when there is only one UV island, in which cases only a single UV value can be stored per vertex since vertices will never be on a seam.
2021-06-15BLI: use explicit task isolation, no longer part of parallel operationsBrecht Van Lommel
After looking into task isolation issues with Sergey, we couldn't find the reason behind the deadlocks that we are getting in T87938 and a Sprite Fright file involving motion blur renders. There is no apparent place where we adding or waiting on tasks in a task group from different isolation regions, which is what is known to cause problems. Yet it still hangs. Either we do not understand some limitation of TBB isolation, or there is a bug in TBB, but we could not figure it out. Instead the idea is to use isolation only where we know we need it: when holding a mutex lock and then doing some multithreaded operation within that locked region. Three places where we do this now: * Generated images * Cached BVH tree building * OpenVDB lazy grid loading Compared to the more automatic approach previously used, there is the downside that it is easy to miss places where we need isolation. Yet doing it more automatically is also causing unexpected issue and bugs that we found no solution for, so this seems better. Patch implemented by Sergey and me. Differential Revision: https://developer.blender.org/D11603
2021-06-12Fix T88515: Cycles does not update light transform from linked collectionsKévin Dietrich
When moving a linked collection, we seem to only receive a depsgraph update for an empty object so the Blender synchronization cannot discriminate it and tag the object(s) (light or geometry) for an update through id_map.set_recalc. This missing transform update only affects lights since we do not check manually if the transformations were modified like we do for objects. To fix this, add a check to see if the transformation is different provided that a light was already created. Reviewed By: brecht Maniphest Tasks: T88515 Differential Revision: https://developer.blender.org/D11574
2021-06-08PyAPI: use keyword only argumentsCampbell Barton
Use keyword only arguments for the following functions. - addon_utils.module_bl_info 2nd arg `info_basis`. - addon_utils.modules 1st `module_cache`, 2nd arg `refresh`. - addon_utils.modules_refresh 1st arg `module_cache`. - bl_app_template_utils.activate 1nd arg `template_id`. - bl_app_template_utils.import_from_id 2nd arg `ignore_not_found`. - bl_app_template_utils.import_from_path 2nd arg `ignore_not_found`. - bl_keymap_utils.keymap_from_toolbar.generate 2nd & 3rd args `use_fallback_keys` & `use_reset`. - bl_keymap_utils.platform_helpers.keyconfig_data_oskey_from_ctrl 2nd arg `filter_fn`. - bl_ui_utils.bug_report_url.url_prefill_from_blender 1st arg `addon_info`. - bmesh.types.BMFace.copy 1st & 2nd args `verts`, `edges`. - bmesh.types.BMesh.calc_volume 1st arg `signed`. - bmesh.types.BMesh.from_mesh 2nd..4th args `face_normals`, `use_shape_key`, `shape_key_index`. - bmesh.types.BMesh.from_object 3rd & 4th args `cage`, `face_normals`. - bmesh.types.BMesh.transform 2nd arg `filter`. - bmesh.types.BMesh.update_edit_mesh 2nd & 3rd args `loop_triangles`, `destructive`. - bmesh.types.{BMVertSeq,BMEdgeSeq,BMFaceSeq}.sort 1st & 2nd arg `key`, `reverse`. - bmesh.utils.face_split 4th..6th args `coords`, `use_exist`, `example`. - bpy.data.libraries.load 2nd..4th args `link`, `relative`, `assets_only`. - bpy.data.user_map 1st..3rd args `subset`, `key_types, `value_types`. - bpy.msgbus.subscribe_rna 5th arg `options`. - bpy.path.abspath 2nd & 3rd args `start` & `library`. - bpy.path.clean_name 2nd arg `replace`. - bpy.path.ensure_ext 3rd arg `case_sensitive`. - bpy.path.module_names 2nd arg `recursive`. - bpy.path.relpath 2nd arg `start`. - bpy.types.EditBone.transform 2nd & 3rd arg `scale`, `roll`. - bpy.types.Operator.as_keywords 1st arg `ignore`. - bpy.types.Struct.{keyframe_insert,keyframe_delete} 2nd..5th args `index`, `frame`, `group`, `options`. - bpy.types.WindowManager.popup_menu 2nd & 3rd arg `title`, `icon`. - bpy.types.WindowManager.popup_menu_pie 3rd & 4th arg `title`, `icon`. - bpy.utils.app_template_paths 1st arg `subdir`. - bpy.utils.app_template_paths 1st arg `subdir`. - bpy.utils.blend_paths 1st..3rd args `absolute`, `packed`, `local`. - bpy.utils.execfile 2nd arg `mod`. - bpy.utils.keyconfig_set 2nd arg `report`. - bpy.utils.load_scripts 1st & 2nd `reload_scripts` & `refresh_scripts`. - bpy.utils.preset_find 3rd & 4th args `display_name`, `ext`. - bpy.utils.resource_path 2nd & 3rd arg `major`, `minor`. - bpy.utils.script_paths 1st..4th args `subdir`, `user_pref`, `check_all`, `use_user`. - bpy.utils.smpte_from_frame 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.smpte_from_seconds 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.system_resource 2nd arg `subdir`. - bpy.utils.time_from_frame 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.time_to_frame 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.units.to_string 4th..6th `precision`, `split_unit`, `compatible_unit`. - bpy.utils.units.to_value 4th arg `str_ref_unit`. - bpy.utils.user_resource 2nd & 3rd args `subdir`, `create` - bpy_extras.view3d_utils.location_3d_to_region_2d 4th arg `default`. - bpy_extras.view3d_utils.region_2d_to_origin_3d 4th arg `clamp`. - gpu.offscreen.unbind 1st arg `restore`. - gpu_extras.batch.batch_for_shader 4th arg `indices`. - gpu_extras.batch.presets.draw_circle_2d 4th arg `segments`. - gpu_extras.presets.draw_circle_2d 4th arg `segments`. - imbuf.types.ImBuf.resize 2nd arg `resize`. - imbuf.write 2nd arg `filepath`. - mathutils.kdtree.KDTree.find 2nd arg `filter`. - nodeitems_utils.NodeCategory 3rd & 4th arg `descriptions`, `items`. - nodeitems_utils.NodeItem 2nd..4th args `label`, `settings`, `poll`. - nodeitems_utils.NodeItemCustom 1st & 2nd arg `poll`, `draw`. - rna_prop_ui.draw 5th arg `use_edit`. - rna_prop_ui.rna_idprop_ui_get 2nd arg `create`. - rna_prop_ui.rna_idprop_ui_prop_clear 3rd arg `remove`. - rna_prop_ui.rna_idprop_ui_prop_get 3rd arg `create`. - rna_xml.xml2rna 2nd arg `root_rna`. - rna_xml.xml_file_write 4th arg `skip_typemap`.
2021-06-04Nodes: Add Multiply Add to Vector Math nodesCharlie Jolly
Cycles, Eevee, OSL, Geo, Attribute This operator provides consistency with the standard math node. Allows users to use a single node instead of two nodes for this common operation. Reviewed By: HooglyBoogly, brecht Differential Revision: https://developer.blender.org/D10808
2021-06-02Add workaround for gcc 11 compiler bugJacques Lucke
Differential Revision: https://developer.blender.org/D11462
2021-06-01Cleanup: spelling in commentsKévin Dietrich
2021-05-31Cycles: optimize 3D viewport rendering with camera passepartoutBrecht Van Lommel
If the area outside the camera is fully opaque, don't render it. Contributed by Kdaf. Differential Revision: https://developer.blender.org/D11182
2021-05-27Merge branch 'blender-v2.93-release'Clément Foucault
2021-05-27Cleanup: Unused include in CyclesSergey Sharybin
2021-05-27Refactor: Move display pass to Cycles viewport parametersSergey Sharybin
Allows to centralize storage and modification checks in a single place, avoiding duplication in the synchronization code. Ideally we would somehow be able to more granularly modify Cycles side objects. Leaving this for a future decision, because it might be better to implement it as a graph on the sync side.
2021-05-27Cleanup: Redundnat member init in Cycles viewport parametersSergey Sharybin
2021-05-27Refactor: Naming in Cycles viewport methodsSergey Sharybin
Makes it more explicit they operate on shading/light. Gives room to move more viewport related settings into this class and cover with specific or generic modification checks.
2021-05-27Cleanup: Use logical OR in Cycles background shaderSergey Sharybin
2021-05-27Cleanup: const qualifier of return typeSergey Sharybin
2021-05-27Refactor: Remove friend class from Cycles viewport parametersSergey Sharybin
Such pattern should only be used when it is really needed. Otherwise just stick to a more regular design, without worrying who is the user of the class. Otherwise it will be annoying to subclass or unit test.
2021-05-27Refactor: Rename pass accessor in viewport parametersSergey Sharybin
No need to state that it is a viewport display pass, since the method is within viewport parameters it is implied that parameters do belong to the viewport. Brings this code closer to the Cycles-X branch.
2021-05-26Revert "Cycles: optimize ensure_valid_reflection(), reduces render time by ↵Brecht Van Lommel
about 1%" Both before and after can have artifacts with some normal maps, but this seems to give worse artifacts on average which are not worth the minor performance increase. This reverts commit 21bc1a99baa765d81c3203fd2e451681b8a7fd55. Ref T88368, D10084
2021-05-26Cycles: optimize attributes device updatesKévin Dietrich
When an `AttributeSet` is tagged as modified, which happens after the addition or removal of an `Attribute` from the set, during the following GeometryManager device update, we update and repack the kernel data for all attribute types. However, if we only add or remove a `float` attribute, `float2` or `float3` attributes should not be repacked for efficiency. This patch adds some mechanisms to detect which attribute types are modified from the AttributeSet. Firstly, this adds an `AttrKernelDataType` to map the data type of the Attribute to the one used in the kernel as there is no one to one match between the two since e.g. `Transform` or `float4` data are stored as `float3s` in the kernel. Then, this replaces the `AttributeSet.modified` boolean with a set of flags to detect which types have been modified. There is no specific flag type (e.g. `enum ModifiedType`), rather the flags used derive simply from the `AttrKernelDataType` enumeration, to keep things synchronized. The logic to remove an `Attribute` from the `AttributeSet` and tag the latter as modified is centralized in a new `AttributeSet.remove` method taking an iterator as input. Lastly, as some attributes like standard normals are not stored in the various kernel attribute arrays (`DeviceScene::attribute_*`), the modified flags are only set if the associated standard corresponds to an attribute which will be stored in the kernel's attribute arrays. This makes it so adding or removing such attributes does not trigger an unnecessary update of other type-related attributes. Reviewed By: brecht Differential Revision: https://developer.blender.org/D11373
2021-05-26Fix T88552: Cycles changing Render Passes in viewport does not workSergey Sharybin
2021-05-26Cleanup: Simplify Cycles viewport parametersSergey Sharybin
Use early output and access shading RNA object only once.
2021-05-26Cleanup: Remove unused argument in Cycles syncSergey Sharybin
Makes it easier to see where exactly the viewport is used.
2021-05-25Fix T88096: Baking with OptiX and displacement failsPatrick Mours
Using displacement runs the shader eval kernel, but since OptiX modules are not loaded when baking is active, those were not available and therefore failed to launch. This fixes that by falling back to the CUDA kernels.
2021-05-21Cleanup: spellingLeon Zandman
Includes fixes to misspelled function names. Ref D11280
2021-05-21Cleanup: Use named unused arguments in Cycles DeviceSergey Sharybin
2021-05-20Merge remote-tracking branch 'origin/blender-v2.93-release'Sybren A. Stüvel
2021-05-19Fix T87793: Cycles OptiX crash hiding objects in viewport renderBrecht Van Lommel
2021-05-19Cycles OpenCL: disable AO preview kernelsBrecht Van Lommel
These seem to be causing some stability issues, and really are just not that useful in practice. Compiling them is slow already, so it does not improve the user experience much to show an AO preview if it's not nearly instant.
2021-05-18Cycles: Avoid unnecessary data updates in viewportSergey Sharybin
The BlenderSync will do quite a bit of work on every sync_data() call even if there is nothing changed in the scene. There will be early outputs done deeper in the call graph, but this is not really enough to ensure best performance during viewport navigation. This change makes it so sync_data() is only used when dependency graph has any update tags: if something changed in the scene the dependency graph will know it. If nothing changed there will be no IDs tagged for an update in the dependency graph. There are two weak parts in the current change: - With the persistent data there is a special call to ignore the check of the dependency graph tags. This is more of a safety, because it is not immediately clear what the correct state of recalc flags is. - Deletion of objects is detected indirectly, via tags of scene and collections. It might not be bad for the first version of the change. The test file used: {F10117322} Simply open the file, start viewport render, and navigate the viewport. On my computer this avoids 0.2sec spend on data_sync() on every up[date of viewport navigation. We can do way more granular updates in the future: for example, avoid heavy objects sync when it is only camera object which changed. This will need an extended support from the dependency graph API. Doing nothing if nothing is changed is something we would want to do anyway. Differential Revision: https://developer.blender.org/D11279
2021-05-18Cleanup: formatKévin Dietrich
2021-05-18Cleanup: clang-formatCampbell Barton
2021-05-18Alembic procedural: fix wrong property used as base for attributeKévin Dietrich
lookups We use the schema so that we can access top level attributes as well. This is already done for polygon meshes and curves, so this only modifies the behavior for subdivision objects.
2021-05-18Alembic procedural: fix crash accessing invalid ICompoundPropertiesKévin Dietrich
Although it is not a pointer, accessing an ICompoundProperty dereferences a pointer under the hood, so check for validity.
2021-05-17Merge branch 'blender-v2.93-release'Brecht Van Lommel