POV-Ray : Newsgroups : povray.macintosh : Re: Layered texture problem Server Time
24 Nov 2024 14:04:11 EST (-0500)
  Re: Layered texture problem (Message 1 to 5 of 5)  
From: Thorsten Froehlich
Subject: Re: Layered texture problem
Date: 18 Jul 1999 03:58:46
Message: <37918936@news.povray.org>
Hello, would anybody here in the newusers group be so kind help him?

    Thanks in advance, Thorsten

In article <379### [at] unforgettablecom> , Xplo Eristotle
<inq### [at] unforgettablecom>  wrote:
> But now onto my problem...

> 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>
>  }

I have cross-posted your problem to povray.newusers because there you get a
much more qualified response from experienced artists :-)

> 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).

Yes.

> 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.

Hmm, I don't think that is needed. Usually any heigh-field can be used to
reproduce your problem.




> 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.
> :)

Thanky you!  And yet, it will definetly be the last version for 68K Macs.

> 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. -_-; )

Yes, sad but true - without a floating-point unit it is another 10 times
slower...


     Thorsten


____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Ken
Subject: Re: Layered texture problem
Date: 18 Jul 1999 04:51:19
Message: <37919516.1CA8DDF9@pacbell.net>
Thorsten Froehlich wrote:
> 
> Hello, would anybody here in the newusers group be so kind help him?
> 
>     Thanks in advance, Thorsten

You bet !

> > But now onto my problem...
> 
> > 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:

  Try the following changes and see if they help. What I did was reduce the
filter amount in the second layer a bit plus added a finish statement to
each texture. This allows you to control how "bright" the underlying layer
is to a certain extent along with the filtering amount controlling how
much of the lower layer is allowed to show through. It looked pretty good
with the HF I applied it to using the settings I choose below but you
need to tailor them to your own scene. I also added a little turbulence
to the gradient pattern so it looked a little more natural rather than
perfectly banded gradients.

 height_field
  {
  tga "dirt.tga"
  smooth translate <-.5,0,-.5>
  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>]
     }
    }
   finish
    {
      ambient .3 diffuse .45 // change these to make this layer lighter/darker
     }
    }
  texture
   {
   pigment
    {
    gradient y
     turbulence <.1,.3,.1>
    color_map
     {
     [0.4375 rgbf < 1, 1, 1,.51>]
     [0.4375 rgbf <.5,.5,.5,.51>]
     [0.6000 rgbf <.5,.5,.5,.51>]
     [0.6000 rgbf < 1, 1, 1,.51>]
     }
    scale 4
    translate <0,-2,0>
    }
     finish
      {
      ambient .13 diffuse .2 // change these to make this layer lighter/darker
     }
   }
  scale <150,4,150> 
   translate <-75,-2,-10>
 }


-- 
Ken Tyler
  
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm


Post a reply to this message

From: Xplo Eristotle
Subject: Re: Layered texture problem
Date: 18 Jul 1999 05:12:20
Message: <37919A82.18A0@unforgettable.com>
Thorsten Froehlich wrote:
> 
> I have cross-posted your problem to povray.newusers because there you get a
> much more qualified response from experienced artists :-)

Who knew? ^_^

> > 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).
> 
> Yes.

Mreh! No wonder the gradient wasn't sitting where I thought it would be.
Thanks.

(BTW, thanks to Ken for his advice as well. I was trying to keep the
number of variables affecting the sand's brightness to a minimum,
though.. at the speed this thing runs, I can't afford to try to tweak
half a dozen variables. By the time I'd be done, people would be tossing
better Macs than mine in dumpsters. ^_- )

-Xplo


Post a reply to this message

From: Ken
Subject: Re: Layered texture problem
Date: 18 Jul 1999 06:03:15
Message: <3791A5F1.5AB2B0CA@pacbell.net>
Xplo Eristotle wrote:

> (BTW, thanks to Ken for his advice as well. I was trying to keep the
> number of variables affecting the sand's brightness to a minimum,
> though.. at the speed this thing runs, I can't afford to try to tweak
> half a dozen variables. By the time I'd be done, people would be tossing
> better Macs than mine in dumpsters. ^_- )
> 
> -Xplo

  If you a concerned about time maybe you shouldn't be raytracing :)

Seriously the few minor adjustments I made to your Hf code added little
to nothing extra to the render time. Add to that the fact that they
give you better control over your textures they should not be dismissed
out of hand. Adding reflection, phong and specular highlights, and
things like area lights are what really add greatly to render times and
not the simple ambient and diffuse settings I threw in there.

-- 
Ken Tyler
  
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm


Post a reply to this message

From: Xplo Eristotle
Subject: Re: Layered texture problem
Date: 18 Jul 1999 16:39:40
Message: <37923B9A.A66@unforgettable.com>
Ken wrote:
> 
> Xplo Eristotle wrote:
> 
> > (BTW, thanks to Ken for his advice as well. I was trying to keep the
> > number of variables affecting the sand's brightness to a minimum,
> > though.. at the speed this thing runs, I can't afford to try to tweak
> > half a dozen variables. By the time I'd be done, people would be tossing
> > better Macs than mine in dumpsters. ^_- )
> >
> > -Xplo
> 
>   If you a concerned about time maybe you shouldn't be raytracing :)

-_-; I know...

> Seriously the few minor adjustments I made to your Hf code added little
> to nothing extra to the render time.

I understand that. But they have to be tweaked, and tested, and that
means more rendering. And that means that I have to spend the next few
hours with the marquee trying to get an idea of how the setings will
work before letting it run overnight (and part of the morning) in order
to find out whether it worked as well as testing indicated.. and if not,
I repeat the process again the next day.

To be honest, the slow render times don't bother me when I'm trying to
produce final output. It's the slow testing that kills me.

-Xplo


Post a reply to this message

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