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:
authorDalai Felinto <dfelinto@gmail.com>2014-05-21 22:04:59 +0400
committerDalai Felinto <dfelinto@gmail.com>2014-05-21 22:10:57 +0400
commit8d297394ba51246f2db0d503df7f4cae19ca6e92 (patch)
tree609c409de19c8228541a5fc689a6d95a528317fc /source/blender/render/extern/include/RE_bake.h
parent79fe023ec6a405a5de7bf30195b7ea94938e8a99 (diff)
Bake API: partial fix T40156 (applyRotation issues)
This fixes most of the cases, the only situation not addressed is when the highpoly object(s) has non-uniform scale. mul_transposed_mat3_m4_v3() should take care of non-uniform scales so I'm a bit confused on why it doesn't work. The lowpoly object can have any transformation, the only issue is if the highpoly object has non-uniform scale. Test file of the remaining issue: https://developer.blender.org/file/info/PHID-FILE-tpw2xgddyzxtpg3e7xzs/ Reference reading: http://www.unknownroad.com/rtfm/graphics/rt_normals.html
Diffstat (limited to 'source/blender/render/extern/include/RE_bake.h')
-rw-r--r--source/blender/render/extern/include/RE_bake.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/render/extern/include/RE_bake.h b/source/blender/render/extern/include/RE_bake.h
index d59819c8ef4..6ae8300b9d1 100644
--- a/source/blender/render/extern/include/RE_bake.h
+++ b/source/blender/render/extern/include/RE_bake.h
@@ -61,7 +61,9 @@ typedef struct BakeHighPolyData {
struct ModifierData *tri_mod;
struct Mesh *me;
char restrict_flag;
- float mat_lowtohigh[4][4];
+ float mat_high[4][4];
+ float imat_high[4][4];
+ float scale;
} BakeHighPolyData;
/* external_engine.c */
@@ -80,7 +82,7 @@ bool RE_bake_internal(
void RE_bake_pixels_populate_from_objects(
struct Mesh *me_low, BakePixel pixel_array_from[],
BakeHighPolyData highpoly[], const int tot_highpoly, const int num_pixels,
- const float cage_extrusion);
+ const float cage_extrusion, float mat_low[4][4]);
void RE_bake_pixels_populate(
struct Mesh *me, struct BakePixel *pixel_array,
@@ -95,7 +97,7 @@ void RE_bake_normal_world_to_object(
struct Object *ob, const BakeNormalSwizzle normal_swizzle[3]);
void RE_bake_normal_world_to_tangent(
const BakePixel pixel_array[], const int num_pixels, const int depth, float result[],
- struct Mesh *me, const BakeNormalSwizzle normal_swizzle[3]);
+ struct Mesh *me, const BakeNormalSwizzle normal_swizzle[3], float mat[4][4]);
void RE_bake_normal_world_to_world(
const BakePixel pixel_array[], const int num_pixels, const int depth, float result[],
const BakeNormalSwizzle normal_swizzle[3]);