POV-Ray : Newsgroups : povray.newusers : a simple surface : Re: a simple surface Server Time
2 Nov 2024 09:21:04 EDT (-0400)
  Re: a simple surface  
From: Alain
Date: 24 Jun 2004 14:36:51
Message: <40db1f43$1@news.povray.org>
Mike Williams nous apporta ses lumieres ainsi en ce 24/06/2004 03:20... :

>
>A PPM file looks a bit like this
>
>P3
>240 240
>255
>1 1 1 3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 20 20 20 0 0 0 0 0 0 0 0
>0 0 0 0 20 20 20 1 1 1 1 1 1 5 5 5 5 5 5 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
>0 0 3 3 3 0 0 0 0 0 0 1 1 1 3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3
>3 3 0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 3 3 3 0
>0 0 0 0 0 3 3 3 3 3 3 0 0 0 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
>5 5 5 5 5 5 5 5 3 3 3 3 3 3 0 0 0 3 ...
>
>The first line is "P3"
>  
>
Looking at this, I think that you could generate that PPM file directly, 
as you said that you can adjust the format/syntax as needed.
When reading RGB values for a hight_field, POV Ray use the red and green 
chanels to determine a 16 bits value for the hight of each elements. Low 
values under 256 use only the red, values greater than 255 start using 
the green chanel, the blue chanel is ignored. Unscaled hight_field are 
1*1*1 arbitrary unit and must be scaled to the size you want.

Alain


Post a reply to this message

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