Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_smoke_types.h
| Show All 20 Lines | |||||
| * \ingroup DNA | * \ingroup DNA | ||||
| */ | */ | ||||
| #ifndef __DNA_SMOKE_TYPES_H__ | #ifndef __DNA_SMOKE_TYPES_H__ | ||||
| #define __DNA_SMOKE_TYPES_H__ | #define __DNA_SMOKE_TYPES_H__ | ||||
| /* flags */ | /* flags */ | ||||
| enum { | enum { | ||||
| MOD_SMOKE_HIGHRES = (1 << 1), /* enable high resolution */ | FLUID_DOMAIN_USE_NOISE = (1 << 1), /* use noise */ | ||||
| MOD_SMOKE_DISSOLVE = (1 << 2), /* let smoke dissolve */ | FLUID_DOMAIN_USE_DISSOLVE = (1 << 2), /* let smoke dissolve */ | ||||
| MOD_SMOKE_DISSOLVE_LOG = (1 << 3), /* using 1/x for dissolve */ | FLUID_DOMAIN_USE_DISSOLVE_LOG = (1 << 3), /* using 1/x for dissolve */ | ||||
| #ifdef DNA_DEPRECATED | #ifdef DNA_DEPRECATED | ||||
| MOD_SMOKE_HIGH_SMOOTH = (1 << 5), /* -- Deprecated -- */ | FLUID_DOMAIN_USE_HIGH_SMOOTH = (1 << 5), /* -- Deprecated -- */ | ||||
| #endif | #endif | ||||
| MOD_SMOKE_FILE_LOAD = (1 << 6), /* flag for file load */ | FLUID_DOMAIN_FILE_LOAD = (1 << 6), /* flag for file load */ | ||||
| MOD_SMOKE_ADAPTIVE_DOMAIN = (1 << 7), | FLUID_DOMAIN_USE_ADAPTIVE_DOMAIN = (1 << 7), | ||||
| FLUID_DOMAIN_USE_ADAPTIVE_TIME = (1 << 8), /* adaptive time stepping in domain */ | |||||
| FLUID_DOMAIN_USE_MESH = (1 << 9), /* use mesh */ | |||||
| FLUID_DOMAIN_USE_GUIDING = (1 << 10), /* use guiding */ | |||||
| FLUID_DOMAIN_USE_SPEED_VECTORS = (1 << 11), /* generate mesh speed vectors */ | |||||
| FLUID_DOMAIN_EXPORT_MANTA_SCRIPT = (1 << 12), /* export mantaflow script during bake */ | |||||
| }; | }; | ||||
| /* noise */ | /* border collisions */ | ||||
| #define MOD_SMOKE_NOISEWAVE (1 << 0) | enum { | ||||
| #define MOD_SMOKE_NOISEFFT (1 << 1) | FLUID_DOMAIN_BORDER_FRONT = (1 << 1), | ||||
| #define MOD_SMOKE_NOISECURL (1 << 2) | FLUID_DOMAIN_BORDER_BACK = (1 << 2), | ||||
| /* viewsettings */ | FLUID_DOMAIN_BORDER_RIGHT = (1 << 3), | ||||
| #define MOD_SMOKE_VIEW_SHOW_HIGHRES (1 << 0) | FLUID_DOMAIN_BORDER_LEFT = (1 << 4), | ||||
| FLUID_DOMAIN_BORDER_TOP = (1 << 5), | |||||
| FLUID_DOMAIN_BORDER_BOTTOM = (1 << 6), | |||||
| }; | |||||
| /* cache file formats */ | |||||
| enum { | |||||
| FLUID_DOMAIN_FILE_UNI = (1 << 0), | |||||
| FLUID_DOMAIN_FILE_OPENVDB = (1 << 1), | |||||
| FLUID_DOMAIN_FILE_RAW = (1 << 2), | |||||
| FLUID_DOMAIN_FILE_OBJECT = (1 << 3), | |||||
| FLUID_DOMAIN_FILE_BIN_OBJECT = (1 << 4), | |||||
| }; | |||||
| /* slice method */ | /* slice method */ | ||||
| enum { | enum { | ||||
| MOD_SMOKE_SLICE_VIEW_ALIGNED = 0, | FLUID_DOMAIN_SLICE_VIEW_ALIGNED = 0, | ||||
| MOD_SMOKE_SLICE_AXIS_ALIGNED = 1, | FLUID_DOMAIN_SLICE_AXIS_ALIGNED = 1, | ||||
| }; | }; | ||||
| /* axis aligned method */ | /* axis aligned method */ | ||||
| enum { | enum { | ||||
| AXIS_SLICE_FULL = 0, | AXIS_SLICE_FULL = 0, | ||||
| AXIS_SLICE_SINGLE = 1, | AXIS_SLICE_SINGLE = 1, | ||||
| }; | }; | ||||
| Show All 12 Lines | |||||
| }; | }; | ||||
| enum { | enum { | ||||
| VECTOR_DRAW_NEEDLE = 0, | VECTOR_DRAW_NEEDLE = 0, | ||||
| VECTOR_DRAW_STREAMLINE = 1, | VECTOR_DRAW_STREAMLINE = 1, | ||||
| }; | }; | ||||
| enum { | enum { | ||||
| FLUID_FIELD_DENSITY = 0, | SNDPARTICLE_BOUNDARY_DELETE = 0, | ||||
| FLUID_FIELD_HEAT = 1, | SNDPARTICLE_BOUNDARY_PUSHOUT = 1, | ||||
| FLUID_FIELD_FUEL = 2, | }; | ||||
| FLUID_FIELD_REACT = 3, | |||||
| FLUID_FIELD_FLAME = 4, | enum { | ||||
| FLUID_FIELD_VELOCITY_X = 5, | SNDPARTICLE_COMBINED_EXPORT_OFF = 0, | ||||
| FLUID_FIELD_VELOCITY_Y = 6, | SNDPARTICLE_COMBINED_EXPORT_SPRAY_FOAM = 1, | ||||
| FLUID_FIELD_VELOCITY_Z = 7, | SNDPARTICLE_COMBINED_EXPORT_SPRAY_BUBBLE = 2, | ||||
| FLUID_FIELD_COLOR_R = 8, | SNDPARTICLE_COMBINED_EXPORT_FOAM_BUBBLE = 3, | ||||
| FLUID_FIELD_COLOR_G = 9, | SNDPARTICLE_COMBINED_EXPORT_SPRAY_FOAM_BUBBLE = 4, | ||||
| FLUID_FIELD_COLOR_B = 10, | }; | ||||
| FLUID_FIELD_FORCE_X = 11, | |||||
| FLUID_FIELD_FORCE_Y = 12, | enum { | ||||
| FLUID_FIELD_FORCE_Z = 13, | FLUID_DOMAIN_FIELD_DENSITY = 0, | ||||
| FLUID_DOMAIN_FIELD_HEAT = 1, | |||||
| FLUID_DOMAIN_FIELD_FUEL = 2, | |||||
| FLUID_DOMAIN_FIELD_REACT = 3, | |||||
| FLUID_DOMAIN_FIELD_FLAME = 4, | |||||
| FLUID_DOMAIN_FIELD_VELOCITY_X = 5, | |||||
| FLUID_DOMAIN_FIELD_VELOCITY_Y = 6, | |||||
| FLUID_DOMAIN_FIELD_VELOCITY_Z = 7, | |||||
| FLUID_DOMAIN_FIELD_COLOR_R = 8, | |||||
| FLUID_DOMAIN_FIELD_COLOR_G = 9, | |||||
| FLUID_DOMAIN_FIELD_COLOR_B = 10, | |||||
| FLUID_DOMAIN_FIELD_FORCE_X = 11, | |||||
| FLUID_DOMAIN_FIELD_FORCE_Y = 12, | |||||
| FLUID_DOMAIN_FIELD_FORCE_Z = 13, | |||||
| }; | }; | ||||
| /* domain types */ | |||||
| #define FLUID_DOMAIN_TYPE_GAS 0 | |||||
| #define FLUID_DOMAIN_TYPE_LIQUID 1 | |||||
| /* noise */ | |||||
| #define FLUID_NOISE_TYPE_WAVELET (1<<0) | |||||
| /* mesh levelset generator types */ | |||||
| #define FLUID_DOMAIN_MESH_IMPROVED 0 | |||||
| #define FLUID_DOMAIN_MESH_UNION 1 | |||||
| /* guiding velocity source */ | |||||
| #define FLUID_DOMAIN_GUIDING_SRC_DOMAIN 0 | |||||
| #define FLUID_DOMAIN_GUIDING_SRC_EFFECTOR 1 | |||||
| /* fluid data fields (active_fields) */ | |||||
| #define FLUID_DOMAIN_ACTIVE_HEAT (1<<0) | |||||
| #define FLUID_DOMAIN_ACTIVE_FIRE (1<<1) | |||||
| #define FLUID_DOMAIN_ACTIVE_COLORS (1<<2) | |||||
| #define FLUID_DOMAIN_ACTIVE_COLOR_SET (1<<3) | |||||
| #define FLUID_DOMAIN_ACTIVE_OBSTACLE (1<<4) | |||||
| #define FLUID_DOMAIN_ACTIVE_GUIDING (1<<5) | |||||
| #define FLUID_DOMAIN_ACTIVE_INVEL (1<<6) | |||||
| #define FLUID_DOMAIN_ACTIVE_OUTFLOW (1<<7) | |||||
| /* particle types */ | |||||
| #define FLUID_DOMAIN_PARTICLE_FLIP (1<<0) | |||||
| #define FLUID_DOMAIN_PARTICLE_SPRAY (1<<1) | |||||
| #define FLUID_DOMAIN_PARTICLE_BUBBLE (1<<2) | |||||
| #define FLUID_DOMAIN_PARTICLE_FOAM (1<<3) | |||||
| #define FLUID_DOMAIN_PARTICLE_TRACER (1<<4) | |||||
| /* cache options */ | |||||
| #define FLUID_DOMAIN_BAKING_DATA 1 | |||||
| #define FLUID_DOMAIN_BAKED_DATA 2 | |||||
| #define FLUID_DOMAIN_BAKING_NOISE 4 | |||||
| #define FLUID_DOMAIN_BAKED_NOISE 8 | |||||
| #define FLUID_DOMAIN_BAKING_MESH 16 | |||||
| #define FLUID_DOMAIN_BAKED_MESH 32 | |||||
| #define FLUID_DOMAIN_BAKING_PARTICLES 64 | |||||
| #define FLUID_DOMAIN_BAKED_PARTICLES 128 | |||||
| #define FLUID_DOMAIN_BAKING_GUIDING 256 | |||||
| #define FLUID_DOMAIN_BAKED_GUIDING 512 | |||||
| #define FLUID_DOMAIN_DIR_DEFAULT "cache_fluid" | |||||
| #define FLUID_DOMAIN_DIR_DATA "data" | |||||
| #define FLUID_DOMAIN_DIR_NOISE "noise" | |||||
| #define FLUID_DOMAIN_DIR_MESH "mesh" | |||||
| #define FLUID_DOMAIN_DIR_PARTICLES "particles" | |||||
| #define FLUID_DOMAIN_DIR_GUIDING "guiding" | |||||
| #define FLUID_DOMAIN_DIR_SCRIPT "script" | |||||
| #define FLUID_DOMAIN_SMOKE_SCRIPT "smoke_script.py" | |||||
| #define FLUID_DOMAIN_LIQUID_SCRIPT "liquid_script.py" | |||||
| /* Deprecated values (i.e. all defines and enums below this line up until typedefs)*/ | |||||
| /* cache compression */ | /* cache compression */ | ||||
| #define SM_CACHE_LIGHT 0 | #define SM_CACHE_LIGHT 0 | ||||
| #define SM_CACHE_HEAVY 1 | #define SM_CACHE_HEAVY 1 | ||||
| /* domain border collision */ | |||||
| #define SM_BORDER_OPEN 0 | |||||
| #define SM_BORDER_VERTICAL 1 | |||||
| #define SM_BORDER_CLOSED 2 | |||||
| /* collision types */ | |||||
| #define SM_COLL_STATIC 0 | |||||
| #define SM_COLL_RIGID 1 | |||||
| #define SM_COLL_ANIMATED 2 | |||||
| /* high resolution sampling types */ | /* high resolution sampling types */ | ||||
| #define SM_HRES_NEAREST 0 | #define SM_HRES_NEAREST 0 | ||||
| #define SM_HRES_LINEAR 1 | #define SM_HRES_LINEAR 1 | ||||
| #define SM_HRES_FULLSAMPLE 2 | #define SM_HRES_FULLSAMPLE 2 | ||||
| /* smoke data fields (active_fields) */ | |||||
| #define SM_ACTIVE_HEAT (1 << 0) | |||||
| #define SM_ACTIVE_FIRE (1 << 1) | |||||
| #define SM_ACTIVE_COLORS (1 << 2) | |||||
| #define SM_ACTIVE_COLOR_SET (1 << 3) | |||||
| enum { | enum { | ||||
| VDB_COMPRESSION_BLOSC = 0, | VDB_COMPRESSION_BLOSC = 0, | ||||
| VDB_COMPRESSION_ZIP = 1, | VDB_COMPRESSION_ZIP = 1, | ||||
| VDB_COMPRESSION_NONE = 2, | VDB_COMPRESSION_NONE = 2, | ||||
| }; | }; | ||||
| typedef struct SmokeVertexVelocity { | |||||
| float vel[3]; | |||||
| } SmokeVertexVelocity; | |||||
| typedef struct SmokeDomainSettings { | typedef struct SmokeDomainSettings { | ||||
| /** For fast RNA access. */ | struct SmokeModifierData *smd; /* for fast RNA access */ | ||||
| struct SmokeModifierData *smd; | struct FLUID *fluid; | ||||
| struct FLUID_3D *fluid; | struct FLUID *fluid_old; /* adaptive domain needs access to old fluid state */ | ||||
| void *fluid_mutex; | void *fluid_mutex; | ||||
| struct Collection *fluid_group; | struct Collection *fluid_group; | ||||
| struct Collection *eff_group; // UNUSED | struct Collection *eff_group; // UNUSED | ||||
| struct Collection *coll_group; // collision objects group | struct Collection *coll_group; // collision objects group | ||||
| struct WTURBULENCE *wt; // WTURBULENCE object, if active | |||||
| struct GPUTexture *tex; | struct GPUTexture *tex; | ||||
| struct GPUTexture *tex_wt; | struct GPUTexture *tex_wt; | ||||
| struct GPUTexture *tex_shadow; | struct GPUTexture *tex_shadow; | ||||
| struct GPUTexture *tex_flame; | struct GPUTexture *tex_flame; | ||||
| struct GPUTexture *tex_flame_coba; | struct GPUTexture *tex_flame_coba; | ||||
| struct GPUTexture *tex_coba; | struct GPUTexture *tex_coba; | ||||
| struct GPUTexture *tex_field; | struct GPUTexture *tex_field; | ||||
| struct GPUTexture *tex_velocity_x; | struct GPUTexture *tex_velocity_x; | ||||
| struct GPUTexture *tex_velocity_y; | struct GPUTexture *tex_velocity_y; | ||||
| struct GPUTexture *tex_velocity_z; | struct GPUTexture *tex_velocity_z; | ||||
| float *shadow; | struct Object *guiding_parent; | ||||
| struct SmokeVertexVelocity *mesh_velocities; /* vertex velocities of simulated fluid mesh */ | |||||
| struct EffectorWeights *effector_weights; | |||||
| /* simulation data */ | /* domain object data */ | ||||
| /** Start point of BB in local space (includes sub-cell shift for adaptive domain.)*/ | float p0[3]; /* start point of BB in local space (includes sub-cell shift for adaptive domain)*/ | ||||
| float p0[3]; | float p1[3]; /* end point of BB in local space */ | ||||
| /** End point of BB in local space. */ | float dp0[3]; /* difference from object center to grid start point */ | ||||
| float p1[3]; | float cell_size[3]; /* size of simulation cell in local space */ | ||||
| /** Difference from object center to grid start point. */ | float global_size[3]; /* global size of domain axises */ | ||||
| float dp0[3]; | |||||
| /** Size of simulation cell in local space. */ | |||||
| float cell_size[3]; | |||||
| /** Global size of domain axises. */ | |||||
| float global_size[3]; | |||||
| float prev_loc[3]; | float prev_loc[3]; | ||||
| /** Current domain shift in simulation cells. */ | int shift[3]; /* current domain shift in simulation cells */ | ||||
| int shift[3]; | float shift_f[3]; /* exact domain shift */ | ||||
| /** Exact domain shift. */ | float obj_shift_f[3]; /* how much object has shifted since previous smoke frame (used to "lock" domain while drawing) */ | ||||
| float shift_f[3]; | float imat[4][4]; /* domain object imat */ | ||||
| /** | float obmat[4][4]; /* domain obmat */ | ||||
| * How much object has shifted since previous smoke frame | float fluidmat[4][4]; /* low res fluid matrix */ | ||||
| * (used to "lock" domain while drawing). | float fluidmat_wt[4][4]; /* high res fluid matrix */ | ||||
| */ | int base_res[3]; /* initial "non-adapted" resolution */ | ||||
| float obj_shift_f[3]; | int res_min[3]; /* cell min */ | ||||
| /** Domain object imat. */ | int res_max[3]; /* cell max */ | ||||
| float imat[4][4]; | int res[3]; /* data resolution (res_max-res_min) */ | ||||
| /** Domain obmat. */ | |||||
| float obmat[4][4]; | |||||
| /** Low res fluid matrix. */ | |||||
| float fluidmat[4][4]; | |||||
| /** High res fluid matrix. */ | |||||
| float fluidmat_wt[4][4]; | |||||
| /** Initial "non-adapted" resolution. */ | |||||
| int base_res[3]; | |||||
| /** Cell min. */ | |||||
| int res_min[3]; | |||||
| /** Cell max. */ | |||||
| int res_max[3]; | |||||
| /** Data resolution (res_max-res_min). */ | |||||
| int res[3]; | |||||
| int total_cells; | int total_cells; | ||||
| /** 1.0f / res. */ | float dx; /* 1.0f / res */ | ||||
| float dx; | float dt; | ||||
| /** Largest domain size. */ | float scale; /* largest domain size */ | ||||
| float scale; | |||||
| /* user settings */ | /* adaptive domain options */ | ||||
| int adapt_margin; | int adapt_margin; | ||||
| int adapt_res; | int adapt_res; | ||||
| float adapt_threshold; | float adapt_threshold; | ||||
| char _pad1[4]; /* unused */ | |||||
| /* fluid domain options */ | |||||
| int maxres; /* longest axis on the BB gets this resolution assigned */ | |||||
| int solver_res; /* dimension of manta solver, 2d or 3d */ | |||||
| int border_collisions; /* How domain border collisions are handled */ | |||||
| int flags; /* use-mesh, use-noise, etc. */ | |||||
| float gravity[3]; | |||||
| int active_fields; | |||||
| short type; /* gas, liquid */ | |||||
| char _pad2[6]; /* unused */ | |||||
| /* smoke domain options */ | |||||
| float alpha; | float alpha; | ||||
| float beta; | float beta; | ||||
| /** Wavelet amplification. */ | int diss_speed;/* in frames */ | ||||
| int amplify; | |||||
| /** Longest axis on the BB gets this resolution assigned. */ | |||||
| int maxres; | |||||
| /** Show up-res or low res, etc. */ | |||||
| int flags; | |||||
| int viewsettings; | |||||
| /** Noise type: wave, curl, anisotropic. */ | |||||
| short noise; | |||||
| short diss_percent; | |||||
| /** In frames. */ | |||||
| int diss_speed; | |||||
| float strength; | |||||
| int res_wt[3]; | |||||
| float dx_wt; | |||||
| /* point cache options */ | |||||
| int cache_comp; | |||||
| int cache_high_comp; | |||||
| /* OpenVDB cache options */ | |||||
| int openvdb_comp; | |||||
| char cache_file_format; | |||||
| char data_depth; | |||||
| char _pad[2]; | |||||
| /* Smoke uses only one cache from now on (index [0]), | |||||
| * but keeping the array for now for reading old files. */ | |||||
| /** Definition is in DNA_object_force_types.h. */ | |||||
| struct PointCache *point_cache[2]; | |||||
| struct ListBase ptcaches[2]; | |||||
| struct EffectorWeights *effector_weights; | |||||
| /** How domain border collisions are handled. */ | |||||
| int border_collisions; | |||||
| float time_scale; | |||||
| float vorticity; | float vorticity; | ||||
| int active_fields; | float active_color[3]; /* monitor smoke color */ | ||||
| /** Monitor color situation of simulation. */ | |||||
| float active_color[3]; | |||||
| int highres_sampling; | int highres_sampling; | ||||
| /* flame parameters */ | /* flame options */ | ||||
| float burning_rate, flame_smoke, flame_vorticity; | float burning_rate, flame_smoke, flame_vorticity; | ||||
| float flame_ignition, flame_max_temp; | float flame_ignition, flame_max_temp; | ||||
| float flame_smoke_color[3]; | float flame_smoke_color[3]; | ||||
| /* Display settings */ | /* noise options */ | ||||
| float noise_strength; | |||||
| float noise_pos_scale; | |||||
| float noise_time_anim; | |||||
| int res_noise[3]; | |||||
| int noise_scale; | |||||
| short noise_type; /* noise type: wave, curl, anisotropic */ | |||||
| char _pad3[2]; /* unused */ | |||||
| /* liquid domain options */ | |||||
| float particle_randomness; | |||||
| int particle_number; | |||||
| int particle_minimum; | |||||
| int particle_maximum; | |||||
| float particle_radius; | |||||
| float particle_band_width; | |||||
| /* diffusion options*/ | |||||
| float surface_tension; | |||||
| float viscosity_base; | |||||
| int viscosity_exponent; | |||||
| float domain_size; | |||||
| /* mesh options */ | |||||
| float mesh_concave_upper; | |||||
| float mesh_concave_lower; | |||||
| int mesh_smoothen_pos; | |||||
| int mesh_smoothen_neg; | |||||
| int mesh_scale; | |||||
| int totvert; | |||||
| short mesh_generator; | |||||
| char _pad4[6]; /* unused */ | |||||
| /* secondary particle options */ | |||||
| int particle_type; | |||||
| int particle_scale; | |||||
| float sndparticle_tau_min_wc; | |||||
| float sndparticle_tau_max_wc; | |||||
| float sndparticle_tau_min_ta; | |||||
| float sndparticle_tau_max_ta; | |||||
| float sndparticle_tau_min_k; | |||||
| float sndparticle_tau_max_k; | |||||
| int sndparticle_k_wc; | |||||
| int sndparticle_k_ta; | |||||
| float sndparticle_k_b; | |||||
| float sndparticle_k_d; | |||||
| float sndparticle_l_min; | |||||
| float sndparticle_l_max; | |||||
| int sndparticle_potential_radius; | |||||
| int sndparticle_update_radius; | |||||
| char sndparticle_boundary; | |||||
| char sndparticle_combined_export; | |||||
| char _pad5[6]; /* unused */ | |||||
| /* fluid guiding options */ | |||||
| float guiding_alpha; /* guiding weight scalar (determines strength) */ | |||||
| int guiding_beta; /* guiding blur radius (affects size of vortices) */ | |||||
| float guiding_vel_factor; /* multiply guiding velocity by this factor */ | |||||
| int *guide_res; /* res for velocity guide grids - independent from base res */ | |||||
| short guiding_source; | |||||
| char _pad6[6]; /* unused */ | |||||
| /* cache options */ | |||||
| int cache_frame_start; | |||||
| int cache_frame_end; | |||||
| int cache_frame_pause_data; | |||||
| int cache_frame_pause_noise; | |||||
| int cache_frame_pause_mesh; | |||||
| int cache_frame_pause_particles; | |||||
| int cache_frame_pause_guiding; | |||||
| int cache_flag; | |||||
| char cache_mesh_format; | |||||
| char cache_data_format; | |||||
| char cache_particle_format; | |||||
| char cache_noise_format; | |||||
| char cache_directory[1024]; | |||||
| char error[64]; /* Bake error description */ | |||||
| char _pad7[4]; /* unused */ | |||||
| /* time options */ | |||||
| float time_scale; | |||||
| float cfl_condition; | |||||
| /* display options */ | |||||
| char slice_method, axis_slice_method; | char slice_method, axis_slice_method; | ||||
| char slice_axis, draw_velocity; | char slice_axis, draw_velocity; | ||||
| float slice_per_voxel; | float slice_per_voxel; | ||||
| float slice_depth; | float slice_depth; | ||||
| float display_thickness; | float display_thickness; | ||||
| struct ColorBand *coba; | struct ColorBand *coba; | ||||
| float vector_scale; | float vector_scale; | ||||
| char vector_draw_type; | char vector_draw_type; | ||||
| char use_coba; | char use_coba; | ||||
| /** Simulation field used for the color mapping. */ | char coba_field; /* simulation field used for the color mapping */ | ||||
| char coba_field; | |||||
| char interp_method; | char interp_method; | ||||
| /* -- Deprecated / unsed options (below)-- */ | |||||
| /* view options */ | |||||
| int viewsettings; | |||||
| char _pad8[4]; /* unused */ | |||||
| /* OpenVDB cache options */ | |||||
| int openvdb_comp; | |||||
| float clipping; | float clipping; | ||||
| char _pad3[4]; | char data_depth; | ||||
| } SmokeDomainSettings; | char _pad9[7]; /* unused */ | ||||
| /* pointcache options */ | |||||
| /* Smoke uses only one cache from now on (index [0]), but keeping the array for now for reading old files. */ | |||||
| struct PointCache *point_cache[2]; /* definition is in DNA_object_force_types.h */ | |||||
| struct ListBase ptcaches[2]; | |||||
| int cache_comp; | |||||
| int cache_high_comp; | |||||
| /* inflow / outflow */ | } SmokeDomainSettings; | ||||
| /* type */ | /* type */ | ||||
| #define MOD_SMOKE_FLOW_TYPE_SMOKE 0 | #define FLUID_FLOW_TYPE_SMOKE 1 | ||||
| #define MOD_SMOKE_FLOW_TYPE_FIRE 1 | #define FLUID_FLOW_TYPE_FIRE 2 | ||||
| #define MOD_SMOKE_FLOW_TYPE_OUTFLOW 2 | #define FLUID_FLOW_TYPE_SMOKEFIRE 3 | ||||
| #define MOD_SMOKE_FLOW_TYPE_SMOKEFIRE 3 | #define FLUID_FLOW_TYPE_LIQUID 4 | ||||
| /* behavior */ | |||||
| #define FLUID_FLOW_BEHAVIOR_INFLOW 0 | |||||
| #define FLUID_FLOW_BEHAVIOR_OUTFLOW 1 | |||||
| #define FLUID_FLOW_BEHAVIOR_GEOMETRY 2 | |||||
| /* flow source */ | /* flow source */ | ||||
| #define MOD_SMOKE_FLOW_SOURCE_PARTICLES 0 | #define FLUID_FLOW_SOURCE_PARTICLES 0 | ||||
| #define MOD_SMOKE_FLOW_SOURCE_MESH 1 | #define FLUID_FLOW_SOURCE_MESH 1 | ||||
| /* flow texture type */ | /* flow texture type */ | ||||
| #define MOD_SMOKE_FLOW_TEXTURE_MAP_AUTO 0 | #define FLUID_FLOW_TEXTURE_MAP_AUTO 0 | ||||
| #define MOD_SMOKE_FLOW_TEXTURE_MAP_UV 1 | #define FLUID_FLOW_TEXTURE_MAP_UV 1 | ||||
| /* flags */ | /* flags */ | ||||
| enum { | #define FLUID_FLOW_ABSOLUTE (1<<1) /* old style emission */ | ||||
| /**old style emission*/ | #define FLUID_FLOW_INITVELOCITY (1<<2) /* passes particles speed to the smoke */ | ||||
| MOD_SMOKE_FLOW_ABSOLUTE = (1 << 1), | #define FLUID_FLOW_TEXTUREEMIT (1<<3) /* use texture to control emission speed */ | ||||
| /** passes particles speed to the smoke */ | #define FLUID_FLOW_USE_PART_SIZE (1<<4) /* use specific size for particles instead of closest cell */ | ||||
| MOD_SMOKE_FLOW_INITVELOCITY = (1 << 2), | #define FLUID_FLOW_USE_INFLOW (1<<5) /* control when to apply inflow */ | ||||
| /** use texture to control emission speed */ | |||||
| MOD_SMOKE_FLOW_TEXTUREEMIT = (1 << 3), | |||||
| /** use specific size for particles instead of closest cell */ | |||||
| MOD_SMOKE_FLOW_USE_PART_SIZE = (1 << 4), | |||||
| }; | |||||
| typedef struct SmokeFlowSettings { | typedef struct SmokeFlowSettings { | ||||
| /** For fast RNA access. */ | /** For fast RNA access. */ | ||||
| struct SmokeModifierData *smd; | struct SmokeModifierData *smd; | ||||
| struct Mesh *mesh; | struct Mesh *mesh; | ||||
| struct ParticleSystem *psys; | struct ParticleSystem *psys; | ||||
| struct Tex *noise_texture; | struct Tex *noise_texture; | ||||
| /* initial velocity */ | /* initial velocity */ | ||||
| /** Previous vertex positions in domain space. */ | /** Previous vertex positions in domain space. */ | ||||
| float *verts_old; | float *verts_old; | ||||
| int numverts; | int numverts; | ||||
| float vel_multi; // Multiplier for inherited velocity | float vel_multi; // Multiplier for inherited velocity | ||||
| float vel_normal; | float vel_normal; | ||||
| float vel_random; | float vel_random; | ||||
| float vel_coord[3]; | |||||
| char _pad1[4]; | |||||
| /* emission */ | /* emission */ | ||||
| float density; | float density; | ||||
| float color[3]; | float color[3]; | ||||
| float fuel_amount; | float fuel_amount; | ||||
| /** Delta temperature (temp - ambient temp). */ | /** Delta temperature (temp - ambient temp). */ | ||||
| float temp; | float temp; | ||||
| /** Density emitted within mesh volume. */ | /** Density emitted within mesh volume. */ | ||||
| float volume_density; | float volume_density; | ||||
| /** Maximum emission distance from mesh surface. */ | /** Maximum emission distance from mesh surface. */ | ||||
| float surface_distance; | float surface_distance; | ||||
| float particle_size; | float particle_size; | ||||
| int subframes; | int subframes; | ||||
| /* texture control */ | /* texture control */ | ||||
| float texture_size; | float texture_size; | ||||
| float texture_offset; | float texture_offset; | ||||
| char _pad[4]; | char _pad2[4]; | ||||
| /** MAX_CUSTOMDATA_LAYER_NAME. */ | /** MAX_CUSTOMDATA_LAYER_NAME. */ | ||||
| char uvlayer_name[64]; | char uvlayer_name[64]; | ||||
| short vgroup_density; | short vgroup_density; | ||||
| /** Smoke, flames, both, outflow. */ | short type; /* smoke, flames, both, outflow, liquid */ | ||||
| short type; | short behavior; /* inflow, outflow, static */ | ||||
| short source; | short source; | ||||
| short texture_type; | short texture_type; | ||||
| /** Absolute emission et.c*/ | short _pad3[3]; | ||||
| int flags; | int flags; /* absolute emission etc*/ | ||||
| } SmokeFlowSettings; | } SmokeFlowSettings; | ||||
| /* effector types */ | |||||
| // struct BVHTreeFromMesh *bvh; | #define FLUID_EFFECTOR_TYPE_COLLISION 0 | ||||
| // float mat[4][4]; | #define FLUID_EFFECTOR_TYPE_GUIDE 1 | ||||
| // float mat_old[4][4]; | |||||
| /* guiding velocity modes */ | |||||
| #define FLUID_EFFECTOR_GUIDING_MAXIMUM 0 | |||||
| #define FLUID_EFFECTOR_GUIDING_MINIMUM 1 | |||||
| #define FLUID_EFFECTOR_GUIDING_OVERRIDE 2 | |||||
| #define FLUID_EFFECTOR_GUIDING_AVERAGED 3 | |||||
| /* collision objects (filled with smoke) */ | /* collision objects (filled with smoke) */ | ||||
| typedef struct SmokeCollSettings { | typedef struct SmokeCollSettings { | ||||
| /** For fast RNA access. */ | /** For fast RNA access. */ | ||||
| struct SmokeModifierData *smd; | struct SmokeModifierData *smd; | ||||
| struct Mesh *mesh; | struct Mesh *mesh; | ||||
| float *verts_old; | float *verts_old; | ||||
| int numverts; | int numverts; | ||||
| short type; // static = 0, rigid = 1, dynamic = 2 | float surface_distance; /* thickness of mesh surface, used in obstacle sdf */ | ||||
| char _pad[2]; | short type; | ||||
| /* guiding options */ | |||||
| short guiding_mode; | |||||
| float vel_multi; // Multiplier for object velocity | |||||
| } SmokeCollSettings; | } SmokeCollSettings; | ||||
| #endif | #endif | ||||