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-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-07-06Cleanup: strip trailing space for cyclesCampbell Barton
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: motion blur cleanups, preparing for next commit.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
2017-11-05Cycles: fix inefficient attribute map storage, saves 615MB in victor scene.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-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!
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: Add utility function to fetch motion triangle when on CPU sideSergey Sharybin
2016-09-02Cycles: Store undisplaced coordinates for meshes when neededMai Lavelle
Reviewed By: brecht Differential Revision: https://developer.blender.org/D2156
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-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-08-07Cycles microdisplacement: Support for Catmull-Clark subdivision via OpenSubdivMai Lavelle
Enables Catmull-Clark subdivision meshes with support for creases and attribute subdivision. Still waiting on OpenSubdiv to fully support face varying interpolation for subdividing uv coordinates tho. Also there may be some inconsistencies with Blender's subdivision which will be resolved at a later time. Code for reading patch tables and creating patch maps is borrowed from OpenSubdiv. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2111
2016-07-29Cycles microdisplacement: move subdivision options to subsurf modifierMai Lavelle
Subdivision options can now be found in the subsurf modifier. The modifier must be the last in the stack or the options will be unavailable. Catmull-Clark subdivision is still unavailable and will fallback to linear subdivision instead Reviewed By: brecht Differential Revision: https://developer.blender.org/D2109
2016-07-29Cycles microdisplacement: ngons and attributes for subdivision meshesMai Lavelle
This adds support for ngons and attributes on subdivision meshes. Ngons are needed for proper attribute interpolation as well as correct Catmull-Clark subdivision. Several changes are made to achieve this: - new primitive `SubdFace` added to `Mesh` - 3 more textures are used to store info on patches from subd meshes - Blender export uses loop interface instead of tessface for subd meshes - `Attribute` class is updated with a simplified way to pass primitive counts around and to support ngons. - extra points for ngons are generated for O(1) attribute interpolation - curves are temporally disabled on subd meshes to avoid various bugs with implementation - old unneeded code is removed from `subd/` - various fixes and improvements Reviewed By: brecht Differential Revision: https://developer.blender.org/D2108
2016-07-28Cycles: Fix missing mesh flags update when tweaking shadersSergey Sharybin
This is a bit weak, but better than tagging whole mesh manager for update. Maybe we'll solve such dual-look up in the future. This commit finally solves T48963: Noise when changing Diffuse node to Emission node
2016-07-28Cycles: De-duplicate check for MIS shaders in meshesSergey Sharybin
Should be no functional changes.
2016-07-07Cycles: Implement unaligned nodes BVH builderSergey Sharybin
This is a special builder type which is allowed to orient nodes to strands direction, hence minimizing their surface area in comparison with axis-aligned nodes. Such nodes are much more efficient for hair rendering. Implementation of BVH builder is based on Embree, and generally idea there is to calculate axis-aligned SAH and oriented SAH and if SAH of oriented node is smaller than axis-aligned SAH we create unaligned node. We store both aligned and unaligned nodes in the same tree (which seems to be different from what Embree is doing) so we don't have any any extra calculations needed to set up hair ray for BVH traversal, hence avoiding any possible negative effect of this new BVH nodes type. This new builder is currently not in use, still need to make BVH traversal code aware of unaligned nodes.
2016-07-07Cycles: Reduce memory usage by de-duplicating triangle storageSergey Sharybin
There are several internal changes for this: First idea is to make __tri_verts to behave similar to __tri_storage, meaning, __tri_verts array now contains all vertices of all triangles instead of just mesh vertices. This saves some lookup when reading triangle coordinates in functions like triangle_normal(). In order to make it efficient needed to store global triangle offset somewhere. So no __tri_vindex.w contains a global triangle index which can be used to read triangle vertices. Additionally, the order of vertices in that array is aligned with primitives from BVH. This is needed to keep cache as much coherent as possible for BVH traversal. This causes some extra tricks needed to fill the array in and deal with True Displacement but those trickery is fully required to prevent noticeable slowdown. Next idea was to use this __tri_verts instead of __tri_storage in intersection code. Unfortunately, this is quite tricky to do without noticeable speed loss. Mainly this loss is caused by extra lookup happening to access vertex coordinate. Fortunately, tricks here and there (i,e, some types changes to avoid casts which are not really coming for free) reduces those losses to an acceptable level. So now they are within couple of percent only, On a positive site we've achieved: - Few percent of memory save with triangle-only scenes. Actual save in this case is close to size of all vertices. On a more fine-subdivided scenes this benefit might become more obvious. - Huge memory save of hairy scenes. For example, on koro.blend there is about 20% memory save. Similar figure for bunny.blend. This memory save was the main goal of this commit to move forward with Hair BVH which required more memory per BVH node. So while this sounds exciting, this memory optimization will become invisible by upcoming Hair BVH work. But again on a positive side, we can add an option to NOT use Hair BVH and then we'll have same-ish render times as we've got currently but will have this 20% memory benefit on hairy scenes.
2016-05-31Cycles: Fixes for recent refactorSergey Sharybin
- add_vertex() can be called from split_vertex() which does not guarantee to have properly pre-allocate arrays. - Need to check whether Cycles is compiled with OSL in XML reader.
2016-05-31Fix broken Cycles curve motion radius after recent refactor, and fix warnings.Brecht Van Lommel
2016-05-28Code refactor: nodify object and mesh, but not used for XML yet.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D2016
2016-05-28Code refactor: modify mesh storage to use arrays rather than vectors, ↵Brecht Van Lommel
separate some arrays. Differential Revision: https://developer.blender.org/D2016
2016-05-17Code refactor: use shader pointers rather than shader indexes.Brecht Van Lommel
2016-04-12Cycles microdisplacement: refactor to move some tesselation code from ↵Mai Lavelle
SubdMesh to Mesh Reviewed By: brecht Differential Revision: https://developer.blender.org/D1915
2016-03-25Cycles: Use dedicated BVH for subsurface ray castingSergey Sharybin
This commit makes it so casting subsurface rays will totally ignore all the BVH nodes and primitives which do not belong to a current object, making it much simpler traversal code and reduces number of intersection tests. Reviewers: brecht, juicyfruit, dingto, lukasstockner97 Differential Revision: https://developer.blender.org/D1823
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
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-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-01-19Fix T43311: using displacement shader crashes blenderSergey Sharybin
Issue was caused by wrong order of scene device update, which could lead to missing object flags in shader kernel. This patch solves a bit more than that making sure objects flags are always properly updated, so adding/removing volume BSDF will properly reflect on viewport where camera might become being in volume and so.
2014-12-25Cleanup: Fix Cycles Apache header.Thomas Dinges
This was already mixed a bit, but the dot belongs there.
2014-10-02Cycles: optimization of panoramic camera in volumeSergey Sharybin
Now we do much better preliminary check for panoramic camera is inside the volume object boundings. Also we're now cacheing the has_volume in the mesh, which makes it unneeded iterations for each object's shaders. Should be no functional changes, just faster sync and panoramic-in-volume rendering.
2014-09-24make "tri_shader" an int instead of a floatMartijn Berger
tri_shader does no longer need to a float. Reviewers: dingto, sergey Reviewed By: dingto, sergey Subscribers: dingto Projects: #cycles Differential Revision: https://developer.blender.org/D789
2014-08-25Fix T41532: Some files bounce back and forth between 'packing BVH nodes' and ↵Sergey Sharybin
'Copying Transforms to Device' This was originally caused by a6ae12a where i didn't foresee unclear distinguishing between empty and non-synced meshes will give issues for the viewport. They're the same for final rendering, but for viewport we need to be accurate here.
2014-06-13Cycles: Calculate face normal on the fly.Thomas Dinges
Instead of pre-calculation and storage, we now calculate the face normal during render. This gives a small slowdown (~1%) but decreases memory usage, which is especially important for GPUs, where you have limited VRAM. Part of my GSoC 2014.
2014-04-13Split Normals I (5/5): Add support of split normals to Cycles.Bastien Montagne
Idea and code by Brecht, many thanks! Reviewers: brecht Reviewed By: brecht CC: campbellbarton, dingto Differential Revision: https://developer.blender.org/D369
2014-03-29Cycles: add support for mesh deformation motion blur.Brecht Van Lommel
2014-03-29Cycles code refactor: change curve key to float4 for easier storage as ↵Brecht Van Lommel
attribute.
2014-03-29Cycles code refactor: add support for motion vertex attributes.Brecht Van Lommel
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-14Fix some unnecessary memory allocation slowness in cycles mesh export.Brecht Van Lommel