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-29 15:20:42 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-01-29 15:20:42 +0300
commit8e94028ed57861595e959d30476a74c48868a991 (patch)
tree6e773858db822dba27b314f76356650a67418462 /source/blender/render/intern/include
parent5bf5b030e5dd87d4ff80fc44a5b5fb242ad385c2 (diff)
Bounding box clipping in the render engine.
Now bounding boxes are computed per object, and checked first before zbuffering objects. For strands, bounding boxes are computed per original face in the mesh. Overall the speed improvement from this is quite small (zbuffering is rarely the bottleneck), but it seems a sensible thing to do anyway.
Diffstat (limited to 'source/blender/render/intern/include')
-rw-r--r--source/blender/render/intern/include/render_types.h11
-rw-r--r--source/blender/render/intern/include/renderdatabase.h1
-rw-r--r--source/blender/render/intern/include/strand.h1
3 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 3a8a491a852..7b68552e5fb 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -247,13 +247,15 @@ typedef struct ObjectRen {
struct Scene *sce;
int index, psysindex, flag, lay;
+ float boundbox[2][3];
+
int totvert, totvlak, totstrand, tothalo;
int vertnodeslen, vlaknodeslen, strandnodeslen, blohalen;
struct VertTableNode *vertnodes;
struct VlakTableNode *vlaknodes;
struct StrandTableNode *strandnodes;
struct HaloRen **bloha;
- ListBase strandbufs;
+ struct StrandBuffer *strandbuf;
char (*mtface)[32];
char (*mcol)[32];
@@ -346,7 +348,7 @@ typedef struct StrandSurface {
int (*face)[4];
float (*co)[3];
/* for occlusion caching */
- float (*col)[3]; /* for occlusion */
+ float (*col)[3];
/* for speedvectors */
float (*prevco)[3], (*nextco)[3];
int totvert, totface;
@@ -354,13 +356,14 @@ typedef struct StrandSurface {
typedef struct StrandBound {
int start, end;
- float bbox[2][3];
+ float boundbox[2][3];
} StrandBound;
typedef struct StrandBuffer {
struct StrandBuffer *next, *prev;
struct StrandVert *vert;
- int totvert;
+ struct StrandBound *bound;
+ int totvert, totbound;
struct ObjectRen *obr;
struct Material *ma;
diff --git a/source/blender/render/intern/include/renderdatabase.h b/source/blender/render/intern/include/renderdatabase.h
index cfcbb4e7775..a204aa7876b 100644
--- a/source/blender/render/intern/include/renderdatabase.h
+++ b/source/blender/render/intern/include/renderdatabase.h
@@ -85,6 +85,7 @@ void free_renderdata_vlaknodes(struct VlakTableNode *vlaknodes);
void set_normalflags(struct Render *re, struct ObjectRen *obr);
void project_renderdata(struct Render *re, void (*projectfunc)(float *, float mat[][4], float *), int do_pano, float xoffs, int do_buckets);
+int clip_render_object(float boundbox[][3], float *bounds, float mat[][4]);
/* functions are not exported... so wrong names */
diff --git a/source/blender/render/intern/include/strand.h b/source/blender/render/intern/include/strand.h
index f001bc42112..ebe026e3fec 100644
--- a/source/blender/render/intern/include/strand.h
+++ b/source/blender/render/intern/include/strand.h
@@ -93,6 +93,7 @@ typedef struct StrandShadeCache StrandShadeCache;
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 strand_minmax(struct StrandRen *strand, float *min, float *max);
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);