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
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-08Cycles: Remove ccl_fetch and SOAMai Lavelle
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-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-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-07-31Cycles: constant folding for RGB/Vector Curves and Color Ramp.Alexander Gavrilov
These are complex nodes, and it's conceivable they may end up constant in some circumstances within node groups, so folding support is useful. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2084
2016-06-19Cycles: add constant folding for more color operation nodes.Alexander Gavrilov
Invert, brightness & constrast, separate/combine and Mix RGB blend modes and clamping.
2016-05-05Code cleanup: simplify SVM stack assignment.Brecht Van Lommel
2016-02-15Cycles: Initial support of 3D textures for CUDA renderingSergey Sharybin
Supports both smoke/fire and point density textures now. Reduces number of textures available for sm_20 and sm_21, but you have to compromise somewhere on such a limited hardware. Currently limited to linear interpolation only, and decoupled ray marching is not supported yet. Think those could be considered just a further improvement. Some quick example: https://developer.blender.org/F282934 Code is minimal and we can fully consider it a fix for missing support of 3D textures with CUDA. Reviewers: lukasstockner97, brecht, juicyfruit, dingto Reviewed By: brecht, juicyfruit, dingto Subscribers: mib2berlin Differential Revision: https://developer.blender.org/D1806
2016-01-07Cycles: Refactor how we pass bounce info to light path node.Thomas Dinges
This commit changes the way how we pass bounce information to the Light Path node. Instead of manualy copying the bounces into ShaderData, we now directly pass PathState. This reduces the arguments that we need to pass around and also makes it easier to extend the feature. This commit also exposes the Transmission Bounce Depth to the Light Path node. It works similar to the Transparent Depth Output: Replace a Transmission lightpath after X bounces with another shader, e.g a Diffuse one. This can be used to avoid black surfaces, due to low amount of max bounces. Reviewed by Sergey and Brecht, thanks for some hlp with this. I tested compilation and usage on CPU (SVM and OSL), CUDA, OpenCL Split and Mega kernel. Hopefully this covers all devices. :)
2015-07-21Cycles: Workaround for sm_50 on 32bit platformSergey Sharybin
Basically this commit totally disables new SVN Voxel node, which solves some of the compiler's issues.
2015-07-18Cycles: Add voxel texture sampler shader nodeSergey Sharybin
The idea of this node is to sampling of 3D voxels at a given coordinate supporting different mapping strategies (world space mapping, object local space etc). Currently not in use, it's a preparation step for supporting point density textures.
2015-06-01Cycles: Assert in the cases when SVM node was not handledSergey Sharybin
This will help figuring out cases when node was not properly handled by the SVM by aborting execution on CPU, where all the nodes are expected to be supported.
2015-06-01Cycles: Implement selective nodes compilationSergey Sharybin
This commits finishes initial selective nodes compilation into kernel, which helps a lot performance-wise for AMD OpenCL kernels. Split by node groups is based on statistics from simple scenes like BMW and more complex scenes like mango and gooseberry production files. Further tweaks are always possible, but it should be a good starting point. TODO: Still need to ignore unused nodes when calculating requested shader features.
2015-06-01Cycles: Fix some typos in the selective modes compilationSergey Sharybin
2015-05-09Cycles: OpenCL kernel splitGeorge Kyriazis
This commit contains all the work related on the AMD megakernel split work which was mainly done by Varun Sundar, George Kyriazis and Lenny Wang, plus some help from Sergey Sharybin, Martijn Berger, Thomas Dinges and likely someone else which we're forgetting to mention. Currently only AMD cards are enabled for the new split kernel, but it is possible to force split opencl kernel to be used by setting the following environment variable: CYCLES_OPENCL_SPLIT_KERNEL_TEST=1. Not all the features are supported yet, and that being said no motion blur, camera blur, SSS and volumetrics for now. Also transparent shadows are disabled on AMD device because of some compiler bug. This kernel is also only implements regular path tracing and supporting branched one will take a bit. Branched path tracing is exposed to the interface still, which is a bit misleading and will be hidden there soon. More feature will be enabled once they're ported to the split kernel and tested. Neither regular CPU nor CUDA has any difference, they're generating the same exact code, which means no regressions/improvements there. Based on the research paper: https://research.nvidia.com/sites/default/files/publications/laine2013hpg_paper.pdf Here's the documentation: https://docs.google.com/document/d/1LuXW-CV-sVJkQaEGZlMJ86jZ8FmoPfecaMdR-oiWbUY/edit Design discussion of the patch: https://developer.blender.org/T44197 Differential Revision: https://developer.blender.org/D1200
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-07Cycles: Cleanup, make it more clear what endif closes what ifdefSergey Sharybin
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-03-31Cycles: Avoid float/int conversion in few placesSergey Sharybin
2015-02-21Fix T43755: Wireframe attribute doesn't work with displaceSergey Sharybin
This attribute missed derivatives calculation. Not totally sure what's the proper approach for algebraic derivative calculation, so calculating them by definition. This isn't fastest way to do it in this case and could be replaced with some smarter magic in the wireframe calculation loop. At least currently implemented approach is better than nothing.
2015-01-29Cycles: Fix for bump node not working with object texture mappingSergey Sharybin
This was intended to be in the original patch of texco copy from object.
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
2014-12-25Cleanup: Fix Cycles Apache header.Thomas Dinges
This was already mixed a bit, but the dot belongs there.
2014-10-29Cycles: Optimize math node without links to a single value nodeSergey Sharybin
Pretty straightforward implementation. Just needed to move some functions around to make them available at shader compile time.
2014-08-21Further cleanup for defines:Thomas Dinges
* Merge Texture defines * Remove Normal Map define.
2014-08-21Cleanup: Remove __ANISOTROPIC__ define.Thomas Dinges
That was only needed in the beginning, when we did not had support for tangents. It's time to clean some of the defines up, it's getting a bit too much.
2014-06-14Code cleanup: Avoid duplicate functions for vector combination/separation in ↵Thomas Dinges
SVM. Differential Revision: https://developer.blender.org/D597
2014-06-13Cycles: Add dedicated nodes to split/combine vectors.Thomas Dinges
This was already possible via the RGB nodes, but that seems weird.
2014-05-30Cleanup: Remove unused total power Emission code in Cycles, that was never ↵Thomas Dinges
exposed in the UI. Differential Revision: https://developer.blender.org/D562
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-18Cycles: SVM optimization for mix shaders, to skip more code when the mix weightBrecht Van Lommel
for one of the input shaders is zero. This gives about 5% speedup for koro_final.blend. In general this is important so you can design shaders that run faster for shadows, diffuse bounces, etc, for example by skipping procedural textures or even using a single fixed color.
2013-12-28Cycles Volume Render: add support for overlapping volume objects.Brecht Van Lommel
This works pretty much as you would expect, overlapping volume objects gives a more dense volume. What did change is that world volume shaders are now active everywhere, they are no longer excluded inside objects. This may not be desirable and we need to think of better control over this. In some cases you clearly want it to happen, for example if you are rendering a fire in a foggy environment. In other cases like the inside of a house you may not want any fog, but it doesn't seem possible in general for the renderer to automatically determine what is inside or outside of the house. This is implemented using a simple fixed size array of shader/object ID pairs, limited to max 15 overlapping objects. The closures from all shaders are put into a single closure array, exactly the same as if an add shader was used to combine them.
2013-11-18Cycles: change __device and similar qualifiers to ccl_device in kernel code.Brecht Van Lommel
This to avoids build conflicts with libc++ on FreeBSD, these __ prefixed values are reserved for compilers. I apologize to anyone who has patches or branches and has to go through the pain of merging this change, it may be easiest to do these same replacements in your code and then apply/merge the patch. Ref T37477.
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-07-04Cycles:Thomas Dinges
* Added 2 new nodes to combine and separate HSV colors. Screenshot: http://www.pasteall.org/pic/show.php?id=54828
2013-06-23Cycles / Vector Transform Node:Thomas Dinges
* Implementation of Vector Transform Node into Cycles. * OSL backend is done, SVM needs the matrices still.
2013-06-16Merged revision(s) 57423-57498 from trunk/blender into soc-2013-dingtoThomas Dinges
2013-06-16Cycles / Blackbody node:Thomas Dinges
* First (brute force) implementation for SVM. This works and delivers the same result as OSL, but it's slow. * Code inside svm_blackbody.h inspired by a patch by Philipp Oeser (#35698), thanks. Ideas: * Use a lookup table to perform the calculations on render/ level. * Implement it as a RNA property only, and do the calculation like Sun/Sky precompute.
2013-06-14Cycles:Thomas Dinges
* Style cleanup for M_PI constants. * Move Wireframe node into __EXTRA_NODES__ define
2013-06-10Cycles / Wavelength to RGB node:Thomas Dinges
* Added a node to convert wavelength (in nanometer, from 380nm to 780nm) to RGB values. This can be useful to match real world colors easier. Example render: http://www.pasteall.org/pic/show.php?id=53202 ToDo: * Move some functions into an util file, maybe a common util_color.h or so. * Test GPU, unfortunately sm_21 doesn't work for me yet.
2013-06-08Cycles: window texture coordinates now work with orthographic cameras, thisBrecht Van Lommel
was an old issue since the first version.
2013-06-07Code cleanup: avoid some warnings due to implicit uint/int/float/double ↵Brecht Van Lommel
conversion.
2013-05-20Cycles / Wireframe node:Thomas Dinges
* Added a wireframe node (Input category) to get access to Mesh wireframe data. The thickness can be controlled via a "Size" parameter, and is available in world units (default) and screen pixel size. * Only the triangulated mesh is available now, quads is for later. Documentation: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Wireframe Render and Example file: http://www.pasteall.org/pic/show.php?id=51731 http://www.pasteall.org/blend/21510
2013-05-20Code Cleanup / Cycles:Thomas Dinges
* Remove an unused parameter from Checker texture and correct a typo in license header.
2012-12-28New featureStuart Broadfoot
Patch [#33445] - Experimental Cycles Hair Rendering (CPU only) This patch allows hair data to be exported to cycles and introduces a new line segment primitive to render with. The UI appears under the particle tab and there is a new hair info node available. It is only available under the experimental feature set and for cpu rendering.
2012-12-11Cycles: RGB and Vector Curves nodes now supported, with the limitation that theBrecht Van Lommel
range must be left to the default (0..1 and -1..1).
2012-11-30Fix cycles CUDA sm 1.3 build with 32 bit compiler, tweaked voronoiBrecht Van Lommel
and brick code so that it can be uninlined.
2012-11-06Cycles: 4 new nodes.Brecht Van Lommel
* Tangent: generate a tangent direction for anisotropic shading. Can be either radial around X/Y/Z axis, or from a UV map. The default tangent for the anisotropic BSDF and geometry node is now always radial Z, for UV tangent use this node now. http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Tangent * Normal Map: generate a perturbed normal from an RGB normal map image. This is usually chained with an Image Texture node in the color input, to specify the normal map image. For tangent space normal maps, the UV coordinates for the image must match, and the image texture should be set to Non-Color mode to give correct results. http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Normal_Map * Refraction BSDF: for best results this node should be considered as a building block and not be used on its own, but rather mixed with a glossy node using a fresnel type factor. Otherwise it will give quite dark results at the edges for glossy refraction. http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Refraction * Ambient Occlusion: controls the amount of AO a surface receives, rather than having just a global factor in the world. Note that this outputs a shader and not a color, that's for another time. http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Ambient_Occlusion