[Bf-blender-cvs] [e8d02359cf0] master: Volumes: reduce step and default of strength in Volume Displace modifier

Jacques Lucke noreply at git.blender.org
Mon Oct 12 12:38:15 CEST 2020


Commit: e8d02359cf0853d32722ead7513bd6d28318c92d
Author: Jacques Lucke
Date:   Mon Oct 12 12:37:48 2020 +0200
Branches: master
https://developer.blender.org/rBe8d02359cf0853d32722ead7513bd6d28318c92d

Volumes: reduce step and default of strength in Volume Displace modifier

The strength has a high impact on performance. With the previous
step and default one could easily and accidentally make Blender unusably
slow, because of a too high displacement strength.

===================================================================

M	source/blender/makesrna/intern/rna_modifier.c
M	source/blender/modifiers/intern/MOD_volume_displace.cc

===================================================================

diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 5a03c2c236a..0010e473924 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -7096,6 +7096,7 @@ static void rna_def_modifier_volume_displace(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
   RNA_def_property_ui_text(prop, "Strength", "Strength of the displacement");
+  RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 0.1, 4);
   RNA_def_property_update(prop, 0, "rna_Modifier_update");
 
   prop = RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc
index 89b5a604d58..535fdc762b8 100644
--- a/source/blender/modifiers/intern/MOD_volume_displace.cc
+++ b/source/blender/modifiers/intern/MOD_volume_displace.cc
@@ -62,7 +62,7 @@ static void initData(ModifierData *md)
 {
   VolumeDisplaceModifierData *vdmd = reinterpret_cast<VolumeDisplaceModifierData *>(md);
   vdmd->texture = NULL;
-  vdmd->strength = 1.0f;
+  vdmd->strength = 0.5f;
   copy_v3_fl(vdmd->texture_mid_level, 0.5f);
   vdmd->texture_sample_radius = 1.0f;
 }



More information about the Bf-blender-cvs mailing list