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
2015-05-09Cycles: Change the way how we pass requested capabilities to the deviceSergey Sharybin
Previously we only had experimental flag passed to device's load_kernel() which was all fine. But since we're gonna to have some extra parameters passed there it makes sense to wrap them into a single struct, which will make it easier to pass stuff around.
2015-05-09Cycles: Set default closure values to some of the nodesSergey Sharybin
Previously it was only set at compilation time which is all fine but does not let us to check which closure the node corresponds to prior to the compilation.
2015-05-08Cleanup: Remove unused ray type flags.Thomas Dinges
They were added for completeness, but it seems we don't need them.
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-29Cycles: Fix wrong order in object flags calculationsSergey Sharybin
Object flags are depending on bounding box which is only available after mesh synchronization. This was broken since 7fd4c44 which happened quite close to the release and oddly enough was not sopped by anyone. Render test is coming for this. Was spotted by Thomas Dinges while working on another patch.
2015-04-27Cycles: Added support for light portalsLukas Stockner
This patch adds support for light portals: objects that help sampling the environment light, therefore improving convergence. Using them tor other lights in a unidirectional pathtracer is virtually useless. The sampling is done with the area-preserving code already used for area lamps. MIS is used both for combination of different portals and for combining portal- and envmap-sampling. The direction of portals is considered, they aren't used if the sampling point is behind them. Reviewers: sergey, dingto, #cycles Reviewed By: dingto, #cycles Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto Differential Revision: https://developer.blender.org/D1133
2015-04-27Cycles: Use native saturate function for CUDASergey Sharybin
This more a workaround for CUDA optimizer which can't optimize clamp(x, 0, 1) into a single instruction and uses 4 instructions instead. Original patch by @lockal with own modification: Don't make changes outside of the kernel. They don't make any difference anyway and term saturate() has a bit different meaning outside of kernel. This gives around 2% of speedup in Barcelona file, but in more complex shader setups with lots of math nodes with clamping speedup could be much nicer. Subscribers: dingto Projects: #cycles Differential Revision: https://developer.blender.org/D1224
2015-04-26Cleanup: Code style.Thomas Dinges
2015-04-26Cleanup: Update Lookup table comments.Thomas Dinges
2015-04-20Cycles: Split BVH nodes storage into inner and leaf nodesSergey Sharybin
This way we can get rid of inefficient memory usage caused by BVH boundbox part being unused by leaf nodes but still being allocated for them. Doing such split allows to save 6 of float4 values for QBVH per leaf node and 3 of float4 values for regular BVH per leaf node. This translates into following memory save using 01.01.01.G rendered without hair: Device memory size Device memory peak Global memory peak Before the patch: 4957 5051 7668 With the patch: 4467 4562 7332 The measurements are done against current master. Still need to run speed tests and it's hard to predict if it's faster or not: on the one hand leaf nodes are now much more coherent in cache, on the other hand they're not so much coherent with regular nodes anymore. Reviewers: brecht, juicyfruit Subscribers: venomgfx, eyecandy Differential Revision: https://developer.blender.org/D1236
2015-04-20Cycles: Synchronize images after building mesh BVHSergey Sharybin
This way memory overhead caused by the BVH building is not so visible and peak memory usage will be reduced. Implementing this idea is not so straightforward actually, because we need to synchronize images used for true displacement before meshes. Detecting whether image is used for true displacement is not so striaghtforward, so for now all all displacement types will synchronize images used for them. Such change brings memory usage from 4.1G to 4.0G with the 01_01_01_D scene from gooseberry. With 01_01_01_G scene it's 7.6G vs. 6.8G (before and after the patch). Reviewers: campbellbarton, juicyfruit, brecht Subscribers: eyecandy Differential Revision: https://developer.blender.org/D1217
2015-04-17Bake-API: reduce memory footprint when baking more than one object (Fix T41092)Dalai Felinto
Combine all the highpoly pixel arrays into a single array with a lookup object_id for each of the highpoly objects. Note: This changes the Bake API, external engines should refer to the bake_api.c for the latest API. Many thanks for Sergey Sharybin for the complete review, changes suggestion and feedback. (you rock!) Reviewers: sergey Subscribers: pildanovak, marcclintdion, monio, metalliandy, brecht Maniphest Tasks: T41092 Differential Revision: https://developer.blender.org/D772
2015-04-13Cleanup: styleCampbell Barton
2015-04-10Cycles: Cleanup, make more clear what camera utility functions are ↵Sergey Sharybin
private/public
2015-04-10Cycles: Make transform from viewplane a generic utility functionSergey Sharybin
2015-04-10Cycles: Add some statistics loggingSergey Sharybin
Covers number of entities in the scene (objects, meshes etc), also reports sizes of textures being allocated.
2015-04-09Cycles: Fix BVH counter on mesh updatesSergey Sharybin
2015-04-09Cycles: Fix wrong render result in certain configuration of render layer's ↵Sergey Sharybin
surface/hair There were some synchronization missing in cases when only one of those settings was disabled. Also added a render test for such configurations now.
2015-04-07Cycles: Cleanup, typosSergey Sharybin
2015-04-06Cycles: More instant feedback on progressive rendering for first sampleSergey Sharybin
Main purpose of this change is to make material preview appearing more instant after the shader tweaks.
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-04-06Fix T44222: Crash using pointiness attribute for volume shadersSergey Sharybin
This attribute is not really supported for volumes, so it get's converted to constant 0 at shader compile time. TODO: We should consider doing the same for tangent attribute in order to save some annoying checks at tracing time.
2015-03-29Optionally use c++11 stuff instead of boost in cycles where possible. We do ↵Martijn Berger
and continue to depend on boost though Reviewers: dingto, sergey Reviewed By: sergey Subscribers: #cycles Differential Revision: https://developer.blender.org/D1185
2015-03-27Cycles: Code cleanyp, sky modelSergey Sharybin
For as long as code stays in official folders it should follow our code style.
2015-03-27Cycles: Code cleanup, spaces around keywordsSergey Sharybin
This inconsistency drove me totally crazy, it's really confusing when it's inconsistent especially when you work on both Cycles and Blender sides. Shouldn;t cause merge PITA, it's whitespace changes only, Git should be able to merge it nicely.
2015-03-27Cycles: Code cleanup, make strict flags happy about disabled OSLSergey Sharybin
2015-03-27Cycles: Code cleanup, prepare for strict C++ flagsSergey Sharybin
2015-03-17Cycles: Improve readability of dumped graphsSergey Sharybin
2015-03-17Cycles: Fix displacement code creating cyclic dependencies in graphSergey Sharybin
Bump result was passed to set_normal node and then set_node was connected to all unconnected Normal inputs, including the one from original Bump node, causing cycles.
2015-03-16Fix T43999: MIS for environment broken after multi-threading commitSergey Sharybin
Typo in task start row calculation.
2015-03-12Cycles: Make Background MIS building threadedThomas Dinges
Use multiple threads for building the MIS table, if the resolution is higher than 512. Also replace division by cdf_total, with a inverse multiplication by cdf_total_inv. This gives further speedup. On my Macbook (8 CPU threads) this improves the time to build the table: Resolution 4096: From 0.16s to 0.03s Resolution 8096: From 0.61s to 0.11s This especially helps to reduce the scene update time, when tweaking world shader while viewport rendering is running. Patch by Sergey and myself. Differential Revision: https://developer.blender.org/D1159
2015-02-21Cycles: Use lower progressive update timeout for preview renderingSergey Sharybin
This ways previews are refreshing with the same ratio as job was expecting this to happen, giving more instant feedback on the changes.
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-02-21Cleanup: Put all Bump dx/dy code in the beginning here, same as with other ↵Thomas Dinges
nodes.
2015-02-20Fix T43651: New pointiness attribute doesn't work with displacementSergey Sharybin
Simple fix: just make pointiness aware of bump offset.
2015-02-19Cycles: Reduce memory used by background light updateSergey Sharybin
Simple change: just get rid of intermediate data a bit earlier, before final pixels array is being allocated. This gives around 30% of memory save during light update (this is about 60meg in the frank sheep file i'm using here). This isn't really visible by artists a lot, because actual spike happens on BVH construction. But it doesn't mean we shouldn't be accurate with memory usage in other areas.
2015-02-17Cleanup: Update comments and make it more clear what volume interpolation is ↵Thomas Dinges
for.
2015-02-15Cycles: Fix wrong attribute count calculation in prevous commitSergey Sharybin
The workaround for generated texture coordinates is to be done before calculating number of elements for attribute, otherwise counter wouldn't include those attributes.
2015-02-15Cycles: Optimize memory usage when creating mesh attributesSergey Sharybin
The idea behind the change is to pre-allocate attribute arrays in advance, which avoids re-allocation of arrays later for each of meshes being handled. This reduces peak memory used by Cycles database from 1.3G to 0.9G for victor.blend from Gooseberry. It doesn't mean every file will benefit from this change since peak memory usage is happening in the different places of the rendering code. Also, unfortunately, attributes export might not cause the peak of render preparation stage. That said, it's actually object_to_mesh() which causes the memory to peak in the same test file. So we really need to optimize that part first in order to get visible results for artists. But in any case it's now quite easy to track hotspots in Cycles itself which is good.
2015-02-15Cycles: Report system memory usage and peak after scene device updateSergey Sharybin
This only happens when built with WITH_CYCLES_DEBUG flag, memory statistics is coming from guarded STL allocator.
2015-02-10Cycles: implement pointiness geometry attributeSergey Sharybin
This attribute means how "pointy" the geometry surface is, which allows to do effects like dirt maps and wear-off effects on render geometry. This means the attribute is calculated for the final mesh which means no baking (which implies UV unwrap) is needed. Apart from this the behavior is quite close to how vertex dirty colors works. The new attribute is available as an output socket of Geometry node. There's no penalty for the render time, only some delay on scene preparation (the delay is linear of the mesh complexity). Reviewers: brecht, juicyfruit Subscribers: eyecandy, venomgfx Differential Revision: https://developer.blender.org/D1086
2015-02-05Fix T43561: Wrong include path to standard OSL headersSergey Sharybin
Issue was in fact only visible in certain circumstances: - OSL was compiled with Boost Wave - or system's cpp didn't handle space between -I and path Now made it so both wave and cpp code paths are always happy. Original patch from Shane Ambler with own modifications to mimic what variable holds on more verbose.
2015-02-02Cycles: Solve dependency between camera and object synchronizationSergey Sharybin
IN theory object might depend on camera location (spatial adaptive subdivisions for example) which became not possible to achieve after camera in volume support. Should be no functional changes for artists.
2015-01-30Cycles: Use bool for is_lead arraySergey Sharybin
This way we save 3 bytes per BVH node while building BVH, which overall gives 100Mb memory save when preparing Frank for render. It's not really much comparing to overall memory usage (which is 11Gb during scene preparation here) but still doesn't harm to have solved.
2015-01-28OSL: Updates for OSL 1.5 API changes.Thomas Dinges
* create() and destroy() are deprecated since OSL 1.5, use regular constructors / destructors.
2015-01-27Fix T43346: Window mapping is wrong in preview renderSergey Sharybin
The issue was caused by the whole viewplane used for mapping calculation which would for sure lead to differences between final camera render and viewport render from the camera view. This commit makes it so window texture mapping is the same as final render when viewing from the camera in viewport render. It's not totally clear what's the right thing to do when viewport is not in the camera view mode and that part is left unchanged.
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.
2015-01-22Cleanup / Cycles: Code de-duplication for graph node relinking.Thomas Dinges
Differential Revision: https://developer.blender.org/D1018
2015-01-21Cycles: Support tube projection for imagesSergey Sharybin
This way Cycles finally becomes feature-full on image projections compared to Blender Internal and Gooseberry Project Team could finally finish the movie.