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
2016-11-14Cycles: De-duplicate image loading functionsSergey Sharybin
The code was templated already, so don't see big reason to have 3 versions of templated functions. It was giving some extra code to maintain and in fact already had divergency for support of huge image resolution (missing size_t cast in byte image loading). There should be no changes visible by artists.
2016-11-12Fix T49985: cycles standalone XML missing distant lights.Brecht Van Lommel
2016-11-07Cycles: Refactor Device selection to allow individual GPU compute device ↵Lukas Stockner
selection Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL). Now, a toggle button is displayed for every device. These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards). From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences. This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items. Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken. Reviewers: #cycles, brecht Reviewed By: #cycles, brecht Subscribers: brecht, juicyfruit, mib2berlin, Blendify Differential Revision: https://developer.blender.org/D2338
2016-11-06Cycles: Fix T49952: Bad MIS sampling of backgrounds with single bright pixelsLukas Stockner
With this fix, using a MIS map resolution equal to the image size for closest imterpolation or twice the size for linear interpolation gets rid of all fireflies. Previously, a much higher resolution was needed to get acceptable noise levels.
2016-10-30Cycles: Initialize the RNG state from the kernel instead of the hostLukas Stockner
This allows to save a memory copy, which will be particularly useful for network rendering. Reviewers: sergey, brecht, dingto, juicyfruit, maiself Differential Revision: https://developer.blender.org/D2323
2016-10-30Cycles: Add optional probabilistic termination of light samples based on ↵Lukas Stockner
their expected contribution In scenes with many lights, some of them might have a very small contribution to some pixels, but the shadow rays are traced anyways. To avoid that, this patch adds probabilistic termination to light samples - if the contribution before checking for shadowing is below a user-defined threshold, the sample will be discarded with probability (1 - (contribution / threshold)) and otherwise kept, but weighted more to remain unbiased. This is the same approach that's also used in path termination based on length. Note that the rendering remains unbiased with this option, it just adds a bit of noise - but if the setting is used moderately, the speedup gained easily outweighs the additional noise. Reviewers: #cycles Subscribers: sergey, brecht Differential Revision: https://developer.blender.org/D2217
2016-10-30Cycles: Add smoothing option to the Brick TextureLukas Stockner
This option allows to create a smoother transition between Bricks and Mortar - 0 applies no smoothing, and 1 smooths across the whole mortar width. Mainly useful for displacement textures. The new default value for the smoothing option is 0.1 to give some smoothing that helps with antialiasing, but existing nodes are loaded with smoothing 0 to preserve compatibility. Reviewers: sergey, dingto, juicyfruit, brecht Reviewed By: brecht Subscribers: Blendify, nutel Differential Revision: https://developer.blender.org/D2230
2016-10-29Cycles: Implement texture coordinates for Point, Spot and Area LampsLukas Stockner
When using the Normal output of the Texture Coordinate node on Point and Spot lamps, the coordinates now depend on the rotation of the lamp. On Area lamps, the Parametric output of the Geometry node now returns UV coordinates on the area lamp. Credit for the Area lamp part goes to Stefan Werner (from D1995).
2016-10-24Cycles: Remove explicit std:: from types where possibleSergey Sharybin
We have our own abstraction level on top of the STL's implementation. This commit will guarantee our tweaks are used for all cases.
2016-10-24Cycles: Cleanup, styleSergey Sharybin
2016-10-23Cycles: OpenCL 3d textures support.Hristo Gueorguiev
Note that volume rendering is not supported yet, this is a step towards that. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2299
2016-10-12Fix T49640: Cycles constant folding incorrect for texture coordinates.Brecht Van Lommel
2016-10-01Cycles: implement partial constant folding for exponentiation.Alexander Gavrilov
This is also an important mathematical operation that can be folded if it is known that one argument is a certain constant. For colors the operation is provided as a Gamma node. The SVM Gamma node needs a small fix to make it follow the 0 ^ 0 == 1 rule, same as the Power node, or the Gamma node itself in OSL mode. Reviewers: #cycles Differential Revision: https://developer.blender.org/D2263
2016-10-01Fix MSVC compiler warning due to using */* to start comment.Brecht Van Lommel
2016-09-25Fix T49310: incorrect Cycles standalone normals with negative scale.Brecht Van Lommel
2016-09-23Cycles: Fix overflow caused by wrong size calculation in Mesh::add_undisplacedMai Lavelle
2016-09-22Fix T49417: Cycles crash - can't use 5 Gigabyte Tile EXR texture fileSergey Sharybin
Was an integer overflow issue when calculating offsets.
2016-09-18Cycles: Adaptive isolationMai Lavelle
Idea here is to select the lowest isolation level that wont compromise quality. By using the lowest level we save memory and processing time. This will also help avoid precision issues that have been showing up from using the highest level (T49179, T49257). This is a pretty simple heuristic that gives ok results. There's more we could do here, such as filtering for vertices/edges adjacent geometric features that need isolation instead of checking them all, but the logic there could get a bit involved. There's potential for slight popping of edges during animation if the dice rate is low, but I don't think this should be a problem since low dice rates really shouldn't be used in animation anyways. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D2240
2016-09-15Fix T49179: Parts of mesh disappear with adaptive subdivisionMai Lavelle
Problem was zero length normal caused by a precision issue in patch evaluation. This is somewhat of a quick fix, but is better than allowing possible NaNs to occur and cause problems elsewhere.
2016-09-14Cycles: Also support the constant emission speedup for mesh lightsLukas Stockner
Reviewers: brecht, sergey, dingto, juicyfruit Differential Revision: https://developer.blender.org/D2220
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-11Cycles: Fix shading and crashes resulting from constant folding on displacementMai Lavelle
Constant folding was removing all nodes connected to the displacement output if they evaluated to a constant, causing there to be no valid graph for displacement even when there was displacement to be applied, and sometimes caused crashes.
2016-09-11Cycles: Replace object index hack with actual checks for SD_TRANSFORM_APPLIEDMai Lavelle
Using ones complement for detecting if transform has been applied was confusing and led to several bugs. With this proper checks are made. Also added a few transforms where they were missing, mostly affecting baking and displacement when `P` is used in the shader (previously `P` was in the wrong space for these shaders) Also removed `TIME_INVALID` as this may have resulted in incorrect transforms in some cases. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2192
2016-09-11Cycles: Fix bump mapping to use object space when used with true displacementMai Lavelle
Bump mapping was happening in world space while displacement happens in object space, causing shading errors when displacement type was used with bump mapping. To fix this the proper transforms are added to bump nodes. This is only done for automatic bump mapping however, to avoid visual changes from other uses of bump mapping. It would be nice to do this for all bump mapping to be consistent but that will have to wait till we can break compatibility. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2191
2016-09-09Cycles: Add overall timing log to SVNShaderManagerSergey Sharybin
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-08Cycles: Fix OpenCL speed regression introduced with the improved bump mappingLukas Stockner
The two SVM nodes added with e7ea1ae78c caused a slowdown on AMD cards when rendering with OpenCL, whether displacement was used or not. In the Barcelona Pavillon scene on a RX480, this would cause a 12% slowdown. Therefore, this commit adds a additional flag for feature-adaptive compilation so that the new SVM nodes are only enabled when they are needed (Node tree connected to the Displacement output and Displacement type set to Both). Also, the nodes were also added to shaders when the Displacement Type was set to Bump (the default), which was unneccessary and is fixed now. Thanks to linda2 on IRC for reporting and testing and to maiself for help with the displacement shader code. This fix might be relevant for 2.78, but it should be tested further before including it.
2016-09-05Fix T49252: Crash when image textures used with true displacementMai Lavelle
2016-09-05Cycles: Fix unreported - Missing node group for the Camera NodeLukas Stockner
Thanks to linda2 for reporting in IRC.
2016-09-02Fix T49180: Cycles MIS Map for Animated Environment Texture Movie Doesn't ↵Sergey Sharybin
Update on Frame Change Not really ideal fix at all, but we are at RC today, so better to play really safe.
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-09-02Cycles: Store undisplaced coordinates for meshes when neededMai Lavelle
Reviewed By: brecht Differential Revision: https://developer.blender.org/D2156
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-30Cycles: Fix calculation of normals for subdivision meshesMai Lavelle
Not sure what happened here. Will have only effected Cycles standalone with linear subdivision in use.
2016-08-28Fix T49163: let Cycles only hide particles with missing motion data, not ↵Brecht Van Lommel
regular objects.
2016-08-28Fix T49167: Normals in wrong coordinate space when adaptive subdivision is usedMai Lavelle
Meshes with Cycles subdivision were being transformed to world space leading to normals to sometimes be calculated in that space, while they should be in object space. Also caused dicing to happen at the wrong rate for scaled meshes.
2016-08-25Cycles: Remove some redundant checksMai Lavelle
2016-08-25Cycles: Fix crash after recent subd fixesSergey Sharybin
Was happening when object only had curves (doe example, object with hair particle system and emitter rendering disabled).
2016-08-24Cycles: Fix crash when empty mesh has subdivisionMai Lavelle
OpenSubdiv doesn't like empty meshes, so we need to be careful not to subdivide when the mesh is empty.
2016-08-24Cycles Standalone: Fix support for subdivision meshesMai Lavelle
Changes from microdisplacement work broke previous support for subdivision meshes, sometimes leading to crashes; this makes things work again. Files that contain "patch" nodes will need to be updated to use meshes instead, as specifying patches was both inefficient and completely unsupported by the new subdivision code.
2016-08-22Fix T49136: full constant Curves with zero Fac input crashes in assert.Alexander Gavrilov
The if branches were reordered when the original patch was committed, which broke the implicit non-NULL guarantee on link. To prevent re-occurrence, add a couple of unit tests.
2016-08-18Code cleanup to use array.data() rather than &array[0]Brecht Van Lommel
(Now without the build errors)
2016-08-18Revert "Code cleanup to use array.data() rather than &array[0]."Mai Lavelle
This reverts commit 40b367479c6fe23d6f2b6d822f2d5266485619f3. Didn't build or solve any known issue. Please don't push changes without testing them first.
2016-08-18Code cleanup to use array.data() rather than &array[0].Brecht Van Lommel
These latter can cause MSVC debug asserts if the array is empty. With C++11 we'll be able to do this for std::vector later. This hopefully fixes an assert in the Cycles subdivision code.
2016-08-15Cycles microdisplacement: Allow kernels to be built without patch evaluationMai Lavelle
Kernels can now be built without patch evaluation when not needed by the scene (Catmull-Clark subdivision not in use), giving a performance boost for some devices.
2016-08-15Revert "Cycles: Use half storage for 16bit files (e.g. 16bit pngs) as well."Thomas Dinges
After discussion in IRC, 16bit int should not be converted to half, too much precision loss.
2016-08-14Cycles: Use half storage for 16bit files (e.g. 16bit pngs) as well.Thomas Dinges
Note: This only works for textures loaded from disk via OIIO, not packed textures. That's still a ToDo.
2016-08-14Cycles microdisplacement: Move call to tessellate() from addon to CyclesMai Lavelle
By calling `tessellate()` from the mesh manager in Cycles we can do pre/post processing or even threaded tessellation without concerning client side code with the details.
2016-08-14Cycles: Add single channel texture support for OpenCL.Thomas Dinges
This way OpenCL devices can also benefit from a smaller memory footprint, when using e.g. bumpmaps (greyscale, 1 channel). Additional target for my GSoC 2016.
2016-08-11Cycles: Change code order for Image Data Types.Thomas Dinges
Now we have the 4 component ones first (float4, byte4, half4) followed by the 1 component ones (float, byte, half). Makes code a bit more consistent and also reduces code a bit when enabling half support on GPU in next commit. This also exposed a typo in half CPU images for 3D textures, which wasn't used yet, but good to have that one fixed anyway.