POV-Ray : Newsgroups : povray.general : height field question Server Time
4 Aug 2024 10:19:40 EDT (-0400)
  height field question (Message 1 to 4 of 4)  
From: Jos Tellings
Subject: height field question
Date: 22 Jun 2003 10:35:53
Message: <oprq6at506pkmer3@localhost>
Hi,

I am using a height-field object as a mountain. I want to place trees on 
the mountain. The tree object I already have. Now I need a macro that 
translates the trees to the correct height. I read a tutorial 
(http://www.mhazelgrove.fsnet.co.uk/levtut.htm) and read that you need a 
point-array of your heightfield. How can I make a point-array of a tga-file 
that's not created by a hf-editor? Or is there another solution, without an 
array? In the tutorial, the author speaks about the 'trace' and the 
'hf_height_at' functions; I can't find anything about these in the help 
(neither POV-Ray nor MegaPOV 1.0).


Thank you very much for your help!!!

J T


Post a reply to this message

From: Christopher James Huff
Subject: Re: height field question
Date: 22 Jun 2003 10:56:33
Message: <cjameshuff-EB009C.09454522062003@netplex.aussie.org>
In article <oprq6at506pkmer3@localhost>,
 Jos Tellings <jte### [at] chellonl> wrote:

> I am using a height-field object as a mountain. I want to place trees on 
> the mountain. The tree object I already have. Now I need a macro that 
> translates the trees to the correct height. I read a tutorial 
> (http://www.mhazelgrove.fsnet.co.uk/levtut.htm) and read that you need a 
> point-array of your heightfield. How can I make a point-array of a tga-file 
> that's not created by a hf-editor? Or is there another solution, without an 
> array? In the tutorial, the author speaks about the 'trace' and the 
> 'hf_height_at' functions; I can't find anything about these in the help 
> (neither POV-Ray nor MegaPOV 1.0).

The hf_height_at feature is obsolete, and no longer exists in any 
current version. The trace() function is a well documented feature of 
the official version, however, and is a better solution than a height 
array:

http://povray.org/documentation/view/138/

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Ken
Subject: Re: height field question
Date: 22 Jun 2003 13:10:06
Message: <3EF5E392.DD1E5CAB@pacbell.net>
Jos Tellings wrote:
> 
> Hi,
> 
> I am using a height-field object as a mountain. I want to place trees on
> the mountain. The tree object I already have. Now I need a macro that
> translates the trees to the correct height.

Vegetate.inc might be a solution -

http://www.geocities.com/SiliconValley/Program/9231/povray.html

-- 
Ken Tyler


Post a reply to this message

From: Mick Hazelgrove
Subject: Re: height field question
Date: 22 Jun 2003 16:19:18
Message: <3ef60f46@news.povray.org>
The tutorial was writen long ago! I now use trace exclusively.

example:

#declare Norm = <0,0,0>;
#declare Xpos = -4;
#declare Zpos = -4;
#declare C = 0;

#while (Xpos<2)
   #while (Zpos<18)

       #declare TestPos = <Xpos,0,Zpos>
       #declare Inter = trace ( Rocks,TestPos,<0,-10,0>, Norm);

          #if (vlength(Norm)!=0)
            object{ any object you wish to place}
         #end

       mAlign(Inter,Inter+Norm)translate y*.000125
      }// end object

 #declare C=C+1;
  #declare Zpos = Zpos + 0.0238;//0.01368;
#end
  #declare Zpos = -4;
  #declare Xpos = Xpos + 0.0238;//0.01368;
#end

Hope this helps

Mick


Post a reply to this message

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