Blender  V2.93
Classes | Typedefs | Functions
RE_bake.h File Reference

Go to the source code of this file.

Classes

struct  BakeImage
 
struct  BakeTargets
 
struct  BakePixel
 
struct  BakeHighPolyData
 

Typedefs

typedef struct BakeImage BakeImage
 
typedef struct BakeTargets BakeTargets
 
typedef struct BakePixel BakePixel
 
typedef struct BakeHighPolyData BakeHighPolyData
 

Functions

bool RE_bake_has_engine (struct Render *re)
 
bool RE_bake_engine (struct Render *re, struct Depsgraph *depsgraph, struct Object *object, const int object_id, const BakePixel pixel_array[], const BakeTargets *targets, const eScenePassType pass_type, const int pass_filter, float result[])
 
int RE_pass_depth (const eScenePassType pass_type)
 
bool RE_bake_pixels_populate_from_objects (struct Mesh *me_low, BakePixel pixel_array_from[], BakePixel pixel_array_to[], BakeHighPolyData highpoly[], const int tot_highpoly, const size_t num_pixels, const bool is_custom_cage, const float cage_extrusion, const float max_ray_distance, float mat_low[4][4], float mat_cage[4][4], struct Mesh *me_cage)
 
void RE_bake_pixels_populate (struct Mesh *me, struct BakePixel *pixel_array, const size_t num_pixels, const struct BakeTargets *targets, const char *uv_layer)
 
void RE_bake_mask_fill (const BakePixel pixel_array[], const size_t num_pixels, char *mask)
 
void RE_bake_margin (struct ImBuf *ibuf, char *mask, const int margin)
 
void RE_bake_normal_world_to_object (const BakePixel pixel_array[], const size_t num_pixels, const int depth, float result[], struct Object *ob, const eBakeNormalSwizzle normal_swizzle[3])
 
void RE_bake_normal_world_to_tangent (const BakePixel pixel_array[], const size_t num_pixels, const int depth, float result[], struct Mesh *me, const eBakeNormalSwizzle normal_swizzle[3], float mat[4][4])
 
void RE_bake_normal_world_to_world (const BakePixel pixel_array[], const size_t num_pixels, const int depth, float result[], const eBakeNormalSwizzle normal_swizzle[3])
 
void RE_bake_ibuf_clear (struct Image *image, const bool is_tangent)
 

Typedef Documentation

◆ BakeHighPolyData

◆ BakeImage

typedef struct BakeImage BakeImage

◆ BakePixel

typedef struct BakePixel BakePixel

◆ BakeTargets

typedef struct BakeTargets BakeTargets

Function Documentation

◆ RE_bake_engine()

bool RE_bake_engine ( struct Render re,
struct Depsgraph depsgraph,
struct Object object,
const int  object_id,
const BakePixel  pixel_array[],
const BakeTargets targets,
const eScenePassType  pass_type,
const int  pass_filter,
float  result[] 
)

◆ RE_bake_has_engine()

bool RE_bake_has_engine ( struct Render re)

Definition at line 738 of file engine.c.

References RenderData::engine, NULL, Render::r, RE_engines_find(), and type.

Referenced by bake().

◆ RE_bake_ibuf_clear()

void RE_bake_ibuf_clear ( struct Image image,
const bool  is_tangent 
)

◆ RE_bake_margin()

void RE_bake_margin ( struct ImBuf ibuf,
char *  mask,
const int  margin 
)

◆ RE_bake_mask_fill()

void RE_bake_mask_fill ( const BakePixel  pixel_array[],
const size_t  num_pixels,
char *  mask 
)

Definition at line 141 of file bake.c.

References FILTER_MASK_USED, and mask().

Referenced by write_external_bake_pixels(), and write_internal_bake_pixels().

◆ RE_bake_normal_world_to_object()

void RE_bake_normal_world_to_object ( const BakePixel  pixel_array[],
const size_t  num_pixels,
const int  depth,
float  result[],
struct Object ob,
const eBakeNormalSwizzle  normal_swizzle[3] 
)

Definition at line 952 of file bake.c.

References invert_m4_m4(), mul_mat3_m4_v3(), nor, normal_compress(), normal_uncompress(), normalize_v3(), Object::obmat, and result.

Referenced by bake().

◆ RE_bake_normal_world_to_tangent()

void RE_bake_normal_world_to_tangent ( const BakePixel  pixel_array[],
const size_t  num_pixels,
const int  depth,
float  result[],
Mesh me,
const eBakeNormalSwizzle  normal_swizzle[3],
float  mat[4][4] 
)

◆ RE_bake_normal_world_to_world()

void RE_bake_normal_world_to_world ( const BakePixel  pixel_array[],
const size_t  num_pixels,
const int  depth,
float  result[],
const eBakeNormalSwizzle  normal_swizzle[3] 
)

Definition at line 984 of file bake.c.

References nor, normal_compress(), normal_uncompress(), and result.

Referenced by bake().

◆ RE_bake_pixels_populate()

void RE_bake_pixels_populate ( struct Mesh me,
struct BakePixel pixel_array,
const size_t  num_pixels,
const struct BakeTargets targets,
const char *  uv_layer 
)

◆ RE_bake_pixels_populate_from_objects()

bool RE_bake_pixels_populate_from_objects ( struct Mesh me_low,
BakePixel  pixel_array_from[],
BakePixel  pixel_array_to[],
BakeHighPolyData  highpoly[],
const int  tot_highpoly,
const size_t  num_pixels,
const bool  is_custom_cage,
const float  cage_extrusion,
const float  max_ray_distance,
float  mat_low[4][4],
float  mat_cage[4][4],
struct Mesh me_cage 
)

◆ RE_pass_depth()

int RE_pass_depth ( const eScenePassType  pass_type)