POV-Ray : Newsgroups : povray.macintosh : Layered texture problem : Layered texture problem Server Time
3 Jul 2024 04:25:44 EDT (-0400)
  Layered texture problem  
From: Xplo Eristotle
Date: 17 Jul 1999 22:41:58
Message: <37913F01.21A4@unforgettable.com>
First I want to say "good job" to the Mac POV-Ray guys out there, I'm
using 3.1g on a 68k Mac and I haven't hit a bug yet. If this is going to
be the last 68k version, at least you guys seem to have gotten it right.
:)

But now onto my problem...

I've been trying to create a scene that uses a height field as terrain,
and the field is superimposed on a box which is meant to look like
water. (The idea is for the water to sit in the lower parts of the
field, but still allow the field to be visible under the surface of the
water. It doesn't work as intended, but I tried. Testing reflection and
transparency effects takes a long time on an LC040/25, you know. -_-; )

Anyway, the field has two texture layers on it. The first one (and hence
the "bottom" layer) is a bright sandy agate that works marvellously to
produce sand. The second is a y gradient composed of bands of dark
filtering brown and complete transparency, which is intended to darken
the parts of the height field that are touching the edge of the water
(for a "wet sand" look).

The problem is that when I apply the two textures to the side of a
simple box (for testing), they combine as expected, but when applied to
the height field the second texture doesn't show up.

Here's the height field code, in case anyone can glean anything helpful
from it:

height_field
	{
	tga "dirt.tga"
	smooth
	texture
		{
		pigment
			{
			agate
			color_map
				{
				[0.2 color rgb <1,.9,.8>]
				[0.4 color rgb <.8,.7,.6>]
				[0.7 color rgb <1,.8,.6>]
				[1 color rgb <.8,.6,.4>]
				}
			}
		}
	texture
		{
		pigment
			{
			gradient y
			color_map
				{
				[0.4375 color rgbf <1,1,1,1>]
				[0.4375 color rgbf <.5,.5,.5,1>]
				[0.6 color rgbf <.5,.5,.5,1>]
				[0.6 color rgbf <1,1,1,1>]
				}
			scale 4
			translate <0,-2,0>
			}
		}
	scale <150,4,150>
	translate <-75,-2,-10>
	}

Does transforming an object also transform its texture(s)? I wouldn't
expect it to, but if so, that might explain my problem (it hadn't
occurred to me until just now).

If this isn't enough information, I can provide the scene file as well
as the Targa file for the height field (warning: the .tga is a few
hundred k) and a 640 x 480 PICT.


Post a reply to this message

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