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
2018-11-07Cycles: Added Embree as BVH option for CPU renders.Stefan Werner
Note that this is turned off by default and must be enabled at build time with the CMake WITH_CYCLES_EMBREE flag. Embree must be built as a static library with ray masking turned on, the `make deps` scripts have been updated accordingly. There, Embree is off by default too and must be enabled with the WITH_EMBREE flag. Using Embree allows for much faster rendering of deformation motion blur while reducing the memory footprint. TODO: GPU implementation, deduplication of data, leveraging more of Embrees features (e.g. tessellation cache). Differential Revision: https://developer.blender.org/D3682
2018-10-31Cycles: Fix wrong BVH used when disabling AVX2 in debug settingsSergey Sharybin
Mainly useful for debugging. Previously, when AVX2 was disabled in the debug panel but BVH layout was kept on BVH8 nothing was rendered. Needed to make it so supported BVH layout mask for devices is queried in "dynamic", so it is possible to use DebugFlags there.
2018-09-06Cycles: Allow cancel during displacement of meshesMai Lavelle
2018-07-27Cycles: Initial implementation of detailed statisticsSergey Sharybin
Gathers information about object geometry and textures. Very basic at this moment, but need to start somewhere. Things which needs to be included still: - "Runtime" information, like BVH. While it is not directly controllable by artists, it's still important to know. - Device array sizes. Again, not under artists control, but is added to the overall size. - Memory peak at different synchronization stages. At this point it simply prints info to the stdout after F12 is done, need better control over that too. Reviewers: brecht Differential Revision: https://developer.blender.org/D3566
2018-07-27Cycles: Cleanup, indentationSergey Sharybin
2018-05-21Fix too much memory usage for Cycles attribute map.Brecht Van Lommel
Thanks to Thomas Krebs for identifying the problem and solution.
2018-03-10Code cleanup: fix compiler warning.Brecht Van Lommel
2018-03-10Fix T54279: viewport update bug with volume meshes.Brecht Van Lommel
Meshes without vertex normals were not handled correctly.
2018-03-10Code refactor: reduce number of loops over meshes.Brecht Van Lommel
2018-03-10Code refactor: motion blur cleanups, preparing for next commit.Brecht Van Lommel
2018-03-10Code refactor: make Transform always affine, dropping last row.Brecht Van Lommel
This save a little memory and copying in the kernel by storing only a 4x3 matrix instead of a 4x4 matrix. We already did this in a few places, and those don't need to be special exceptions anymore now.
2018-03-03Fix T54202: Cycles crash rendering empty mesh volume after recent optimization.Brecht Van Lommel
2018-03-01Cycles volume: fast empty space optimization by generating a tight meshKévin Dietrich
around the volume. We generate a tight mesh around the active voxels of the volume in order to effectively skip empty space, and start volume ray marching as close to interesting volume data as possible. See code comments for details on how the mesh generation algorithm works. This gives up to 2x speedups in some scenes. Reviewed by: brecht, dingto Reviewers: #cycles Subscribers: lvxejay, jtheninja, brecht Differential Revision: https://developer.blender.org/D3038
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
2018-01-22Cycles: Replace use_qbvh boolean flag with an enum-based propertySergey Sharybin
This was we can introduce other types of BVH, for example, wider ones, without causing too much mess around boolean flags. Thoughs: - Ideally device info should probably return bitflag of what BVH types it supports. It is possible to implement based on simple logic in device/ and mesh.cpp, rest of the changes will stay the same. - Not happy with workarounds in util_debug and duplicated enum in kernel. Maybe enbum should be stores in kernel, but then it's kind of weird to include kernel types from utils. Soudns some cyclkic dependency. Reviewers: brecht, maxim_d33 Reviewed By: brecht Differential Revision: https://developer.blender.org/D3011
2018-01-13Code cleanup: remove test code to disable motion blur, no longer useful.Brecht Van Lommel
2017-11-09Cycles: Silence warning when building without OSLDalai Felinto
2017-11-05Cycles: fix inefficient attribute map storage, saves 615MB in victor scene.Brecht Van Lommel
2017-10-24Code refactor: move more memory allocation logic into device API.Brecht Van Lommel
* Remove tex_* and pixels_* functions, replace by mem_*. * Add MEM_TEXTURE and MEM_PIXELS as memory types recognized by devices. * No longer create device_memory and call mem_* directly, always go through device_only_memory, device_vector and device_pixels.
2017-10-24Code refactor: store device/interp/extension/type in each device_memory.Brecht Van Lommel
2017-10-21Code refactor: avoid some unnecessary device memory copying.Brecht Van Lommel
2017-10-21Code refactor: simplify image device memory allocation.Brecht Van Lommel
2017-10-18Cycles: Fix wrong shading when some mesh triangle has non-finite coordinateSergey Sharybin
This is fully unpredictable for artists when one damaged object makes the whole scene to render incorrectly. This involves two main changes: - It is not enough to check triangle bounds to be valid when building BVH. This is because triangle might have some finite vertices and some non-finite. - We shouldn't add non-finite triangle area to the overall area for MIS.
2017-10-11Cycles: Add utility function to calculate triangle's normalSergey Sharybin
2017-10-08Code refactor: use DeviceInfo to enable QBVH and decoupled volume shading.Brecht Van Lommel
2017-08-08Cycles: Pack kernel textures into buffers for OpenCLMai Lavelle
Image textures were being packed into a single buffer for OpenCL, which limited the amount of memory available for images to the size of one buffer (usually 4gb on AMD hardware). By packing textures into multiple buffers that limit is removed, while simultaneously reducing the number of buffers that need to be passed to each kernel. Benchmarks were within 2%. Fixes T51554. Differential Revision: https://developer.blender.org/D2745
2017-05-07Cycles: Implement denoising option for reducing noise in the rendered imageLukas Stockner
This commit contains the first part of the new Cycles denoising option, which filters the resulting image using information gathered during rendering to get rid of noise while preserving visual features as well as possible. To use the option, enable it in the render layer options. The default settings fit a wide range of scenes, but the user can tweak individual settings to control the tradeoff between a noise-free image, image details, and calculation time. Note that the denoiser may still change in the future and that some features are not implemented yet. The most important missing feature is animation denoising, which uses information from multiple frames at once to produce a flicker-free and smoother result. These features will be added in the future. Finally, thanks to all the people who supported this project: - Google (through the GSoC) and Theory Studios for sponsoring the development - The authors of the papers I used for implementing the denoiser (more details on them will be included in the technical docs) - The other Cycles devs for feedback on the code, especially Sergey for mentoring the GSoC project and Brecht for the code review! - And of course the users who helped with testing, reported bugs and things that could and/or should work better!
2017-05-04Fix T51412: Instant crash with texture plugged into the Displacement outputSergey Sharybin
The issue was caused by unlimited textures commit, root of the issue is that displacement code updates some of the image slots directly, so it needs to ensure device vectors are all proper size.
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-02-15Cycles: Pass special flag whether BVH motion steps are usedSergey Sharybin
Doesn't currently change anything, but would need for some future work here. It uses existing padding in kernel BVH structure, so there is nothing changed memory-wise.
2017-02-15Cycles: Fix wrong hair render results when using BVH motion stepsSergey Sharybin
The issue here was mainly coming from minimal pixel width feature which is quite commonly enabled in production shots. This feature will use some probabilistic heuristic in the curve intersection function to check whether we need to return intersection or not. This probability is calculated for every intersection check. Now, when we use multiple BVH nodes for curve primitives we increase probability of that primitive to be considered a good intersection for us. This is similar to increasing minimal width of curve. What is worst here is that change in the intersection probability fully depends on exact layout of BVH, meaning probability might change differently depending on a view angle, the way how builder binned the primitives and such. This makes it impossible to do simple check like dividing probability by number of BVH steps. Other solution might have been to split BVH into fully independent trees, but that will increase memory usage of all the static objects in the scenes, which is also not something desirable. For now used most simple but robust approach: store BVH primitives time and test it in curve intersection functions. This solves the regression, but has two downsides: - Uses more memory. which isn't surprising, and ANY solution to this problem will use more memory. What we still have to do is to avoid this memory increase for cases when we don't use BVH motion steps. - Reduces number of maximum available textures on pre-kepler cards. There is not much we can do here, hardware gets old but we need to move forward on more modern hardware..
2017-01-20Cycles: Add option to split triangle motion primitives by time stepsSergey Sharybin
Similar to the previous commit, the statistics goes as: BVH Steps Render time (sec) Memory usage (MB) 0 46 260 1 27 373 2 18 598 3 15 826 Scene used for the tests is the agent's body from one of the barber shop scenes (no textures or anything, just a diffuse material). Once again this is limited to regular (non-spatial split) BVH, Support of spatial split to this feature will come later.
2017-01-20Cycles: Add utility function to calculate curve boundbox from given 4 keysSergey Sharybin
Also fixed some issues with motion keys calculation: - Clamp lower and upper limits of curves so we can safely call those functions for the very first and very last curve segment. - Fixed wrong indexing for the curve radius array. - Fixed wrong motion attribute offset calculation.
2017-01-20Cycles: Add utility function to fetch motion keys while on CPU sideSergey Sharybin
2017-01-20Cycles: Cleanup, commentsSergey Sharybin
2017-01-20Cycles: Add utility function to fetch motion triangle when on CPU sideSergey Sharybin
2017-01-20Cycles: Cleanup, delete trailing whitespaceSergey Sharybin
2016-11-22Cycles: Implement texture size limit simplify optionSergey Sharybin
Main intention is to give some quick way to control scene's memory usage by clamping textures which are too big. This is really handy on the early production stages when you first create really nice looking hi-res textures and only when it all works and approved start investing time on optimizing your scene. This is a new option in Scene Simplify panel and it acts as following: when texture size is bigger than the given value it'll be scaled down by half for until it fits into given limit. There are various possible improvements, such as: - Use threaded scaling using our own task manager. This is actually one of the main reasons why image resize is manually-implemented instead of using OIIO's resize. Other reason here is that API seems limited to construct 3D texture description easily. - Vectorization of uchar4/float4/half4 textures. - Use something smarter than box filter. Was playing with some other filters, but not sure they are really better: they kind of causes more fuzzy edges. Even with such a TODOs in the code the option is already quite useful. Reviewers: brecht Reviewed By: brecht Subscribers: jtheninja, Blendify, gregzaal, venomgfx Differential Revision: https://developer.blender.org/D2362
2016-11-20Cycles: Don't shadow loop variableMai Lavelle
2016-10-24Cycles: Cleanup, styleSergey Sharybin
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-05Fix T49252: Crash when image textures used with true displacementMai Lavelle
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-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 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-18Code cleanup to use array.data() rather than &array[0]Brecht Van Lommel
(Now without the build errors)