Commit Graph

18 Commits

Author SHA1 Message Date
Sergey Sharybin
0579eaae1f Cycles: Make all #include statements relative to cycles source directory
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-29 13:41:11 +02:00
c96a4c8a2a Code refactor: modify mesh storage to use arrays rather than vectors, separate some arrays.
Differential Revision: https://developer.blender.org/D2016
2016-05-28 18:31:00 +02:00
Sergey Sharybin
28604c46a1 Cycles: Make Blender importer more forward compatible
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
2016-02-12 15:27:33 +01:00
Thomas Dinges
ee36e75b85 Cleanup: Fix Cycles Apache header.
This was already mixed a bit, but the dot belongs there.
2014-12-25 02:50:24 +01:00
Thomas Dinges
5c06b2d33e Code cleanup / Cycles: Remove encasing_ratio variable, it was already hard coded, so define it in the kernel only. 2014-02-02 19:53:04 +01:00
Thomas Dinges
03fed41e59 Cycles / Hair: Further cleanup of UI and internals.
* UI: Remove deprecated condition (CURVE_RIBBONS) and hide backface property, when it's hardcoded in C (Curve/Line segments && Ribbons).

* Remove "use_tangent_normal" and "CURVE_KN_TANGENTGNORMAL" as its unused (follow up for last commit).
2013-12-26 03:25:30 +01:00
Thomas Dinges
427105e425 Code cleanup / Cycles: Remove unused interpolation code for hair triangles, we only support cardinal curves. 2013-12-22 14:14:09 +01:00
Thomas Dinges
b43ce8a140 Code cleanup / Cycles: Remove some unused hair code. 2013-12-14 13:11:44 +01:00
Thomas Dinges
605f7f4b9f Code cleanup / Cycles:
* Remove unused hair presets enum.
2013-08-20 11:22:26 +00:00
Brecht Van Lommel
b9ce231060 Cycles: relicense GNU GPL source code to Apache version 2.0.
More information in this post:
http://code.blender.org/

Thanks to all contributes for giving their permission!
2013-08-18 14:16:15 +00:00
Stuart Broadfoot
2fd11a6617 Updates for the Cycle Hair UI. With the following changes
- Removed the cycles subdivision and interpolation of hairkeys.
- Removed the parent settings.
- Removed all of the advanced settings and presets.
- This simplifies the UI to a few settings for the primitive type and a shape mode.
2013-08-18 13:41:53 +00:00
Stuart Broadfoot
638b084f82 Cycles Hair: Strand Minimum Pixel Size
Code is added to restrict the pixel size of strands in cycles. It works best with ribbon primitives and a preset for these is included. It uses distance dependent expansion of the strands and then stochastic strand removal to give a fading. To prevent a slowdown for triangle mesh objects in the BVH an extra visibility flag has been added. It is also only applied for camera rays.

The strand width settings are also changed, so that the particle size is not included in the width calculation. Instead there is a separate particle system parameter for width scaling.
2013-04-15 21:38:31 +00:00
Stuart Broadfoot
35e89d9cfc Cycles Hair: Fixed hair shape and inclusion of multiple attributes for triangle primitives
When using triangle primitives this fix enables 'closed tip'. 

UVs and vertex colours are added when using triangle primitives for hair.

Two new preset modes have also been included to allow easy access to curves and triangle planes.
2013-02-02 01:49:57 +00:00
Stuart Broadfoot
976c6b7b6e Cycles Hair: Multiple vertex colours and UV coordinates
Added export of multiple UV coordinates and vertex colour attributes.

A debugging option to export the strands without using the cache has also been removed.
2013-01-23 17:15:45 +00:00
Stuart Broadfoot
3373b8154b Cycles Hair: Introduction of Cardinal Spline Curve Segments and minor fixes.
The curve segment primitive has been added. This includes an intersection function and changes to the BVH.

A few small errors in the line segment intersection routine are also fixed.
2013-01-15 19:44:41 +00:00
Stuart Broadfoot
ec33cacc62 Added vertex color attributes (currently limited to one) and UVs included for triangle mesh hair.
I have also included a small speedup for the intersection test.
2013-01-04 12:44:38 +00:00
Brecht Van Lommel
57cf48e7c6 Cycles Hair: refactoring to support generic attributes for hair curves. There
should be no functional changes yet. UV, tangent and intercept are now stored
as attributes, with the intention to add more like multiple uv's, vertex
colors, generated coordinates and motion vectors later.

Things got a bit messy due to having both triangle and curve data in the same
mesh data structure, which also gives us two sets of attributes. This will get
cleaned up when we split the mesh class.
2013-01-03 12:08:54 +00:00
Stuart Broadfoot
e9ba345c46 New feature
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-28 14:21:30 +00:00