diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-12-30 01:19:38 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-12-30 03:04:02 +0400 |
commit | 889d77e6f67e8da70a7cd7dcec6eec12bd996d9f (patch) | |
tree | 16a27ead241306ceafe3f5741b8c9e65d785f68c /intern/cycles/blender/addon | |
parent | af128c4c9655c57b860010746dc7b5707c6520ba (diff) |
Cycles Volume Render: heterogeneous (textured) volumes support.
Volumes can now have textured colors and density. There is a Volume Sampling
panel in the Render properties with these settings:
* Step size: distance between volume shader samples when rendering the volume.
Lower values give more accurate and detailed results but also increased render
time.
* Max steps: maximum number of steps through the volume before giving up, to
protect from extremely long render times with big objects or small step sizes.
This is much more compute intensive than homogeneous volume, so when you are not
using a texture you should enable the Homogeneous Volume option in the material
or world for faster rendering.
One important missing feature is that Generated texture coordinates are not yet
working in volumes, and they are the default coordinates for nearly all texture
nodes. So until that works you need to plug in object texture coordinates or a
world space position.
This is work by "storm", Stuart Broadfoot, Thomas Dinges and myself.
Diffstat (limited to 'intern/cycles/blender/addon')
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 22 | ||||
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 15 |
2 files changed, 33 insertions, 4 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index e446e4711e4..6ee79394d92 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -302,6 +302,20 @@ class CyclesRenderSettings(bpy.types.PropertyGroup): default=True, ) + cls.volume_step_size = FloatProperty( + name="Step Size", + description="Distance between volume shader samples when rendering the volume. Lower values give more accurate and detailed results but also increased render time.", + default=0.1, + min=0.0000001, max=100000.0 + ) + + cls.volume_max_steps = IntProperty( + name="Max Steps", + description="Maximum number of steps through the volume before giving up, to protect from extremely long render times with big objects or small step sizes.", + default=1024, + min=2, max=65536 + ) + cls.film_exposure = FloatProperty( name="Exposure", description="Image brightness scale", @@ -509,8 +523,8 @@ class CyclesMaterialSettings(bpy.types.PropertyGroup): ) cls.homogeneous_volume = BoolProperty( name="Homogeneous Volume", - description="When using volume rendering, assume volume has the same density everywhere, " - "for faster rendering", + description="When using volume rendering, assume volume has the same density everywhere" + "(not using any textures), for faster rendering", default=False, ) @@ -579,8 +593,8 @@ class CyclesWorldSettings(bpy.types.PropertyGroup): ) cls.homogeneous_volume = BoolProperty( name="Homogeneous Volume", - description="When using volume rendering, assume volume has the same density everywhere, " - "for faster rendering", + description="When using volume rendering, assume volume has the same density everywhere" + "(not using any textures), for faster rendering", default=False, ) diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 02d1dfb1542..969f13017ca 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -152,6 +152,21 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel): draw_samples_info(layout, cscene) +class CyclesRender_PT_volume_sampling(CyclesButtonsPanel, Panel): + bl_label = "Volume Sampling" + bl_options = {'DEFAULT_CLOSED'} + + def draw(self, context): + layout = self.layout + + scene = context.scene + cscene = scene.cycles + + split = layout.split() + split.prop(cscene, "volume_step_size") + split.prop(cscene, "volume_max_steps") + + class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel): bl_label = "Light Paths" bl_options = {'DEFAULT_CLOSED'} |