From 62a819202e79ed41651a1e3d9b686a6363ef20cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastia=CC=81n=20Barschkis?= Date: Mon, 20 Jul 2020 18:35:29 +0200 Subject: Fluid: Refactored smoke noise system This refactor is in response to reports in which the adaptive domain with noise caused a crash (e.g. T79009). It should also fix issues where the smoke appeared to be cut off when using the adaptive domain together with noise. It is also possible that some of these changes improve the lines issue from T74559. --- intern/mantaflow/extern/manta_fluid_API.h | 68 ++++++++++--------------------- 1 file changed, 22 insertions(+), 46 deletions(-) (limited to 'intern/mantaflow/extern') diff --git a/intern/mantaflow/extern/manta_fluid_API.h b/intern/mantaflow/extern/manta_fluid_API.h index 1dbfc6bdd9c..3da1d8f53f0 100644 --- a/intern/mantaflow/extern/manta_fluid_API.h +++ b/intern/mantaflow/extern/manta_fluid_API.h @@ -111,46 +111,16 @@ float *manta_get_phioutstatic_in(struct MANTA *fluid); /* Smoke functions */ void manta_smoke_export_script(struct MANTA *smoke, struct FluidModifierData *fmd); -void manta_smoke_export(struct MANTA *smoke, - float *dt, - float *dx, - float **dens, - float **react, - float **flame, - float **fuel, - float **heat, - float **vx, - float **vy, - float **vz, - float **r, - float **g, - float **b, - int **flags, - float **shadow); -void manta_smoke_turbulence_export(struct MANTA *smoke, - float **dens, - float **react, - float **flame, - float **fuel, - float **r, - float **g, - float **b, - float **tcu, - float **tcv, - float **tcw, - float **tcu2, - float **tcv2, - float **tcw2); void manta_smoke_get_rgba(struct MANTA *smoke, float *data, int sequential); -void manta_smoke_turbulence_get_rgba(struct MANTA *smoke, float *data, int sequential); +void manta_noise_get_rgba(struct MANTA *smoke, float *data, int sequential); void manta_smoke_get_rgba_fixed_color(struct MANTA *smoke, float color[3], float *data, int sequential); -void manta_smoke_turbulence_get_rgba_fixed_color(struct MANTA *smoke, - float color[3], - float *data, - int sequential); +void manta_noise_get_rgba_fixed_color(struct MANTA *smoke, + float color[3], + float *data, + int sequential); void manta_smoke_ensure_heat(struct MANTA *smoke, struct FluidModifierData *fmd); void manta_smoke_ensure_fire(struct MANTA *smoke, struct FluidModifierData *fmd); void manta_smoke_ensure_colors(struct MANTA *smoke, struct FluidModifierData *fmd); @@ -177,17 +147,23 @@ float *manta_smoke_get_emission_in(struct MANTA *smoke); int manta_smoke_has_heat(struct MANTA *smoke); int manta_smoke_has_fuel(struct MANTA *smoke); int manta_smoke_has_colors(struct MANTA *smoke); -float *manta_smoke_turbulence_get_density(struct MANTA *smoke); -float *manta_smoke_turbulence_get_fuel(struct MANTA *smoke); -float *manta_smoke_turbulence_get_react(struct MANTA *smoke); -float *manta_smoke_turbulence_get_color_r(struct MANTA *smoke); -float *manta_smoke_turbulence_get_color_g(struct MANTA *smoke); -float *manta_smoke_turbulence_get_color_b(struct MANTA *smoke); -float *manta_smoke_turbulence_get_flame(struct MANTA *smoke); -int manta_smoke_turbulence_has_fuel(struct MANTA *smoke); -int manta_smoke_turbulence_has_colors(struct MANTA *smoke); -void manta_smoke_turbulence_get_res(struct MANTA *smoke, int *res); -int manta_smoke_turbulence_get_cells(struct MANTA *smoke); +float *manta_noise_get_density(struct MANTA *smoke); +float *manta_noise_get_fuel(struct MANTA *smoke); +float *manta_noise_get_react(struct MANTA *smoke); +float *manta_noise_get_color_r(struct MANTA *smoke); +float *manta_noise_get_color_g(struct MANTA *smoke); +float *manta_noise_get_color_b(struct MANTA *smoke); +float *manta_noise_get_texture_u(struct MANTA *smoke); +float *manta_noise_get_texture_v(struct MANTA *smoke); +float *manta_noise_get_texture_w(struct MANTA *smoke); +float *manta_noise_get_texture_u2(struct MANTA *smoke); +float *manta_noise_get_texture_v2(struct MANTA *smoke); +float *manta_noise_get_texture_w2(struct MANTA *smoke); +float *manta_noise_get_flame(struct MANTA *smoke); +int manta_noise_has_fuel(struct MANTA *smoke); +int manta_noise_has_colors(struct MANTA *smoke); +void manta_noise_get_res(struct MANTA *smoke, int *res); +int manta_noise_get_cells(struct MANTA *smoke); /* Liquid functions */ void manta_liquid_export_script(struct MANTA *smoke, struct FluidModifierData *fmd); -- cgit v1.2.3