diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-01-23 10:39:29 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-01-23 10:39:40 +0300 |
commit | e9452f909cdba368f54637cd0b15ff14d1c60cf3 (patch) | |
tree | 7d276fa9063f351e8b9f128f4436b87c2338c764 /source/blender/editors/space_view3d | |
parent | 275abd14a0963a42aeb6e7fcd9b61ac8bc00da42 (diff) |
Implementation of OpenVDB as a possible cache format for smoke
simulations.
This commits implements OpenVDB as an extra cache format in the Point
Cache system for smoke simulations. Compilation with the library is
turned off by default for now, and shall be enabled when the library is
present.
A documentation of its doings is available here: http://
wiki.blender.org/index.php/User:Kevindietrich/OpenVDBSmokeExport.
A guide to compile OpenVDB can be found here (Linux): http://
wiki.blender.org/index.php?title=Dev:Doc/Building_Blender/Linux/
Dependencies_From_Source#OpenVDB
Reviewers: sergey, lukastoenne, brecht, campbellbarton
Reviewed By: brecht, campbellbarton
Subscribers: galenb, Blendify, robocyte, Lapineige, bliblubli,
jtheninja, lukasstockner97, dingto, brecht
Differential Revision: https://developer.blender.org/D1721
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 732d699d48f..84cb28b3fc0 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -7812,9 +7812,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short /* draw adaptive domain bounds */ if ((sds->flags & MOD_SMOKE_ADAPTIVE_DOMAIN) && !render_override) { - float p0[3], p1[3]; - BoundBox bb; /* draw domain max bounds */ + BoundBox bb; + float p0[3], p1[3]; VECSUBFAC(p0, sds->p0, sds->cell_size, sds->adapt_res); VECADDFAC(p1, sds->p1, sds->cell_size, sds->adapt_res); BKE_boundbox_init_from_minmax(&bb, p0, p1); @@ -7825,6 +7825,20 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short BKE_boundbox_init_from_minmax(&bb, sds->p0, sds->p1); draw_box(bb.vec); #endif + + + /* draw a single voxel to hint the user about the resolution of the fluid */ + copy_v3_v3(p0, sds->p0); + + if (sds->flags & MOD_SMOKE_HIGHRES) { + madd_v3_v3v3fl(p1, p0, sds->cell_size, 1.0f / (sds->amplify + 1)); + } + else { + add_v3_v3v3(p1, p0, sds->cell_size); + } + + BKE_boundbox_init_from_minmax(&bb, p0, p1); + draw_box(bb.vec, false); } /* don't show smoke before simulation starts, this could be made an option in the future */ |