|
Blender V4.3
|
#include "RE_pipeline.h"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 (const struct Render *re) |
| bool | RE_bake_engine (struct Render *re, struct Depsgraph *depsgraph, struct Object *object, int object_id, const BakePixel pixel_array[], const BakeTargets *targets, eScenePassType pass_type, int pass_filter, float result[]) |
| int | RE_pass_depth (eScenePassType pass_type) |
| bool | RE_bake_pixels_populate_from_objects (struct Mesh *me_low, BakePixel pixel_array_from[], BakePixel pixel_array_to[], BakeHighPolyData highpoly[], int tot_highpoly, size_t pixels_num, bool is_custom_cage, float cage_extrusion, float max_ray_distance, const float mat_low[4][4], const float mat_cage[4][4], struct Mesh *me_cage) |
| void | RE_bake_pixels_populate (struct Mesh *mesh, struct BakePixel *pixel_array, size_t pixels_num, const struct BakeTargets *targets, const char *uv_layer) |
| void | RE_bake_mask_fill (const BakePixel pixel_array[], size_t pixels_num, char *mask) |
| void | RE_bake_margin (struct ImBuf *ibuf, char *mask, int margin, char margin_type, const Mesh *mesh, char const *uv_layer, const float uv_offset[2]) |
| void | RE_bake_normal_world_to_object (const BakePixel pixel_array[], size_t pixels_num, int depth, float result[], struct Object *ob, const eBakeNormalSwizzle normal_swizzle[3]) |
| void | RE_bake_normal_world_to_tangent (const BakePixel pixel_array[], size_t pixels_num, int depth, float result[], struct Mesh *mesh, const eBakeNormalSwizzle normal_swizzle[3], const float mat[4][4]) |
| void | RE_bake_normal_world_to_world (const BakePixel pixel_array[], size_t pixels_num, int depth, float result[], const eBakeNormalSwizzle normal_swizzle[3]) |
| void | RE_bake_ibuf_clear (struct Image *image, bool is_tangent) |
| typedef struct BakeHighPolyData BakeHighPolyData |
| typedef struct BakeImage BakeImage |
| typedef struct BakePixel BakePixel |
| typedef struct BakeTargets BakeTargets |
| bool RE_bake_engine | ( | struct Render * | re, |
| struct Depsgraph * | depsgraph, | ||
| struct Object * | object, | ||
| int | object_id, | ||
| const BakePixel | pixel_array[], | ||
| const BakeTargets * | targets, | ||
| eScenePassType | pass_type, | ||
| int | pass_filter, | ||
| float | result[] ) |
Definition at line 770 of file intern/engine.cc.
References RenderEngine::bake, BKE_reports_contain(), BLI_strncpy(), RenderData::cfra, RenderStats::cfra, depsgraph, RenderEngine::depsgraph, BaseRender::engine, RenderData::engine, engine_depsgraph_free(), RenderEngine::flag, G, Render::i, Scene::id, RenderEngine::image_id, BakeTargets::images, BakeTargets::images_num, Render::main, ID::name, RenderEngine::object_id, RenderEngine::pixels, Render::r, Scene::r, RenderEngine::re, RE_engine_create(), RE_engine_free(), RE_ENGINE_RENDERING, RE_engines_find(), Render::reports, RenderEngine::resolution_x, RenderEngine::resolution_y, RenderEngine::result, result, RPT_ERROR, Render::scene, RenderStats::scene_name, RenderEngine::targets, Render::winx, and Render::winy.
Referenced by blender::ed::object::bake().
| bool RE_bake_has_engine | ( | const struct Render * | re | ) |
| void RE_bake_ibuf_clear | ( | struct Image * | image, |
| bool | is_tangent ) |
Definition at line 1034 of file bake.cc.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), BLI_assert, IMB_rectfill(), lock, ImBuf::planes, and R_IMF_PLANES_RGBA.
Referenced by blender::ed::object::bake_targets_clear().
| void RE_bake_margin | ( | struct ImBuf * | ibuf, |
| char * | mask, | ||
| int | margin, | ||
| char | margin_type, | ||
| const Mesh * | mesh, | ||
| char const * | uv_layer, | ||
| const float | uv_offset[2] ) |
Definition at line 145 of file bake.cc.
References IMB_filter_extend(), IMB_rectfill_alpha(), ImBuf::planes, R_BAKE_ADJACENT_FACES, R_BAKE_EXTEND, R_IMF_PLANES_RGBA, and RE_generate_texturemargin_adjacentfaces().
Referenced by blender::ed::object::write_external_bake_pixels(), and blender::ed::object::write_internal_bake_pixels().
| void RE_bake_mask_fill | ( | const BakePixel | pixel_array[], |
| size_t | pixels_num, | ||
| char * | mask ) |
Definition at line 130 of file bake.cc.
References FILTER_MASK_USED.
Referenced by blender::ed::object::write_external_bake_pixels(), and blender::ed::object::write_internal_bake_pixels().
| void RE_bake_normal_world_to_object | ( | const BakePixel | pixel_array[], |
| size_t | pixels_num, | ||
| int | depth, | ||
| float | result[], | ||
| struct Object * | ob, | ||
| const eBakeNormalSwizzle | normal_swizzle[3] ) |
Definition at line 978 of file bake.cc.
References copy_v3_v3(), invert_m4_m4(), mul_mat3_m4_v3(), nor, normal_compress(), and normalize_v3().
Referenced by blender::ed::object::bake().
| void RE_bake_normal_world_to_tangent | ( | const BakePixel | pixel_array[], |
| size_t | pixels_num, | ||
| int | depth, | ||
| float | result[], | ||
| struct Mesh * | mesh, | ||
| const eBakeNormalSwizzle | normal_swizzle[3], | ||
| const float | mat[4][4] ) |
This function converts an object space normal map to a tangent space normal map for a given low poly mesh.
Definition at line 853 of file bake.cc.
References BKE_id_free(), BKE_mesh_copy_for_eval(), BLI_assert, copy_v3_fl3(), copy_v3_v3(), copy_v4_fl4(), cross_v3_v3v3(), interp_barycentric_tri_v3(), invert_m3_m3(), TriTessFace::is_smooth, TriTessFace::loop_normal, MEM_freeN(), mesh_calc_tri_tessface(), mul_m3_v3(), mul_transposed_mat3_m4_v3(), mul_v3_fl(), nor, TriTessFace::normal, normal_compress(), normalize_v3(), BakePixel::primitive_id, TSpace::sign, TSpace::tangent, TriTessFace::tspace, BakePixel::uv, v, TriTessFace::vert_normals, and w().
Referenced by blender::ed::object::bake().
| void RE_bake_normal_world_to_world | ( | const BakePixel | pixel_array[], |
| size_t | pixels_num, | ||
| int | depth, | ||
| float | result[], | ||
| const eBakeNormalSwizzle | normal_swizzle[3] ) |
Definition at line 1010 of file bake.cc.
References copy_v3_v3(), nor, and normal_compress().
Referenced by blender::ed::object::bake().
| void RE_bake_pixels_populate | ( | struct Mesh * | mesh, |
| struct BakePixel * | pixel_array, | ||
| size_t | pixels_num, | ||
| const struct BakeTargets * | targets, | ||
| const char * | uv_layer ) |
| bool RE_bake_pixels_populate_from_objects | ( | struct Mesh * | me_low, |
| BakePixel | pixel_array_from[], | ||
| BakePixel | pixel_array_to[], | ||
| BakeHighPolyData | highpoly[], | ||
| int | tot_highpoly, | ||
| size_t | pixels_num, | ||
| bool | is_custom_cage, | ||
| float | cage_extrusion, | ||
| float | max_ray_distance, | ||
| const float | mat_low[4][4], | ||
| const float | mat_cage[4][4], | ||
| struct Mesh * | me_cage ) |
Definition at line 545 of file bake.cc.
References BKE_bvhtree_from_mesh_get(), BKE_id_free(), BKE_mesh_copy_for_eval(), BKE_mesh_runtime_corner_tris_len(), BVHTREE_FROM_CORNER_TRIS, calc_point_from_barycentric_cage(), calc_point_from_barycentric_extrusion(), cast_ray_highpoly(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), free_bvhtree_from_mesh(), invert_m4_m4(), MEM_freeN(), MEM_mallocN, BakeHighPolyData::mesh, mesh_calc_tri_tessface(), BakePixel::primitive_id, printf, result, tree, BakePixel::uv, and v.
Referenced by blender::ed::object::bake().
| int RE_pass_depth | ( | eScenePassType | pass_type | ) |
Definition at line 1059 of file bake.cc.
References SCE_PASS_AO, SCE_PASS_COMBINED, SCE_PASS_DIFFUSE_COLOR, SCE_PASS_DIFFUSE_DIRECT, SCE_PASS_DIFFUSE_INDIRECT, SCE_PASS_EMIT, SCE_PASS_ENVIRONMENT, SCE_PASS_GLOSSY_COLOR, SCE_PASS_GLOSSY_DIRECT, SCE_PASS_GLOSSY_INDIRECT, SCE_PASS_INDEXMA, SCE_PASS_INDEXOB, SCE_PASS_MIST, SCE_PASS_NORMAL, SCE_PASS_POSITION, SCE_PASS_SHADOW, SCE_PASS_SUBSURFACE_COLOR, SCE_PASS_SUBSURFACE_DIRECT, SCE_PASS_SUBSURFACE_INDIRECT, SCE_PASS_TRANSM_COLOR, SCE_PASS_TRANSM_DIRECT, SCE_PASS_TRANSM_INDIRECT, SCE_PASS_UV, SCE_PASS_VECTOR, and SCE_PASS_Z.
Referenced by blender::ed::object::bake_targets_init().