POV-Ray : Newsgroups : povray.binaries.images : Artifacts in scattering media : Artifacts in scattering media Server Time
29 Jul 2024 20:13:16 EDT (-0400)
  Artifacts in scattering media  
From: jceddy
Date: 18 Sep 2013 09:45:01
Message: <web.5239ae4fbc5e76cf314aa6840@news.povray.org>
So I made this image using scattering media to get light "rays" spilling out of
a broken skull.

I am getting artifacts in the media rendering that I don't know how to
handle...I've marked them out with a red box in the attached image. Any ideas?

I've tried:
Upping the media sample min/max a lot.
Increasing the confidence.
Decreasing the variance.
Various combinations of the above.
Messing around with intervals.

Here's the code:

#version 3.7;

#include "colors.inc"
#include "glass.inc"
#include "metals.inc"
#include "stones.inc"
#include "skies.inc"
#include "woods.inc"
#include "golds.inc"
#include "textures.inc"
#include "transforms.inc"

#include "skullmodel_POV_geom.inc"

global_settings
{
  assumed_gamma 2.2
  ambient_light 1
}

#default{ finish{ ambient 0.1 diffuse 0.9 }}

camera {
  orthographic
  location <0,0,200>     // position & direction of view
  look_at  <0,0,0>
  right    x*24.5
  up       y*14.5
}

light_source {
  0*x                  // light's position (translated below)
  color rgb <1,1,1>    // light's color
  translate <3, 2.25, 400>
  media_interaction off
}

light_source {
  0*x                  // light's position (translated below)
  color rgb <1,1,1>    // light's color
  translate <0, 0, 10>
}

#declare Min = min_extent(skull_01___Default_);
#declare Max = max_extent(skull_01___Default_);
#declare ScaleFactor = max(Max.x - Min.x, max(Max.y - Min.y, Max.z - Min.z));

#declare skull_ =
object{
  skull_01___Default_

  Center_Trans(skull_01___Default_, x)
  Center_Trans(skull_01___Default_, y)
  Center_Trans(skull_01___Default_, z)

  scale 2/ScaleFactor
}

#declare iso_ =
isosurface {
  function{
    x-f_snoise3d(x, y, z)*5
  }
  contained_by { box {<-10,-10,-10>, <10, 10, 10> } }
  accuracy 0.003
}

intersection {
  object { skull_ scale 5.0 }
  object { iso_ }

  texture {
    pigment {
      color White
    }
    finish {
      specular 0
      roughness 0.09632328
      ambient 0.1

      diffuse 0.7
      reflection 0.2
    }
  }

  translate 10*z
}

sphere {
  <0, 0, 10>, 25

  texture {
    pigment { rgbf 1 }
    finish { ambient 0 }
  }

  interior {
    media {
      scattering { 4, rgb 1 }

      density {
        spherical
        density_map {
          [0 rgb 0.0]
          [1 rgb 0.2]
        }

        scale 10

        translate 10*z
      }

      samples 40, 400
    }
  }

  hollow on
}


Post a reply to this message


Attachments:
Download 'skullthingie02.jpg' (129 KB)

Preview of image 'skullthingie02.jpg'
skullthingie02.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.