Blender  V3.3
DNA_fluid_defaults.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #pragma once
8 
9 /* Struct members on own line. */
10 /* clang-format off */
11 
12 /* -------------------------------------------------------------------- */
16 #define _DNA_DEFAULT_FluidDomainSettings \
17  { \
18  .fmd = NULL, \
19  .fluid = NULL, \
20  .fluid_old = NULL, \
21  .fluid_mutex = NULL, \
22  .fluid_group = NULL, \
23  .force_group = NULL, \
24  .effector_group = NULL, \
25  .tex_density = NULL, \
26  .tex_color = NULL, \
27  .tex_wt = NULL, \
28  .tex_shadow = NULL, \
29  .tex_flame = NULL, \
30  .tex_flame_coba = NULL, \
31  .tex_coba = NULL, \
32  .tex_field = NULL, \
33  .tex_velocity_x = NULL, \
34  .tex_velocity_y = NULL, \
35  .tex_velocity_z = NULL, \
36  .tex_flags = NULL, \
37  .tex_range_field = NULL, \
38  .guide_parent = NULL, \
39  .effector_weights = NULL, /* #BKE_effector_add_weights. */ \
40  .p0 = {0.0f, 0.0f, 0.0f}, \
41  .p1 = {0.0f, 0.0f, 0.0f}, \
42  .dp0 = {0.0f, 0.0f, 0.0f}, \
43  .cell_size = {0.0f, 0.0f, 0.0f}, \
44  .global_size = {0.0f, 0.0f, 0.0f}, \
45  .prev_loc = {0.0f, 0.0f, 0.0f}, \
46  .shift = {0, 0, 0}, \
47  .shift_f = {0.0f, 0.0f, 0.0f}, \
48  .obj_shift_f = {0.0f, 0.0f, 0.0f}, \
49  .imat = _DNA_DEFAULT_UNIT_M4, \
50  .obmat = _DNA_DEFAULT_UNIT_M4, \
51  .fluidmat = _DNA_DEFAULT_UNIT_M4, \
52  .fluidmat_wt = _DNA_DEFAULT_UNIT_M4, \
53  .base_res = {0, 0, 0}, \
54  .res_min = {0, 0, 0}, \
55  .res_max = {0, 0, 0}, \
56  .res = {0, 0, 0}, \
57  .total_cells = 0, \
58  .dx = 0, \
59  .scale = 0.0f, \
60  .boundary_width = 1, \
61  .gravity_final = {0.0f, 0.0f, 0.0f}, \
62  .adapt_margin = 4, \
63  .adapt_res = 0, \
64  .adapt_threshold = 0.02f, \
65  .maxres = 32, \
66  .solver_res = 3, \
67  .border_collisions = 0, \
68  .flags = FLUID_DOMAIN_USE_DISSOLVE_LOG | FLUID_DOMAIN_USE_ADAPTIVE_TIME, \
69  .gravity = {0.0f, 0.0f, -9.81f}, \
70  .active_fields = 0, \
71  .type = FLUID_DOMAIN_TYPE_GAS, \
72  .alpha = 1.0f, \
73  .beta = 1.0f, \
74  .diss_speed = 5, \
75  .vorticity = 0.0f, \
76  .active_color = {0.0f, 0.0f, 0.0f}, \
77  .highres_sampling = SM_HRES_FULLSAMPLE, \
78  .burning_rate = 0.75f, \
79  .flame_smoke = 1.0f, \
80  .flame_vorticity = 0.5f, \
81  .flame_ignition = 1.5f, \
82  .flame_max_temp = 3.0f, \
83  .flame_smoke_color = {0.7f, 0.7f, 0.7f}, \
84  .noise_strength = 1.0f, \
85  .noise_pos_scale = 2.0f, \
86  .noise_time_anim = 0.1f, \
87  .res_noise = {0, 0, 0}, \
88  .noise_scale = 2, \
89  .particle_randomness = 0.1f, \
90  .particle_number = 2, \
91  .particle_minimum = 8, \
92  .particle_maximum = 16, \
93  .particle_radius = 1.0f, \
94  .particle_band_width = 3.0f, \
95  .fractions_threshold = 0.05f, \
96  .fractions_distance = 0.5f, \
97  .flip_ratio = 0.97f, \
98  .sys_particle_maximum = 0, \
99  .simulation_method = FLUID_DOMAIN_METHOD_FLIP, \
100  .viscosity_value = 0.05f, \
101  .surface_tension = 0.0f, \
102  .viscosity_base = 1.0f, \
103  .viscosity_exponent = 6.0f, \
104  .mesh_concave_upper = 3.5f, \
105  .mesh_concave_lower = 0.4f, \
106  .mesh_particle_radius = 2.0f, \
107  .mesh_smoothen_pos = 1, \
108  .mesh_smoothen_neg = 1, \
109  .mesh_scale = 2, \
110  .mesh_generator = FLUID_DOMAIN_MESH_IMPROVED, \
111  .particle_type = 0, \
112  .particle_scale = 1, \
113  .sndparticle_tau_min_wc = 2.0f, \
114  .sndparticle_tau_max_wc = 8.0f, \
115  .sndparticle_tau_min_ta = 5.0f, \
116  .sndparticle_tau_max_ta = 20.0f, \
117  .sndparticle_tau_min_k = 1.0f, \
118  .sndparticle_tau_max_k = 5.0f, \
119  .sndparticle_k_wc = 200, \
120  .sndparticle_k_ta = 40, \
121  .sndparticle_k_b = 0.5f, \
122  .sndparticle_k_d = 0.6f, \
123  .sndparticle_l_min = 10.0f, \
124  .sndparticle_l_max = 25.0f, \
125  .sndparticle_potential_radius = 2, \
126  .sndparticle_update_radius = 2, \
127  .sndparticle_boundary = SNDPARTICLE_BOUNDARY_DELETE, \
128  .sndparticle_combined_export = SNDPARTICLE_COMBINED_EXPORT_OFF, \
129  .guide_alpha = 2.0f, \
130  .guide_beta = 5, \
131  .guide_vel_factor = 2.0f, \
132  .guide_res = {0, 0, 0}, \
133  .guide_source = FLUID_DOMAIN_GUIDE_SRC_DOMAIN, \
134  .cache_frame_start = 1, \
135  .cache_frame_end = 250, \
136  .cache_frame_pause_data = 0, \
137  .cache_frame_pause_noise = 0, \
138  .cache_frame_pause_mesh = 0, \
139  .cache_frame_pause_particles = 0, \
140  .cache_frame_pause_guide = 0, \
141  .cache_frame_offset = 0, \
142  .cache_flag = 0, \
143  .cache_mesh_format = FLUID_DOMAIN_FILE_BIN_OBJECT, \
144  .cache_data_format = FLUID_DOMAIN_FILE_OPENVDB, \
145  .cache_particle_format = FLUID_DOMAIN_FILE_OPENVDB, \
146  .cache_noise_format = FLUID_DOMAIN_FILE_OPENVDB, \
147  .cache_directory = "", \
148  .error = "", \
149  .cache_type = FLUID_DOMAIN_CACHE_REPLAY, \
150  .cache_id = "", \
151  .dt = 0.0f, \
152  .time_total = 0.0f, \
153  .time_per_frame = 0.0f, \
154  .frame_length = 0.0f, \
155  .time_scale = 1.0f, \
156  .cfl_condition = 4.0f, \
157  .timesteps_minimum = 1, \
158  .timesteps_maximum = 4, \
159  .slice_per_voxel = 5.0f, \
160  .slice_depth = 0.5f, \
161  .display_thickness = 1.0f, \
162  .grid_scale = 1.0f, \
163  .coba = NULL, \
164  .vector_scale = 1.0f, \
165  .gridlines_lower_bound = 0.0f, \
166  .gridlines_upper_bound = 1.0f, \
167  .gridlines_range_color = {1.0f, 0.0f, 0.0f, 1.0f}, \
168  .axis_slice_method = AXIS_SLICE_FULL, \
169  .slice_axis = 0, \
170  .show_gridlines = false, \
171  .draw_velocity = false, \
172  .vector_draw_type = VECTOR_DRAW_NEEDLE, \
173  .vector_field = FLUID_DOMAIN_VECTOR_FIELD_VELOCITY, \
174  .vector_scale_with_magnitude = true, \
175  .vector_draw_mac_components = VECTOR_DRAW_MAC_X | VECTOR_DRAW_MAC_Y | VECTOR_DRAW_MAC_Z, \
176  .use_coba = false, \
177  .coba_field = FLUID_DOMAIN_FIELD_DENSITY, \
178  .interp_method = FLUID_DISPLAY_INTERP_LINEAR, \
179  .gridlines_color_field = 0, \
180  .gridlines_cell_filter = FLUID_CELL_TYPE_NONE, \
181  .openvdb_compression = VDB_COMPRESSION_BLOSC, \
182  .clipping = 1e-6f, \
183  .openvdb_data_depth = 0, \
184  .viewsettings = 0, \
185  .point_cache = {NULL, NULL}, /* Use #BKE_ptcache_add. */ \
186  .ptcaches = {{NULL}}, \
187  .cache_comp = SM_CACHE_LIGHT, \
188  .cache_high_comp = SM_CACHE_LIGHT, \
189  .cache_file_format = 0, \
190  .velocity_scale = 1.0f, \
191  }
192 
195 /* -------------------------------------------------------------------- */
199 #define _DNA_DEFAULT_FluidFlowSettings \
200  { \
201  .fmd = NULL, \
202  .mesh = NULL, \
203  .psys = NULL, \
204  .noise_texture = NULL, \
205  .verts_old = NULL, \
206  .numverts = 0, \
207  .vel_multi = 1.0f, \
208  .vel_normal = 0.0f, \
209  .vel_random = 0.0f, \
210  .vel_coord = {0.0f, 0.0f, 0.0f}, \
211  .density = 1.0f, \
212  .color = {0.7f, 0.7f, 0.7f}, \
213  .fuel_amount = 1.0f, \
214  .temperature = 1.0f, \
215  .volume_density = 0.0f, \
216  .surface_distance = 1.5f, \
217  .particle_size = 1.0f, \
218  .subframes = 0, \
219  .texture_size = 1.0f, \
220  .texture_offset = 0.0f, \
221  .uvlayer_name = "", \
222  .vgroup_density = 0, \
223  .type = FLUID_FLOW_TYPE_SMOKE, \
224  .behavior = FLUID_FLOW_BEHAVIOR_GEOMETRY, \
225  .source = FLUID_FLOW_SOURCE_MESH, \
226  .texture_type = 0, \
227  .flags = FLUID_FLOW_ABSOLUTE | FLUID_FLOW_USE_PART_SIZE | FLUID_FLOW_USE_INFLOW, \
228  }
229 
232 /* -------------------------------------------------------------------- */
236 #define _DNA_DEFAULT_FluidEffectorSettings \
237  { \
238  .fmd = NULL, \
239  .mesh = NULL, \
240  .verts_old = NULL, \
241  .numverts = 0, \
242  .surface_distance = 0.0f, \
243  .flags = FLUID_EFFECTOR_USE_EFFEC, \
244  .subframes = 0, \
245  .type = FLUID_EFFECTOR_TYPE_COLLISION, \
246  .vel_multi = 1.0f, \
247  .guide_mode = FLUID_EFFECTOR_GUIDE_OVERRIDE, \
248  }
249 
252 /* clang-format on */