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
diff options
context:
space:
mode:
authorStuart Broadfoot <gbroadfoot@hotmail.com>2012-12-28 18:21:30 +0400
committerStuart Broadfoot <gbroadfoot@hotmail.com>2012-12-28 18:21:30 +0400
commite9ba345c46c93a193193f01d4bfac714a666d384 (patch)
tree49df9d78dc9327de642779e300e1592e5d7b3a42 /intern/cycles/render/mesh.h
parent857df8065face58eff5556953cdf2dd72e09f2b6 (diff)
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.
Diffstat (limited to 'intern/cycles/render/mesh.h')
-rw-r--r--intern/cycles/render/mesh.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/intern/cycles/render/mesh.h b/intern/cycles/render/mesh.h
index 637143f5adf..24d3f02e082 100644
--- a/intern/cycles/render/mesh.h
+++ b/intern/cycles/render/mesh.h
@@ -50,6 +50,28 @@ public:
int v[3];
};
+ /* Mesh Strand Data*/
+ struct CurveSeg {
+ int v[2];
+ uint curveshader;
+ int curve;
+ };
+
+ struct Curve_Attribute {
+ float uv[2];
+ };
+
+ struct CurveKey {
+ float3 loc;
+ float radius;
+ float time;
+ };
+
+ /*curve data for hair - currently only contains key tangent instead*/
+ struct CurveData {
+ float3 tg;
+ };
+
/* Displacement */
enum DisplacementMethod {
DISPLACE_BUMP,
@@ -65,6 +87,11 @@ public:
vector<uint> shader;
vector<bool> smooth;
+ vector<CurveKey> curve_keys;
+ vector<CurveData> curve_keysCD;
+ vector<CurveSeg> curve_segs;
+ vector<Curve_Attribute> curve_attrib;
+
vector<uint> used_shaders;
AttributeSet attributes;
@@ -82,6 +109,9 @@ public:
size_t tri_offset;
size_t vert_offset;
+ size_t curveseg_offset;
+ size_t curvekey_offset;
+
/* Functions */
Mesh();
~Mesh();
@@ -89,6 +119,9 @@ public:
void reserve(int numverts, int numfaces);
void clear();
void add_triangle(int v0, int v1, int v2, int shader, bool smooth);
+ void add_curvekey(float3 loc, float radius, float time);
+ void add_curve(int v0, int v1, int shader, int curveid);
+ void add_curveattrib(float u, float v);
void compute_bounds();
void add_face_normals();
@@ -96,6 +129,7 @@ public:
void pack_normals(Scene *scene, float4 *normal, float4 *vnormal);
void pack_verts(float4 *tri_verts, float4 *tri_vindex, size_t vert_offset);
+ void pack_curves(Scene *scene, float4 *curve_key_co, float4 *curve_seg_keys, size_t curvekey_offset);
void compute_bvh(SceneParams *params, Progress *progress, int n, int total);
bool need_attribute(Scene *scene, AttributeStandard std);