POV-Ray : Newsgroups : povray.binaries.images : The Colony Ship Server Time
5 Jul 2024 03:19:47 EDT (-0400)
  The Colony Ship (Message 54 to 63 of 73)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Stephen
Subject: Re: The Colony Ship
Date: 14 Feb 2016 15:14:46
Message: <56c0e036$1@news.povray.org>
On 2/14/2016 7:50 PM, Sven Littkowski wrote:
> Hi Alain, not sure if I understood.
>
> You're saying, that I could use a full-color image as heightfield? Like
> the same file for texture and heightfield? But I am thinking, a texture
> that shows green meadows and brown (soil) paths through them, would give
> me the accurate heights. But maybe I am misunderstanding.
>
> Or do you mean, instead of a gray-scale image, I should use a red-scale
> image (or green-scale, or blue-scale)? Can you explain in easier words
> for me, or give me a sample image? Thanks.

I think that Alain means that you should use one of the red, green or 
blue components of your greyscale image instead of all of them. This 
will make the parsing a bit quicker. You will get the same result.

-- 

Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: The Colony Ship
Date: 14 Feb 2016 15:17:11
Message: <56c0e0c7@news.povray.org>
Am 14.02.2016 um 20:50 schrieb Sven Littkowski:
> Hi Alain, not sure if I understood.
> 
> You're saying, that I could use a full-color image as heightfield? Like
> the same file for texture and heightfield? But I am thinking, a texture
> that shows green meadows and brown (soil) paths through them, would give
> me the accurate heights. But maybe I am misunderstanding.
> 
> Or do you mean, instead of a gray-scale image, I should use a red-scale
> image (or green-scale, or blue-scale)? Can you explain in easier words
> for me, or give me a sample image? Thanks.

Alain is saying the following:

- You are currently using a grayscale image.

- When evaluating a grayscale image, for the sake of functionality it is
irrelevant whether you evaluate the .red, .blue or .green component, or
the .gray pseudo-component, because in a grayscale image they are
guaranteed to all have the same value.

- Using the .gray pseudo-component comes at a performance disadvantage,
because it evaluates the .red, .blue AND .green components, then
computes a weighted average of them.

=> You should use .gred (or .blue or .green) instead of .gray in your code.


(The above is true even if the input image is a true grayscale image
having a single brightness channel instead of three colour channels,
because image format details like number of channels are abstracted away
at a very low level, and POV-Ray always uses a 4-channel RGBA interface
when evaluating an image_map.)


Post a reply to this message

From: Kenneth
Subject: Re: The Colony Ship
Date: 14 Feb 2016 15:55:00
Message: <web.56c0e710ce53235433c457550@news.povray.org>
Sven Littkowski <jam### [at] yahoocom> wrote:
> Kenneth,
>
> See here the image. The twisted real heightfield remains gray as the
> original image is, and also does not show any heights. It is just like
> an ordinary image texture wrapped along a cylinder.
>
> I also include a down-sized version of the heightfield image (the
> original is 10,000x10,000, this one is only 1,000x1,000)
>

(actually it's only 240 X 240)

Well...I DO see the height_field, and the embossed heightfield image. Of course,
I added lights, a camera, and re-scaled the HF so I could work with it easily. I
also upped your green color brightness. Note that specifying just
pigment{rgb < 0.05, 0.25, 0.0 > will use POV-Ray's default finish etc. (And your
green color is kind of dark.) I would urge you to use a full texture statement.

Did you include the final declared object in your scene?? Like...
object{MyLandscape}
That wasn't in your code; I'm assuming you did include it.

Maybe your media is 'hiding' the height_field??

By the way-- I noticed that your uploaded grayscale .jpeg image_map has a
slightly different name than what's in the code you posted; I renamed it, of
course, but it would be *much* easier for us to help you if you made sure to
check things like that before posting. Otherwise, it means extra work for us.
;-)

I suspect that you're taking your code example(s) directly out of your scene;
while that makes sense to you, it's difficult for us, because we have to change
things (like scale, etc.) in order to work with it. (And we have no idea what
its context is in your scene.) A good rule of thumb is to
try and simplify any code examples-- not too much of course-- to make them
easier to test. (In fact, it would be easier for you too, to find problems -- I
would suggest that you test just your own code example above-- with an
appropriate camera and lights. You *should* be able to see it like I do. If you
don't see it, it will still be so-much-simpler to track down any minor
problems.)


Post a reply to this message

From: Kenneth
Subject: Re: The Colony Ship
Date: 14 Feb 2016 16:30:00
Message: <web.56c0f15bce53235433c457550@news.povray.org>
Alain <kua### [at] videotronca> wrote:

