POV-Ray : Newsgroups : povray.newusers : 2 problems : 2 problems Server Time
2 Nov 2024 17:19:59 EDT (-0400)
  2 problems  
From: Justin Smith
Date: 31 Oct 2003 21:55:01
Message: <web.3fa31f44e63905fc30a67eb20@news.povray.org>
I have this landscape I'm working on. I'm trying to use media to generate a
blue sky. Basically, it is a scattering media of type 4, and the color it
scatters is <.2,.2,.0001>*.0005. This gets me the blue sky I want. However,
all the objects in the scene turn blue. I have some white snow that
especially turns blue, almost the same blue as the sky. I have tried
setting ambient to 1 with radiosity turned on, but it still comes up blue.

2nd Problem: I've been trying really hard to come up with a good texture to
coat the mountains so that it looks like they have snow on top, but not
down below. This is what I have so far for that:

#declare pigment1 =
pigment
{
  slope
  {
    y, .5, 1
  }
  color_map
  {
    [0 color rgbf <0,0,0,1>]
    [.25 color rgbf <1,1,1,.9>]
    [1 color rgbf <1,1,1,0>]
  }
}

#declare pigment2 =
pigment
{
  slope
  {
    y, .5, 1
  }
  color_map
  {
    [0 color rgbf <0,0,0,1>]
    [.6 color rgbf <1,1,1,0>]
    [1 color rgbf <1,1,1,0>]
  }
}

#declare pigment3 =
pigment
{
  slope
  {
    <0,2,3>
  }
  turbulence .5
  color_map
  {
    [0 color rgbf <1,1,1,0>]
    [.4 color rgbf <1,1,1,1>]
    [.6 color rgbf <1,1,1,.6>]
    [1 color rgbf <1,1,1,1>]
  }
}

#declare rock =
  isosurface
  {
    function
    {
      (y-fnpigment2(x,y,z).gray*100)-(fnpigment1(x,y,z).gray +
fnpigment3(x,y,z).gray*10 + fnpigment4(x,y,z).gray*10 +
fnpigment5(x,y,z).gray*.05)
    }
    contained_by
    {
      box
      {
        <-5000,0,-5000>,<5000,500,5000>
      }
    }
    max_gradient 4
    texture
    {
      T_Stone44
    }
    texture
    {
      pigment
      {
        gradient y
        turbulence <0,.1,0>
        pigment_map
        {
          [0 color rgbf <1,1,1,1>]
          [.3 pigment1]
          [.79 pigment2]
          [.8 color rgbf <1,1,1,0>]
          [1 color rgbf <1,1,1,0>]
        }
        scale y*1000
      }
      finish
      {
        ambient .6
      }
    }
    texture
    {
      pigment
      {
        gradient y
        turbulence <0,.1,0>
        pigment_map
        {
          [0 color rgbf <1,1,1,1>]
          [.3 pigment3]
          [1 pigment3]
        }
        scale y*1000
      }
      finish
      {
        ambient .6
      }
    }
    scale <1,4,1>
  }

The first two declared pigments are supposed to contribute to the appearance
of snow that has accumulated on the flat parts, while it tends to fall away
from cliff-sides exposing rock. The 3rd declared pigment is supposed to add
more snow on the sides of the slopes facing directly away from the main
light_source. All of these have transparent parts because they lie on top
of the texture for the stone. This is the first texture in the actual
isosurface object. The second texture is a pigment map that is supposed to
properly combine all the declared pigments. The last one is there to make
sure that all the areas that are over a certain height are completely snow
covered.

The problem is that I have not been able to find any peaks that are
completely snow-covered. Just small scattered patches. I'm a little bit
unsure how to make sure that the top end of my gradient is at the top of
the peaks.


Post a reply to this message

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