POV-Ray : Newsgroups : povray.general : Interested in 16-bit height field functions? : Re: Interested in 16-bit height field functions? Server Time
30 Jul 2024 08:25:33 EDT (-0400)
  Re: Interested in 16-bit height field functions?  
From: mone
Date: 10 Jan 2010 15:40:01
Message: <web.4b4a39f0dee126c3fa00a0a00@news.povray.org>
Thanks to all of you for the useful advice!


stbenge <UN### [at] hotmailcom> wrote:

> #default{finish{ambient 1}}
>
> camera{
>   orthographic
>   right x*2 up y*2
>   location -z*100
>   look_at 0
> }
>
> #include"functions.inc"
>
> plane{z,0
>   pigment{
>    function{
>     f_hex_x(x,y,z, 0)
>    }
>    color_map{[.7 rgb 0][.9 rgb 1]}
>    scale .25
>   }
> }
>
> // end code
>

I tried this function and it can generate textures suitable for the heightfield
very quickly, thanks for the code! I tried some changes with the color map in
the code, and wonder if it's possible to change it in a way, that you don't get
a gradient, but only a white on black pattern?
Because all kinds of gradients, which at first I hoped would maybe result in a
rounded or bevelled looking edge in the heightfield instead made it looking
either jagged or make some strange sort of tiny stripes on the heightfield
walls.
So I removed the gradients in Photoshop (which can handle 16bit grayscale png)
and put a gray border around the white edge without antialiasing.
It still looked a little jagged but a lot better than with the gradients.

Another possibility was to cut a little of the top of the heightfield off with
csg. Now all edges looked perfectly smooth, but they also looked a bit boring,
because the top of the edges reflect the radiosity all in the same way and have
the same color. I'm still experimenting with that, though.

>
> I encourage you to continue reading as much of the documentation as you
> can. This way, when a problem arises, solutions will start popping up.
> POV-Ray is one of those programs that lets you accomplish many tasks in
> several different ways.

Yes. I had searched "hexagon" in the documentation, but I hadn't found the code
in the functions.inc, because it's abbreviated to "hex" there and it didn't show
up in the search result. I should definitely read more in the doc, but the
problem is, before I'm even partly through I've already forgotten completely
about what I had read in the beginning. I'm not good at memorizing things. I
remember I had read  through the functions.inc half a year or so ago, but I
didn't even remember there was this hex-function in there.
>
> I released some hexagonal patterns a while back, you might want to check
> them out:
>
http://news.povray.org/povray.binaries.scene-files/message/%3C482478cb%40news.povray.org%3E/#%3C482478cb%40news.povra
y.org%3E

Yes they look groovy :)
The little yellow star thing inspired me to try to make a whole field of sphere
sweep hexagons in a row with a while loop. But I still haven't figured out the
correct distance between them.




Alain <aze### [at] qwertyorg> wrote:

>
> You can use a small tile that you use many times. That tile only covers
> one complete hex and just enough of 4 adjacent ones to create a
> continous pattern when tilled. That smaller tile can have much finner
> grain than a single one covering the whole thing.

I thought I could use tiles only with textures/pigments and so on. I don't know
how to put them on heightfields? Because in the documentation I didn't found any
"repeat" statement in the description for heightfields, so I thought tiles are
not possible. But maybe I missed some essential point, it wouldn't be the first
time :).

Best wishes

Simone


Post a reply to this message

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