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
2020-05-14Fix T73984: unnecessary Cycles viewport updates with object texture coordinatesBrecht Van Lommel
Remove old code that added extra updates for shaders that have a dependency on objects. The dependency graph can now tell Cycles when a material is affected by an object transform.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Cycles: change volume step size controls, auto adjust based on voxel sizeBrecht Van Lommel
By default it will now set the step size to the voxel size for smoke and volume objects, and 1/10th the bounding box for procedural volume shaders. New settings are: * Scene render/preview step rate: to globally adjust detail and performance * Material step rate: multiplied with auto detected per-object step size * World step size: distance to steo for world shader Differential Revision: https://developer.blender.org/D1777
2020-03-11Cycles: add internal default volume shader, to be used for new volume objectBrecht Van Lommel
This is mostly straightforward, but required some refactoring to ensure that the default volume material does not always turn on the volume feature for GPU rendering.
2020-02-07Cleanup: split Cycles Hair and Mesh classes, with Geometry base classBrecht Van Lommel
2019-05-01Cleanup: comments (long lines) in cyclesCampbell Barton
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-11-09Merge branch 'master' into blender2.8Sergey Sharybin
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-11-08Merge branch 'master' into blender2.8Brecht Van Lommel
2018-11-08Cycles: Write Cryptomatte metadata according to the specificationLukas Stockner
Reviewers: brecht, sergey, swerner Subscribers: creamsurfer, Tanguy, Noss, SteffenD Differential Revision: https://developer.blender.org/D3862
2018-07-06Merge branch 'master' into blender2.8Campbell Barton
2018-07-06Cleanup: strip trailing space for cyclesCampbell Barton
2018-06-26Merge branch 'master' into blender2.8Sybren A. Stüvel
2018-06-26Revert "Turned off clang warnings in third party includes."Stefan Werner
This reverts commit d53093953f8f3b58600cb19020ecbe0b5f254b52.
2018-06-26Merge branch 'master' into blender2.8Campbell Barton
2018-06-26Turned off clang warnings in third party includes.Stefan Werner
The latest clang compiler (at least the one in Xcode 9.4.1) warns about the register keyword and macro expansions using defined(). Since these warnings come from third party code, we can't address them directly in Blender. Silencing them via #pramgas will at least keep the warnings during a build down to the ones that are relevant to Blender code.
2018-06-14Merge remote-tracking branch 'origin/master' into blender2.8Lukas Stockner
2018-06-14Cycles: Query XYZ to/from Scene Linear conversion from OCIO instead of ↵Lukas Stockner
assuming sRGB I've limited it to just the RGB<->XYZ stuff for now, correct image handling is the next step. Reviewers: brecht, sergey Differential Revision: https://developer.blender.org/D3478
2018-05-30Fix missing Cycles 3D viewport updates when editing materials, lamps.Brecht Van Lommel
This introduces a new depsgraph API for getting updated datablocks, rather than getting it from bpy.data. * depsgraph.ids_updated gives a list of all datablocks in the depsgraph which have been updated. * depsgraph.id_type_updated('TYPE') is true if any datablock of the given type has been added, removed or modified. More API updates are coming to properly handle multiple depsgraphs and finer update granularity, but this should make Cycles work again.
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.
2018-01-29Fix Cycles viewport render not updating when tweaking displacement shader.Brecht Van Lommel
This was disabled to avoid updating the geometry every time when the material includes displacement, because there was no way to distinguish between surface shader and displacement updates. As a solution, we now compute an MD5 hash of the nodes linked to the displacement socket, and only update the mesh if that changes. Differential Revision: https://developer.blender.org/D3018
2017-10-06Cycles: Fix possible race condition when generating Beckmann tableSergey Sharybin
Two issues here: - Checking table size to be non-zero is not a proper way to go here. This is because we first resize the table and then fill it in. So it was possible that non-initialized table was used. Trickery with using temporary memory and then doing table.swap() might work, but we can not guarantee that table size will be set after the data pointer. - Mutex guard was useless, because every thread was using own mutex. Need to make mutex guard static so all threads are using same mutex.
2017-08-20Code cleanup: remove copy of shader graph for bump, no longer needed.Brecht Van Lommel
2017-05-19Fix T51553: Cycles Volume Emission turns black when strength is 0 or color ↵Lukas Stockner
is black The problem was that Cycles implicitly uses a transparent surface shader when only volume nodes are used, but since the black emission shader gets optimized away, it was no longer detected and therefore no transparent surface was used. Therefore, the shader now stores whether volume nodes were connected before optimizing.
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-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
2017-03-06Cycles: Fix strict -Wpedantic warnings with GCCSergey Sharybin
Patch by Stefan Werner, thanks!
2016-09-09Cycles: Don't run full shader evaluation for constant emission lampsLukas Stockner
Most of the time, Lamps in Cycles are just a constant emission closure, no texturing etc. Therefore, running a full shader evaluation is wasteful. To avoid that, Cycles now detects these constant emission shaders and stores their value in the lamp data along with a flag in the shader. Then, at runtime, if this flag is set, the lamp code just uses this value and only runs the full shader evaluation if it is neccessary. In scenes with a lot of lamps and with "Sample all direct/indirect" enabled, this saves up to 20% of rendering time in my tests. Reviewers: #cycles Differential Revision: https://developer.blender.org/D2193
2016-09-02Cycles: remove duplicate shader storageMai Lavelle
Storing multiple copies of a shader was needed when the displacement method was a mesh option and could be different for each mesh. Now that its a shader option this is unnecessary. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2156
2016-08-07Cycles microdisplacement: Move displacement options from mesh to material ↵Mai Lavelle
settings Displacement is now a per material setting, which means old files will have to be updated if they had used displacement. Cool side effect of this change is material previews now show displacement. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2140
2016-05-22Code refactor: nodify Cycles shader and lights.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D2016
2016-05-17Code refactor: use shader pointers rather than shader indexes.Brecht Van Lommel
2016-02-12Cycles: Always use guarded allocator of vectorsSergey Sharybin
We don't have vectors re-allocation happening multiple times from inside a loop anymore, so we can safely switch to a memory guarded allocator for vectors and keep track on the memory usage at various stages of rendering. Additionally, when building from inside Blender repository, Cycles will use Blender's guarded allocator, so actual memory usage will be displayed in the Space Info header. There are couple of tricky aspects of the patch: - TaskScheduler::exit() now explicitly frees memory used by `threads`. This is needed because `threads` is a static member which destructor isn't getting called on Blender's exit which caused memory leak print to happen. This shouldn't give any measurable speed issues, reallocation of that vector is only one of fewzillion other allocations happening during synchronization. - Use regular guarded malloc (not aligned one). No idea why it was made to be aligned in the first place. Perhaps some corner case tests or so. Vector was never expected to be aligned anyway. Let's see if we'll have actual bugs with this. Reviewers: dingto, lukasstockner97, juicyfruit, brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D1774
2016-02-12Cycles: Make Blender importer more forward compatibleSergey Sharybin
Basically the idea is to make code robust against extending enum options in the future by falling back to a known safe default setting when RNA is set to something unknown. While this approach solves the issues similar to T47377, but it wouldn't really help when/if any of the RNA values gets ever deprecated and removed. There'll be no simple solution to that apart from defining explicit mapping from RNA value to Cycles one. Another part which isn't so great actually is that we now have to have some enum guards and give some explicit values to the enum items, but we can live with that perhaps. Reviewers: dingto, juicyfruit, lukasstockner97, brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D1785
2016-02-06Cycles: Re-implement some utilities to avoid use of boostSergey Sharybin
The title says it all actually, the idea is to make Cycles only requiring Boost via 3rd party dependencies like OIIO and OSL. So now there are only few places which still uses Boost: - Foreach, function bindings and threading primitives. Those we can easily get rid with C++11 bump (which seems inevitable sooner or later if we'll want ot use newer LLVM for OSL), - Networking devices There's no quick solution for those currently, but there are some patches around which improves serialization. Reviewers: juicyfruit, mont29, campbellbarton, brecht, dingto Reviewed By: brecht, dingto Differential Revision: https://developer.blender.org/D1764
2016-02-06Cycles: Auto disable World MIS, if we only use a simple color.Thomas Dinges
When World MIS is enabled by the user, we now check if we actually need it. In case of a simple node setup (no procedurals, no HDRs..) we auto disable MIS internally to save render time. This change is important for upcoming default changes.
2016-02-05Cleanup: Rename has_heterogeneous_volume variable.Thomas Dinges
No functional changes, this change is done for consistency of upcoming changes.
2016-01-07Cycles: Update some types used form OSLSergey Sharybin
Some types were deprecated back in 2013, better to be prepared earlier for those types being removed from upstream.
2015-11-21Cycles: Make requested features struct aware of subsurface BSDFSergey Sharybin
This way we'll be able to disable SSS for the scene-adaptive kernel.
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.
2015-06-01Cycles: Fix missing features gathering from the bump graphSergey Sharybin
2015-05-09Cycles: Initial work towards selective nodes support compilationSergey Sharybin
The goal is to be able to compile kernel with nodes which are actually needed to render current scene, hence improving performance of the kernel, The idea is: - Have few node groups, starting with a group which contains nodes are used really often, and then couple of groups which will be extension of this one. - Have feature-based nodes disabling, so it's possible to disable nodes related to features which are not used with the currently used nodes group. This commit only lays down needed routines for this approach, actual split will happen later after gathering statistics from bunch of production scenes.
2015-05-05Cycles: Use curve approximation for blackbody instead of lookup tableSv. Lockal
Now we calculate color in range 800..12000 using an approximation a/x+bx+c for R and G and ((at + b)t + c)t + d) for B. Max absolute error for RGB for non-lut function is less than 0.0001, which is enough to get the same 8 bit/channel color as for OSL with a noticeable performance difference. However there is a slight visible difference between previous non-OSL implementation because of lookup table interpolation and offset-by-one mistake. The previous implementation gave black color outside of soft range (t > 12000), now it gives the same color as for 12000. Also blackbody node without input connected is being converted to value input at shader compile time. Reviewers: dingto, sergey Reviewed By: dingto Subscribers: nutel, brecht, juicyfruit Differential Revision: https://developer.blender.org/D1280
2015-04-06Cycles: Experiment with making previews more interactiveSergey Sharybin
There were two major problems with the interactivity of material previews: - Beckmann tables were re-generated on every material tweak. This is because preview scene is not set to be persistent, so re-triggering the render leads to the full scene re-sync. - Images could take rather noticeable time to load with OIIO from the disk on every tweak. This patch addressed this two issues in the following way: - Beckmann tables are now static on CPU memory. They're couple of hundred kilobytes only, so wouldn't expect this to be an issue. And they're needed for almost every render anyway. This actually also makes blackbody table to be static, but it's even smaller than beckmann table. Not totally happy with this approach, but others seems to complicate things quite a bit with all this render engine life time and so.. - For preview rendering all images are considered to be built-in. This means instead of OIIO which re-loads images on every re-render they're coming from ImBuf cache which is fully manageable from blender side and unused images gets freed later. This would make it impossible to have mipmapping with OSL for now, but we'll be working on that later anyway and don't think mipmaps are really so crucial for the material preview. This seems to be a better alternative to making preview scene persistent, because of much optimal memory control from blender side. Reviewers: brecht, juicyfruit, campbellbarton, dingto Subscribers: eyecandy, venomgfx Differential Revision: https://developer.blender.org/D1132
2015-01-27Cycles: Support texture coordinate from another objectSergey Sharybin
This is the same as blender internal's texture mapping from another object, so this way it's possible to control texture space of one object by another. Quite straightforward change apart from the workaround for the stupidness of the dependency graph. Now shader has flag telling that it depends on object transform. This is the simplest way to know which shaders needs to be tagged for update when object changes. This might give some false-positive tags now but reducing them should not be priority for Cycles and rather be a priority to bring new dependency graph. Also GLSL preview does not support using other object for mapping. This is actually correct for BI shading as well and to be addressed as a part of general GLSL viewport improvements since it's not really clear how to support this in GLSL. Reviewers: brecht, juicyfruit Subscribers: eyecandy, venomgfx Differential Revision: https://developer.blender.org/D1021
2015-01-23Cycles: Don't re-generate blackbody/beckmann tables on every shaders updateSergey Sharybin
This commit makes it so blackbody and beckmann lookup tables are stored on CPU after being generated and then only being copied to the device if needed. This solves lag of viewport update when tweaking shader tree by using 266KB of CPU memory.
2014-12-25Cleanup: Fix Cycles Apache header.Thomas Dinges
This was already mixed a bit, but the dot belongs there.
2014-12-08Cleanup: spellingCampbell Barton
2014-12-04Cycles: Fix compilation error after recent logging changesSergey Sharybin
Forbid OSL from polluting current conext with obscure stuff from windows.h, it's not useful and unhealthy anyway. Maybe we sohuld also forbid using abbreviated Glog constants as well tho.