diff options
Diffstat (limited to 'render_povray')
-rw-r--r-- | render_povray/render.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/render_povray/render.py b/render_povray/render.py index daad92fa..4546aa4f 100644 --- a/render_povray/render.py +++ b/render_povray/render.py @@ -465,9 +465,9 @@ def write_pov(filename, scene=None, info_callback=None): if material.subsurface_scattering.use: subsurface_scattering = material.subsurface_scattering tabWrite("subsurface { translucency <%.3g, %.3g, %.3g> }\n" % ( - (subsurface_scattering.radius[0]) * subsurface_scattering.color[0], - (subsurface_scattering.radius[1]) * subsurface_scattering.color[1], - (subsurface_scattering.radius[2]) * subsurface_scattering.color[2], + (subsurface_scattering.radius[0]), + (subsurface_scattering.radius[1]), + (subsurface_scattering.radius[2]) ) ) @@ -1435,6 +1435,10 @@ def write_pov(filename, scene=None, info_callback=None): ci3 = vertCols[col3[0], col3[1], col3[2], material_index][0] else: # Colour per material - flat material colour + if material.subsurface_scattering.use: + diffuse_color = [i*j for i,j in zip(material.subsurface_scattering.color[:], material.diffuse_color[:])] + else: + diffuse_color = material.diffuse_color[:] ci1 = ci2 = ci3 = vertCols[diffuse_color[0], diffuse_color[1], \ diffuse_color[2], f.material_index][0] |