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-10-25Cycles: Revert all host update specific changesSergey Sharybin
The approach didn't turn out to be that useful after all as there are unavoidable dependencies of data from the device. For example, to know whether object intersects volume or not it is required to run displacement kernels. The way of splitting host and device updates caused state where some data is not yet available, causing confusion and leaving code to be error-prone.
2021-10-19Cleanup: Unused device argument in host update functionsSergey Sharybin
Better not to tempt anyone from using unsafe access to device functionality during host update.
2021-10-11Cycles: Introduce scene host_update functionSergey Sharybin
The longer-term goal is to separate host-only scene update from device update: make it possible to make kernel features depend on actual scene state and flags. This change makes it so shaders are compiled before kernel load, making checks like "has_volume" available at the kernel features calculation state. No functional changes are expected at this point. Differential Revision: https://developer.blender.org/D12795
2021-09-21Cycles: merge of cycles-x branch, a major update to the rendererBrecht Van Lommel
This includes much improved GPU rendering performance, viewport interactivity, new shadow catcher, revamped sampling settings, subsurface scattering anisotropy, new GPU volume sampling, improved PMJ sampling pattern, and more. Some features have also been removed or changed, breaking backwards compatibility. Including the removal of the OpenCL backend, for which alternatives are under development. Release notes and code docs: https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles https://wiki.blender.org/wiki/Source/Render/Cycles Credits: * Sergey Sharybin * Brecht Van Lommel * Patrick Mours (OptiX backend) * Christophe Hery (subsurface scattering anisotropy) * William Leeson (PMJ sampling pattern) * Alaska (various fixes and tweaks) * Thomas Dinges (various fixes) For the full commit history, see the cycles-x branch. This squashes together all the changes since intermediate changes would often fail building or tests. Ref T87839, T87837, T87836 Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-05-12Cycles: fix inconsistent-missing-override warningsAnkit Meel
LLVM Clang 13, macOS. Reviewed By: brecht Differential Revision: https://developer.blender.org/D11207
2021-05-03Cycles: use reference count to detect used shadersKévin Dietrich
Shaders are only compiled if they are used by some other Node (Geometry, Light, etc.). This usage detection is done before updating the Scene, however it fails at detecting Shaders used by Procedurals not known to Cycles (e.g. ones defined by third party applications), as Procedurals are only updated after the shaders are compiled. To remedy this, we now use the Node reference counting mechanism to detect whether a Shader is used and therefore should be compiled. This removes `ShaderManager::update_shaders_used` as it is not needed anymore, however, since it would also update the Shader ids, this is now performed in `ShaderManager::device_update`, and a new virtual `device_update_specific` method was added to handle device updates for SVM and OSL. Reviewed By: brecht Differential Revision: https://developer.blender.org/D10965
2020-12-22Fix T84006: Cycles AOV not written with some mix shader node set upsBrecht Van Lommel
2020-09-10Cleanup: spellingCampbell Barton
2019-12-12Add support for tiled images and the UDIM naming schemeLukas Stockner
This patch contains the work that I did during my week at the Code Quest - adding support for tiled images to Blender. With this patch, images now contain a list of tiles. By default, this just contains one tile, but if the source type is set to Tiled, the user can add additional tiles. When acquiring an ImBuf, the tile to be loaded is specified in the ImageUser. Therefore, code that is not yet aware of tiles will just access the default tile as usual. The filenames of the additional tiles are derived from the original filename according to the UDIM naming scheme - the filename contains an index that is calculated as (1001 + 10*<y coordinate of the tile> + <x coordinate of the tile>), where the x coordinate never goes above 9. Internally, the various tiles are stored in a cache just like sequences. When acquired for the first time, the code will try to load the corresponding file from disk. Alternatively, a new operator can be used to initialize the tile similar to the New Image operator. The following features are supported so far: - Automatic detection and loading of all tiles when opening the first tile (1001) - Saving all tiles - Adding and removing tiles - Filling tiles with generated images - Drawing all tiles in the Image Editor - Viewing a tiled grid even if no image is selected - Rendering tiled images in Eevee - Rendering tiled images in Cycles (in SVM mode) - Automatically skipping loading of unused tiles in Cycles - 2D texture painting (also across tiles) - 3D texture painting (also across tiles, only limitation: individual faces can not cross tile borders) - Assigning custom labels to individual tiles (drawn in the Image Editor instead of the ID) - Different resolutions between tiles There still are some missing features that will be added later (see T72390): - Workbench engine support - Packing/Unpacking support - Baking support - Cycles OSL support - many other Blender features that rely on images Thanks to Brecht for the review and to all who tested the intermediate versions! Differential Revision: https://developer.blender.org/D3509
2019-12-10Cycles: support for custom shader AOVsLukas Stockner
Custom render passes are added in the Shader AOVs panel in the view layer settings, with a name and data type. In shader nodes, an AOV Output node is then used to output either a value or color to the pass. Arbitrary names can be used for these passes, as long as they don't conflict with built-in passes that are enabled. The AOV Output node can be used in both material and world shader nodes. Implemented by Lukas, with tweaks by Brecht. Differential Revision: https://developer.blender.org/D4837
2019-07-31Merge per-shader SVM nodes in the main update thread to avoid locking and ↵Lukas Stockner
resizing overhead In a test file containing 1300 copies of the same shader, this reduces shader update time from 3.1 sec to 0.05 sec. Thanks to @swerner for noticing this issue. Reviewers: brecht, sergey, swerner Subscribers: swerner Differential Revision: https://developer.blender.org/D5376
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2018-12-11Cycles: Remove old nasty workaroundSergey Sharybin
It used to be used for some sort of ignoring automatically generated bump nodes. But nowadays it causes one of the shaders in Classroom demo file to be compiled wrong.
2018-11-09Cycles: Cleanup, split array from vectorSergey Sharybin
Those are similar but different types, no reason to keep their definitions in a single file.
2018-11-09Cycles: Cleanup, spacing after preprocessorSergey Sharybin
It is supposed to be two spaces before comment stating which if else/endif statements corresponds to. Was mainly violated in the header guards.
2018-07-06Cleanup: strip trailing space for cyclesCampbell Barton
2018-05-27Cycles: Add Support for IES files as textures for light strengthLukas Stockner
This patch adds support for IES files, a file format that is commonly used to store the directional intensity distribution of light sources. The new IES node is supposed to be plugged into the Strength input of the Emission node of the lamp. Since people generating IES files do not really seem to care about the standard, the parser is flexible enough to accept all test files I have tried. Some common weirdnesses are distributing values over multiple lines that should go into one line, using commas instead of spaces as delimiters and adding various useless stuff at the end of the file. The user interface of the node is similar to the script node, the user can either select an internal Text or load a file. Internally, IES files are handled similar to Image textures: They are stored in slots by the LightManager and each unique IES is assigned to one slot. The local coordinate system of the lamp is used, so that the direction of the light can be changed. For UI reasons, it's usually best to add an area light, rotate it and then change its type, since especially the point light does not immediately show its local coordinate system in the viewport. Reviewers: #cycles, dingto, sergey, brecht Reviewed By: #cycles, dingto, brecht Subscribers: OgDEV, crazyrobinhood, secundar, cardboard, pisuke, intrah, swerner, micah_denn, harvester, gottfried, disnel, campbellbarton, duarteframos, Lapineige, brecht, juicyfruit, dingto, marek, rickyblender, bliblubli, lockal, sergey Differential Revision: https://developer.blender.org/D1543
2018-02-23Code refactor: improve attribute handling for optional volume attributes.Brecht Van Lommel
A volume shader should be able to request attributes, and still be rendered as homogeneous if no volume attributes are available for the object.
2017-10-21Code refactor: avoid some unnecessary device memory copying.Brecht Van Lommel
2017-08-20Code cleanup: remove copy of shader graph for bump, no longer needed.Brecht Van Lommel
2017-04-10Cycles: Fix race condition in shader attribute for real nowSergey Sharybin
Ended up moving lock in the more centralized space since multiple shaders can access this map.
2017-04-05Cycles: Fix race condition in attributes creation during SVM compilationSergey Sharybin
2017-03-29Cycles: Make all #include statements relative to cycles source directorySergey Sharybin
The idea is to make include statements more explicit and obvious where the file is coming from, additionally reducing chance of wrong header being picked up. For example, it was not obvious whether bvh.h was refferring to builder or traversal, whenter node.h is a generic graph node or a shader node and cases like that. Surely this might look obvious for the active developers, but after some time of not touching the code it becomes less obvious where file is coming from. This was briefly mentioned in T50824 and seems @brecht is fine with such explicitness, but need to agree with all active developers before committing this. Please note that this patch is lacking changes related on GPU/OpenCL support. This will be solved if/when we all agree this is a good idea to move forward. Reviewers: brecht, lukasstockner97, maiself, nirved, dingto, juicyfruit, swerner Reviewed By: lukasstockner97, maiself, nirved, dingto Subscribers: brecht Differential Revision: https://developer.blender.org/D2586
2016-09-13Cycles: Implement threaded SVM nodes compilationSergey Sharybin
The title says it all actually. From tests with barber shop scene here gives 2-3x speedup for shader compilation on my oldie i7 machine. The gain is mainly due to textures metadata query from jpeg files (which seems to requite de-compression before metadata can be read). But in theory could give nice improvements for scenes with huge node trees as well (i'm talking about node trees of complexity of fractal which we had reports about in the past). Reviewers: juicyfruit, dingto, lukasstockner97, brecht Reviewed By: brecht Subscribers: monio, Blendify Differential Revision: https://developer.blender.org/D2215
2016-09-02Cycles microdisplacement: Improved automatic bump mappingMai Lavelle
Object coordinates can now be used in the displacement shader and will give correct results, where as before bump mapping was calculated from the displace positions and resulted in incorrect shading. This works by evaluating the shader in two parts, first bump then surface, and setting the shader state to match what it would be if the surface was undisplaced for the bump shader evaluation. Currently only `P` is set as if undisplaced, but other shader variables could be set as well, such as `I` or `time`. Since these aren't set to anything meaningful for displacement I left them out of this patch, we can decide what to do with them separately. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2156
2016-05-28Code refactor: make ShaderNode match Node a bit more, reusing types and enums.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D2016
2016-05-22Code refactor: add generic Cycles node infrastructure.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D2016
2016-05-17Code refactor: use dynamic shader node array lengths now that OSL supports them.Brecht Van Lommel
2016-05-11Cycles: Use explicit qualifier for single-argument constructorsSergey Sharybin
Almost in all cases we want such constructors to be explicit, there are exceptions but only in few places.
2016-05-05Code cleanup: simplify SVM stack assignment.Brecht Van Lommel
2016-05-05Code cleanup: remove some unused functions.Brecht Van Lommel
2015-12-31Cycles: Experiment with use of runtime tag instead of set for SVM generationSergey Sharybin
This gives about 2x speedup (3.2sec vs. 11.9sec with 32716 handled nodes) when updating shader for the shader tree. Reviewers: brecht, juicyfruit, dingto, lukasstockner97 Differential Revision: https://developer.blender.org/D1700
2015-12-30Cycles: Wrap SVM compiler state variables into a single structSergey Sharybin
This way it's easier to pass stuff around and also much easier to add more state variables. So far should be no functional changes for artists.
2015-12-29Cycles: Add timing information to the SVM compiler statsSergey Sharybin
2015-12-28Cycles: Use different approach for SVM summary reportSergey Sharybin
Use Summary structure to collect all summary related on the shader compilation process which then could be either simply reported to the log or be passed to some user interface or so. This is type of the summary / report which is most flexible and useful and something we could use for other parts like shader optimization.
2015-11-25Cycles: Ensure order of shader nodes in the dependnecies setSergey Sharybin
The issue was than nodes dependencies were stored as set<ShaderNode*> which is actually a so called "strict weak ordered", meaning order of nodes in the set is strictly defined, but based on the ShaderNode pointer. This means that between different render invokations order of original nodes could be different due to different pointers allocated for ShaderNode. This commit makes it so dependencies and maps used for ShaderNodes are based on the node->id which has much more predictable order. It's still possible to trick the system by doing some crazy edits during viewport rendfer and cause difference between viewport and final render stacks. Reviewers: brecht Reviewed By: brecht Subscribers: LazyDodo Differential Revision: https://developer.blender.org/D1630
2015-11-20Cycles: Fix filter glossy being broken after recent changesSergey Sharybin
Basically we can not use sharp closure as a substitude when filter glossy is used. This is because we can not blur sharp reflection/refraction. This is quite quick and not really clean implementation. Not really happy with manual handling of original settings, but this is as good as we can do in the quick patch. It's a good acknowledgment and we now can re-consider some aspects of graph simplification to make such cases more natively supported. P.S. This failure would have been shown by our regression tests, so please, bother a bit to run Cycles's test sweep before doing such optimizations.
2014-12-25Cleanup: Fix Cycles Apache header.Thomas Dinges
This was already mixed a bit, but the dot belongs there.
2014-07-11Fix T41023: Specific material cause bad render result, different on CPU/GPUSergey Sharybin
Issue was caused by too much aggressive optimization, which skipped execution of some nodes leading to an uninitialized memory read in SVM stack.
2014-04-21Fix T39793: cycles SVM shading bug with tangled up nodes after recent ↵Brecht Van Lommel
optimization.
2014-04-21Code cleanup: remove old closure sampling code Cycles.Brecht Van Lommel
This was the original code to get things working on old GPUs, but now it is no longer in use and various features in fact depend on this to work correctly to the point that enabling this code is too buggy to be useful.
2014-04-04Cycles volume: detect homogeneous volume automatically in common cases.Brecht Van Lommel
In practice this means that if you don't connect a texture to your volume nodes it will figure that out and render the node faster, rather than you having to specify it manually. Main weakness is custom OSL nodes where we have to assume it is heterogeneous because we don't know what kind of data the node accesses.
2014-01-17Fix T37706: avoid cycles crash when using a stack that exceeds SVM stack limits.Brecht Van Lommel
This should be pretty rare, the shader in question had many parallel node links because of copying the nodes many times, which is inefficient to run anyway.
2013-08-28Cycles / Sky Texture:Thomas Dinges
* Added a new sky model by Hosek and Wilkie: "An Analytic Model for Full Spectral Sky-Dome Radiance" http://cgg.mff.cuni.cz/projects/SkylightModelling/ Example render: http://archive.dingto.org/2013/blender/code/new_sky_model.png Documentation: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Textures#Sky_Texture Details: * User can choose between the older Preetham and the new Hosek / Wilkie model via a dropdown. For older files, backwards compatibility is preserved. When we add a new Sky texture, it defaults to the new model though. * For the new model, you can specify the ground albedo (see documentation for details). * Turbidity now has a UI soft range between 1 and 10, higher values (up to 30) are still possible, but can result in weird colors or black. * Removed the limitation of 1 sky texture per SVM stack. (Patch by Lukas Tönne, thanks!) Thanks to Brecht for code review and some help! This is part of my GSoC 2013 project, SVN merge of r59214, r59220, r59251 and r59601.
2013-08-18Cycles: relicense GNU GPL source code to Apache version 2.0.Brecht Van Lommel
More information in this post: http://code.blender.org/ Thanks to all contributes for giving their permission!
2013-04-02Cycles: initial subsurface multiple scattering support. It's not working asBrecht Van Lommel
well as I would like, but it works, just add a subsurface scattering node and you can use it like any other BSDF. It is using fully raytraced sampling compatible with progressive rendering and other more advanced rendering algorithms we might used in the future, and it uses no extra memory so it's suitable for complex scenes. Disadvantage is that it can be quite noisy and slow. Two limitations that will be solved are that it does not work with bump mapping yet, and that the falloff function used is a simple cubic function, it's not using the real BSSRDF falloff function yet. The node has a color input, along with a scattering radius for each RGB color channel along with an overall scale factor for the radii. There is also no GPU support yet, will test if I can get that working later. Node Documentation: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#BSSRDF Implementation notes: http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/Subsurface_Scattering
2013-02-14Fix #34121: OSL + persistent images option was not freeing shader memory ↵Brecht Van Lommel
properly, causing memory to increase continuously during animation render.
2012-11-28Fix #33335: cycles SVM closure issue in recent bugfix, incorrectly taggingBrecht Van Lommel
node as done.
2012-11-27Fix #32907: failure rendering a complex node setup, hitting fixed max numberBrecht Van Lommel
of closures limit. Optimized the code now so it can handle more. Change SVM mix/add closure handling, now we transform the node graph so that the mix weights are fed into the closure nodes directly.
2012-11-24Fix #33152: cycles SVM crash with certain shader nodes setups where closures ↵Brecht Van Lommel
would appear multiple times after flattening the mix/add shader part of the graph into a tree structure.