POV-Ray : Newsgroups : povray.binaries.images : Gradient problem Server Time
20 Nov 2024 08:18:54 EST (-0500)
  Gradient problem (Message 1 to 4 of 4)  
From: Xilo Musimene
Subject: Gradient problem
Date: 13 Jun 2003 21:24:25
Message: <3EEA7949.5010909@hotpop.com>
Hi,
   I have a background image that I would like to darken at some place 
to change the final elevation of a resulting heightfield.

I decided to use triangles (because the data that creates the shape is 
suitable for triangles).  When I want the color to be exactly the 
background I specify my triangle's Z coord to be 0.5 and when I want the 
color to be totally black I set Z to 0.

Then I use a gradient to colorize the elevation of my triangles, like so:

pigment {
  gradient z
  color_map {
    [0.0 color rgbf <0,0,0,1>]
    [0.5 color rgbf <1,1,1,1>]
  }
}

Now, I've tried with rgbt, with any kinds of values and I don't seem to 
get a good result.

If you look at my image you will see like a pair of lips; that is you 
see it gets lighter at the extremities and when going to the center it 
finally gets dark.

I would like it to be the color of the bg at the extremities and simply 
darken towards the center.

BTW, center is rgbf <0,0,0,1> and the extremities of the "lips" are at 
rgbf <1,1,1,1>

What should I do to avoid the "lips" problem?

Thanks,
   Xilo

-- 
Dedicated to audio/visual and interactive artwork.
http://www.geocities.com/simonlemieux/


Post a reply to this message

From: Xilo Musimene
Subject: Gradient problem (Image)
Date: 13 Jun 2003 21:27:06
Message: <3EEA79EA.2080504@hotpop.com>
Sorry, here's the example image.

-- 
Dedicated to audio/visual and interactive artwork.
http://www.geocities.com/simonlemieux/


Post a reply to this message


Attachments:
Download 'test.jpg' (1 KB)

Preview of image 'test.jpg'
test.jpg


 

From: Tek
Subject: Re: Gradient problem (Image)
Date: 13 Jun 2003 21:54:51
Message: <3eea806b@news.povray.org>
Well that is the error you'd get if you used rgbt <0,0,0,0> and rgbt <1,1,1,1>,
because halfway between the two you'd get a grey colour... But I can't explain
why it would happen with rgbf.

Personally I always use transmit because it behaves like alpha blending, which I
understand better than filtering. For the effect you want you could just use
rgbt <0,0,0,0> and rgbt <0,0,0,1>. But you probably know that already.

Sorry I could be much help :(
--
Tek
http://www.evilsuperbrain.com


Post a reply to this message

From: Xilo Musimene
Subject: Re: Gradient problem (Image)
Date: 13 Jun 2003 22:26:54
Message: <3EEA87EF.3090005@hotpop.com>
> For the effect you want you could just use
> rgbt <0,0,0,0> and rgbt <0,0,0,1>. But you probably know that already.

Hehehe, from the time I posted and now I haven't stopped trying anything 
possible and finally came to the same conclusion as you...

I now use rgbt <0,0,0,0> and rgbt <0,0,0,1> and it works perfectly!

Now I just have to arrange my data and I'll post an image of what it 
looks like!

Thanks,
   Xilo

-- 
Dedicated to audio/visual and interactive artwork.
http://www.geocities.com/simonlemieux/


Post a reply to this message

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