POV-Ray : Newsgroups : povray.newusers : Lost my height_field Server Time
25 Nov 2024 13:36:46 EST (-0500)
  Lost my height_field (Message 1 to 2 of 2)  
From: Architect
Subject: Lost my height_field
Date: 17 Oct 2005 16:40:01
Message: <web.43540b49ca19457ca040ba090@news.povray.org>
Hi,

I am trying to generate grassy hills and was planning on using GrassTex for
grass. When I render the scene without the macros it renders OK (with a
dumb grass texture I have come up  with) but when I try to use the macros,
I just get the sky. What am I doing wrong?

// Hills v0.6
// Date: October 2005
// Auth: Murat Erenturk


//global_settings { assumed_gamma 2.2 }

#include "colors.inc"
#include "grasstexgrasstex.inc"


#declare C_Sun=<204,162,124>/255;
#declare C_SkyTop=rgb <29,88,228>/255;
#declare C_SkyBottom=rgb <179,249,247>/255;
#declare C_Grass1=rgb <94,130,32>/255;
#declare C_Grass2=rgb <88,120,19>/255;


/*%%% LIGHTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

light_source{<100,100,-100> color White}

/*%%% SKY %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
sky_sphere {
    pigment {
          gradient z
         turbulence 0.01
        color_map{
            [0.1 color C_SkyTop ]
            [0.7 color C_SkyBottom]
        }
    scale 2
    translate -1
        }
}


/*%%% Camera %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
camera{
        location <10,0,-1.5>
        look_at <10,5,0>
      }

/*%%% GRASS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#declare gt_height = 1.0;
#declare camera_location = <1,0,-.15>;


/*%%% TERRAIN %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#declare Terrainbase=height_field{
        "hills_dat"
        smooth
        rotate <90,0,0>
        translate <0,1,0>
        scale <20,10,5>

}
#declare Terrain = object{
    Terrainbase

    texture {
             pigment{color Green
                     turbulence 1
                    scale 0.01
                    }
             normal { bumps 1 scale 0.05 }
             }
}
object{Terrain
//    gt_ground()
//    gt_grass()
//    gt_flowers()

}


Post a reply to this message

From: Mike Williams
Subject: Re: Lost my height_field
Date: 17 Oct 2005 21:14:09
Message: <nzEaTEA7nEVDFw5D@econym.demon.co.uk>
Wasn't it Architect who wrote:
>Hi,
>
>I am trying to generate grassy hills and was planning on using GrassTex for
>grass. When I render the scene without the macros it renders OK (with a
>dumb grass texture I have come up  with) but when I try to use the macros,
>I just get the sky. What am I doing wrong?

There appears to be an error in the "Quick Start" part of the grasstex
documentation. Try putting the pigments inside texture statements,
because official POV supports layered textures but not layered pigments.

object{Terrain
   texture{gt_ground()}
   texture{gt_grass()}
   texture{gt_flowers()}
}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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