## Povray polygon texturing

### Povray polygon texturing

Hi.

I'm looking for simple way to texture a polygon (or group of)
so that the color of the polygon would be darker in the middle,
and lighter towards the edges.
A pattern, preferably.

I can see no simple way of doing this and google is not with me today.
On could compose gradients of the outer edges of the polygon, but this
is quite tedious, and it will fail when applied to two polygons next to one
another.

Also, when dealing with simple convex polygons using spherical mapping
is a good approximation, but when there is two such next to another and the
texture should be continous, it will not work.

What do I need this for? I'm trying to build hexagonal maps for a game, and
there are some components such as water that need to be continous and also
follow the forms of the map.

You can see a helpful prototype at: http://cocoon.it.jyu.fi/~aleator/map.png
The forest looks decent and the city is nearly acceptable but the water is
too clean: there should be a different colour at the edges of the water,
and it would need some turbulence.

Any ideas how to accomplish this easily?

Also is there an easy way of blending textures that live on overlapping
polygons?

- Ville Tirronen

### Povray polygon texturing

With uv-coordinates it's easy to pick any part of a pattern on the
vertices of the triangle.

--
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -

Does anyone know of where I can find good source to replace Delphi's
polygon() method?  I am also looking for a textured polygon procedure as
well for 4 sided images.

If you have some old source that is for Turbo Pascal, I may be able to use
it by converting it to delphi.  Most of the source I've seen had lots of
spagetti code.  If they were well comented, it would have made made my life
easier.

-rottweiler

8. 3d-card