| 
									
										
										
										
											2012-12-18 17:46:26 +00:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * This program is free software; you can redistribute it and/or | 
					
						
							|  |  |  |  * modify it under the terms of the GNU General Public License | 
					
						
							|  |  |  |  * as published by the Free Software Foundation; either version 2 | 
					
						
							| 
									
										
										
										
											2018-06-01 18:19:39 +02:00
										 |  |  |  * of the License, or (at your option) any later version. | 
					
						
							| 
									
										
										
										
											2012-12-18 17:46:26 +00:00
										 |  |  |  * | 
					
						
							|  |  |  |  * This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  |  * GNU General Public License for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * You should have received a copy of the GNU General Public License | 
					
						
							|  |  |  |  * along with this program; if not, write to the Free Software Foundation, | 
					
						
							|  |  |  |  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * The Original Code is Copyright (C) 2010 Blender Foundation. | 
					
						
							|  |  |  |  * All rights reserved. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-18 08:08:12 +11:00
										 |  |  | /** \file
 | 
					
						
							|  |  |  |  * \ingroup render | 
					
						
							| 
									
										
										
										
											2012-12-18 17:46:26 +00:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-07 09:50:34 +02:00
										 |  |  | #pragma once
 | 
					
						
							| 
									
										
										
										
											2012-12-18 17:46:26 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | struct MultiresBakeRender; | 
					
						
							| 
									
										
										
										
											2018-06-18 11:51:02 +02:00
										 |  |  | struct Scene; | 
					
						
							| 
									
										
										
										
											2012-12-18 17:46:26 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-28 16:32:30 +02:00
										 |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | extern "C" { | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-18 17:46:26 +00:00
										 |  |  | typedef struct MultiresBakeRender { | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   Scene *scene; | 
					
						
							|  |  |  |   DerivedMesh *lores_dm, *hires_dm; | 
					
						
							|  |  |  |   int bake_filter; /* Bake-filter, aka margin */ | 
					
						
							|  |  |  |   int lvl, tot_lvl; | 
					
						
							|  |  |  |   short mode; | 
					
						
							|  |  |  |   bool use_lores_mesh; /* Use low-resolution mesh when baking displacement maps */ | 
					
						
							| 
									
										
										
										
											2012-12-18 17:46:26 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   /* material aligned image array (for per-face bake image) */ | 
					
						
							|  |  |  |   struct { | 
					
						
							|  |  |  |     Image **array; | 
					
						
							|  |  |  |     int len; | 
					
						
							|  |  |  |   } ob_image; | 
					
						
							| 
									
										
										
										
											2017-05-24 23:14:32 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +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 17:46:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   int tot_obj, tot_image; | 
					
						
							|  |  |  |   ListBase image; | 
					
						
							| 
									
										
										
										
											2012-12-18 17:46:26 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   int baked_objects, baked_faces; | 
					
						
							| 
									
										
										
										
											2012-12-18 17:46:26 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   int raytrace_structure; /* Optimization structure to be used for AO baking */ | 
					
						
							|  |  |  |   int octree_resolution;  /* Reslution of octotree when using octotree optimization structure */ | 
					
						
							|  |  |  |   int threads;            /* Number of threads to be used for baking */ | 
					
						
							| 
									
										
										
										
											2013-10-09 15:51:14 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   float user_scale; /* User scale used to scale displacement when baking derivative map. */ | 
					
						
							| 
									
										
										
										
											2013-10-09 15:51:14 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 06:17:24 +02:00
										 |  |  |   short *stop; | 
					
						
							|  |  |  |   short *do_update; | 
					
						
							|  |  |  |   float *progress; | 
					
						
							| 
									
										
										
										
											2012-12-18 17:46:26 +00:00
										 |  |  | } MultiresBakeRender; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void RE_multires_bake_images(struct MultiresBakeRender *bkr); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-28 16:32:30 +02:00
										 |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | #endif
 |