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>2009-11-25 17:07:12 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-11-25 17:07:12 +0300
commitfffce6c5545c3072d2dd266dfe5c133b760baebe (patch)
tree025256e7bc4caa09ae6df3f31b40d75e2c0b7e94 /source/blender/blenkernel/intern/customdata.c
parent134935a8db7fe6137bb8a508771757beeb68b2b3 (diff)
Sculpt: Multires
* Displacement coordinates are now stored differently, as a grid per face corner. This means there is duplication of coordinates, especially at low subdivision levels, but the simpler implementation justifies it I think. * ToDo: conversion of existing multires files (2.4x or 2.5x), loading them may even crash now. * Editmode preservation/interpolation code also has not been updated yet. * Multires now works on the CCGDerivedMesh grids instead of CDDerivedMesh, which should be more memory efficient. * There are still bad memory peaks (if you're using 32bit) when subdividing or propagating displacements. Though at least there should be no huge memory blocks allocated, which windows is now to have trouble with. * Still found some weird spike artifacts at lower multires levels, some also happening before this commit. Perhaps computation of tangents needs to be tweaked more. * Multires modifier now has viewport, sculpt and render levels. Also the levels have been made consistent with subsurf, previously the same level of subdivision was one less for multires. * Both multires and subsurf modifier now can have their subdivision level set to 0 for no subdivision.
Diffstat (limited to 'source/blender/blenkernel/intern/customdata.c')
-rw-r--r--source/blender/blenkernel/intern/customdata.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 7b754025b6c..4844595513f 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -381,6 +381,7 @@ static void layerDefault_origspace_face(void *data, int count)
osf[i] = default_osf;
}
+#if 0
/* Adapted from sculptmode.c */
static void mdisps_bilinear(float out[3], float (*disps)[3], int st, float u, float v)
{
@@ -426,9 +427,12 @@ static void mdisps_bilinear(float out[3], float (*disps)[3], int st, float u, fl
add_v3_v3v3(out, d2[0], d2[1]);
}
+#endif
static void layerSwap_mdisps(void *data, int *ci)
{
+ // XXX
+#if 0
MDisps *s = data;
float (*d)[3] = NULL;
int x, y, st;
@@ -447,11 +451,14 @@ static void layerSwap_mdisps(void *data, int *ci)
if(s->disps)
MEM_freeN(s->disps);
s->disps = d;
+#endif
}
static void layerInterp_mdisps(void **sources, float *weights, float *sub_weights,
int count, void *dest)
{
+ // XXX
+#if 0
MDisps *d = dest;
MDisps *s = NULL;
int st, stl;
@@ -496,6 +503,7 @@ static void layerInterp_mdisps(void **sources, float *weights, float *sub_weight
copy_v3_v3(d->disps[y * st + x], srcdisp);
}
}
+#endif
}
static void layerCopy_mdisps(const void *source, void *dest, int count)