2023-08-15 16:20:26 +02:00
|
|
|
/* SPDX-FileCopyrightText: 2010 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2012-12-18 18:46:26 +01:00
|
|
|
|
2019-02-17 22:08:12 +01:00
|
|
|
/** \file
|
|
|
|
* \ingroup render
|
2012-12-18 18:46:26 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
struct MultiresBakeRender;
|
2018-06-18 11:51:02 +02:00
|
|
|
struct Scene;
|
2012-12-18 18:46:26 +01:00
|
|
|
|
2020-07-28 16:32:30 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2012-12-18 18:46:26 +01:00
|
|
|
typedef struct MultiresBakeRender {
|
2018-06-18 11:51:02 +02:00
|
|
|
Scene *scene;
|
2012-12-18 18:46:26 +01:00
|
|
|
DerivedMesh *lores_dm, *hires_dm;
|
2022-01-17 18:00:35 +01:00
|
|
|
int bake_margin;
|
|
|
|
char bake_margin_type;
|
2013-10-09 17:51:14 +02:00
|
|
|
int lvl, tot_lvl;
|
|
|
|
short mode;
|
|
|
|
bool use_lores_mesh; /* Use low-resolution mesh when baking displacement maps */
|
2012-12-18 18:46:26 +01:00
|
|
|
|
2017-05-24 15:14:32 +02:00
|
|
|
/* material aligned image array (for per-face bake image) */
|
|
|
|
struct {
|
|
|
|
Image **array;
|
|
|
|
int len;
|
|
|
|
} ob_image;
|
|
|
|
|
2013-10-09 17:51:14 +02:00
|
|
|
int number_of_rays; /* Number of rays to be cast when doing AO baking */
|
|
|
|
float bias; /* Bias between object and start ray point when doing AO baking */
|
2012-12-18 18:46:42 +01:00
|
|
|
|
2012-12-18 18:46:26 +01:00
|
|
|
int tot_obj, tot_image;
|
|
|
|
ListBase image;
|
|
|
|
|
|
|
|
int baked_objects, baked_faces;
|
|
|
|
|
2013-10-09 17:51:14 +02:00
|
|
|
int raytrace_structure; /* Optimization structure to be used for AO baking */
|
2021-02-05 06:23:34 +01:00
|
|
|
int octree_resolution; /* Resolution of octree when using octree optimization structure */
|
2013-10-09 17:51:14 +02:00
|
|
|
int threads; /* Number of threads to be used for baking */
|
|
|
|
|
|
|
|
float user_scale; /* User scale used to scale displacement when baking derivative map. */
|
|
|
|
|
2022-11-04 08:37:25 +01:00
|
|
|
bool *stop;
|
|
|
|
bool *do_update;
|
2012-12-18 18:46:26 +01:00
|
|
|
float *progress;
|
|
|
|
} MultiresBakeRender;
|
|
|
|
|
|
|
|
void RE_multires_bake_images(struct MultiresBakeRender *bkr);
|
|
|
|
|
2020-07-28 16:32:30 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|