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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-01-24 16:11:15 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-01-24 16:11:15 +0300
commit02145966a849c708f3bf89ca1276b673210d1e7c (patch)
tree23af27a637c5dac81de734e06b2ae7e3cb949d66 /source/blender/render/intern/include
parent18ab78c867216b877cb4423e8a2c82591d96fd8b (diff)
Fix for strand render + simplification + vector blur. With the number
of strands changing between frames, vector blur couldn't work. Now speed vectors are interpolated from the surface. This also means child particles don't have to be computed in the previous and next frames, so saves time too.
Diffstat (limited to 'source/blender/render/intern/include')
-rw-r--r--source/blender/render/intern/include/occlusion.h2
-rw-r--r--source/blender/render/intern/include/render_types.h16
-rw-r--r--source/blender/render/intern/include/strand.h6
3 files changed, 20 insertions, 4 deletions
diff --git a/source/blender/render/intern/include/occlusion.h b/source/blender/render/intern/include/occlusion.h
index 3f10d50ab2e..646ad30b318 100644
--- a/source/blender/render/intern/include/occlusion.h
+++ b/source/blender/render/intern/include/occlusion.h
@@ -45,7 +45,5 @@ void sample_occ(struct Render *re, struct ShadeInput *shi);
void cache_occ_samples(struct Render *re, struct RenderPart *pa, struct ShadeSample *ssamp);
void free_occ_samples(struct Render *re, struct RenderPart *pa);
-void *cache_occ_mesh(struct Render *re, struct ObjectRen *obr, struct DerivedMesh *dm, float mat[][4]);
-
#endif
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 46b5face22a..16c46ec550f 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -161,7 +161,7 @@ struct Render
/* occlusion tree */
void *occlusiontree;
- ListBase occlusionmesh;
+ ListBase strandsurface;
/* use this instead of R.r.cfra */
float cfra;
@@ -337,6 +337,18 @@ typedef struct StrandVert {
float strandco;
} StrandVert;
+typedef struct StrandSurface {
+ struct StrandSurface *next, *prev;
+ ObjectRen obr;
+ int (*face)[4];
+ float (*co)[3];
+ /* for occlusion caching */
+ float (*col)[3]; /* for occlusion */
+ /* for speedvectors */
+ float (*prevco)[3], (*nextco)[3];
+ int totvert, totface;
+} StrandSurface;
+
typedef struct StrandBuffer {
struct StrandBuffer *next, *prev;
struct StrandVert *vert;
@@ -344,7 +356,7 @@ typedef struct StrandBuffer {
struct ObjectRen *obr;
struct Material *ma;
- void *occlusionmesh;
+ struct StrandSurface *surface;
unsigned int lay;
int overrideuv;
int flag, maxdepth;
diff --git a/source/blender/render/intern/include/strand.h b/source/blender/render/intern/include/strand.h
index f1c0b6d1e3a..8e34fa27342 100644
--- a/source/blender/render/intern/include/strand.h
+++ b/source/blender/render/intern/include/strand.h
@@ -44,6 +44,9 @@ struct RenderBuckets;
struct RenderPrimitiveIterator;
struct ZSpan;
struct ObjectInstanceRen;
+struct StrandSurface;
+struct DerivedMesh;
+struct ObjectRen;
typedef struct StrandPoint {
/* position within segment */
@@ -89,6 +92,9 @@ void strand_eval_point(StrandSegment *sseg, StrandPoint *spoint);
void render_strand_segment(struct Render *re, float winmat[][4], struct StrandPart *spart, struct ZSpan *zspan, int totzspan, StrandSegment *sseg);
void project_strands(Render *re, void (*projectfunc)(float *, float mat[][4], float *), int do_pano, int do_buckets);
+struct StrandSurface *cache_strand_surface(struct Render *re, struct ObjectRen *obr, struct DerivedMesh *dm, float mat[][4], int timeoffset);
+void free_strand_surface(struct Render *re);
+
struct RenderBuckets *init_buckets(struct Render *re);
void add_buckets_primitive(struct RenderBuckets *buckets, float *min, float *max, void *prim);
void free_buckets(struct RenderBuckets *buckets);