>
> This use the fact that all 3 channels always evaluate to the same value.
> .gray will evaluate each channels and perform a ponderated average that
> is always the same value as the red, green and blue channels.
> Using .red, .green or .blue, you only evaluate a single channel and
> don't need to do the averaging.
>
> It ONLY work for gray levels pigments and images.
>

Yes, true. (Although, I didn't know about Clipka's remark, that even grayscale
images benefit from using only a single channel.)

The HF image I was using to test Sven's code happened to be a color image (which
I was also using to apply as a pigment.) Otherwise, grayscale is the way to go
(along *with* .red or etc.)

When using a *color* image to generate a height_field, it's not easy to know
beforehand which color channel will be the best to use (as the image is a mix of
different reds, greens and blues, of different 'gray' intensities.) In which
case, .gray is better.. or more practical, that is.


Post a reply to this message

From: Sven Littkowski
Subject: Re: The Colony Ship
Date: 15 Feb 2016 06:39:22
Message: <56c1b8ea$1@news.povray.org>
Uhmmm, then how do I take off the red and blue channel in Photoshop
(keeping only the green channel)? Never done before, either. :-)

----------------------------------

On 14.02.2016 15:15, clipka and others wrote:
> => You should use .gred (or .blue or .green) instead of .gray in your code.


Post a reply to this message

From: Sven Littkowski
Subject: Re: The Colony Ship
Date: 15 Feb 2016 06:40:37
Message: <56c1b935$1@news.povray.org>
When I try in Photoshop, I cannot save anymore as JPG.


Post a reply to this message

From: Sven Littkowski
Subject: Re: The Colony Ship
Date: 15 Feb 2016 07:04:53
Message: <56c1bee5@news.povray.org>
Hi Kenneth, can you show me the image how it looks? Would be
interesting. Thanks. :-)

See here the automatically generated heightfield (green) and the
image-based heightfield (gray). The green one has easily recognizable hills.



On 14.02.2016 15:51, Kenneth wrote:
> Well...I DO see the height_field, and the embossed heightfield image. Of course,
> I added lights, a camera, and re-scaled the HF so I could work with it easily. I
> also upped your green color brightness. Note that specifying just
> pigment{rgb < 0.05, 0.25, 0.0 > will use POV-Ray's default finish etc. (And your
> green color is kind of dark.) I would urge you to use a full texture statement.


Post a reply to this message


Attachments:
Download 'sl - colony ship ie.png' (333 KB) Download 'sl - colony ship i.png' (227 KB)

Preview of image 'sl - colony ship ie.png'
sl - colony ship ie.png

Preview of image 'sl - colony ship i.png'
sl - colony ship i.png


 

From: Kenneth
Subject: Re: The Colony Ship
Date: 15 Feb 2016 07:15:01
Message: <web.56c1bfd0ce53235433c457550@news.povray.org>
Sven Littkowski <jam### [at] yahoocom> wrote:
> Uhmmm, then how do I take off the red and blue channel in Photoshop
> (keeping only the green channel)? Never done before, either. :-)
>
No, no, you don't need to do it in Photoshop. It's done easily and directly in
your POV-Ray scene, using what is called 'dot notation.' This is explained in
the documentation, although I can't remember exactly where. (In the v3.62
documentation, it was at  3.2.1.4.3  Operators)


Here's the line of code I used in your scene...

#declare TheLandscape = object
{
 HF_Cylinder(function { Fn_1(x,y*1.7,z).gray }  (etc.)

Just substitute  .red  or  .green  or  .blue,  instead of .gray

Simple, eh?  ;-)


Post a reply to this message

From: Sven Littkowski
Subject: Re: The Colony Ship
Date: 15 Feb 2016 07:18:40
Message: <56c1c220@news.povray.org>
He he he! So simple that I couldn't imagine. Thanks! :-D

------------------------------------------

On 15.02.2016 07:09, Kenneth wrote:
> No, no, ...
> HF_Cylinder(function { Fn_1(x,y*1.7,z).gray }
> Just substitute  .red  or  .green  or  .blue,  instead of .gray
> Simple, eh?  ;-)


Post a reply to this message

From: Thomas de Groot
Subject: Re: The Colony Ship
Date: 15 Feb 2016 07:42:09
Message: <56c1c7a1$1@news.povray.org>
On 15-2-2016 12:40, Sven Littkowski wrote:
> When I try in Photoshop, I cannot save anymore as JPG.
>

Try The Gimp
http://www.gimp.org/

-- 
Thomas


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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