POV-Ray : Newsgroups : povray.binaries.images : An experiment in monochrome Server Time
29 Mar 2024 11:36:11 EDT (-0400)
  An experiment in monochrome (Message 16 to 25 of 25)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Bald Eagle
Subject: Re: An experiment in monochrome
Date: 10 Jun 2021 18:00:00
Message: <web.60c28a6b23b82ed51f9dae3025979125@news.povray.org>
=?UTF-8?Q?J=c3=b6rg_=22Yadgar=22_Bleimann?= <yaz### [at] gmxde> wrote:

> Yadgar

I really just have to say that if you got some dark sunglasses and a leather
biker vest, you could totally pull off that "bouncer at a biker bar" look.

:D


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: An experiment in monochrome
Date: 10 Jun 2021 20:40:00
Message: <web.60c2afe723b82ed58e52cc8789db30a9@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>
> > I'm also thinking that using cones would give a Voronoi effect.
>
> I just did this one because it was quick.

They make a nice texture that reminds me of mashed paper.

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: Bald Eagle
Subject: Re: An experiment in monochrome
Date: 10 Jun 2021 20:40:00
Message: <web.60c2b06d23b82ed51f9dae3025979125@news.povray.org>
This is a multi-part message in MIME format.


Post a reply to this message


Attachments:
Download 'monochrome_be.png' (615 KB)

Preview of image 'monochrome_be.png'
monochrome_be.png


 

From: m@b
Subject: Re: An experiment in monochrome
Date: 11 Jun 2021 06:16:35
Message: <60c33803$1@news.povray.org>
On 11/06/2021 2:27 am, Bald Eagle wrote:
> I am curious about
> #declare GreyTest = 0.001 + abs(TestK(X,Y,0) -
> abs((TestR(X,Y,0) + TestG(X,Y,0) - TestB(X,Y,0))));
> 
> What is the underlying logic/reasoning behind this "greyness test"?

I wish to represent 4 colours - R, G, B and Grey.

The 0.001 is now redundant, I put it in to prevent a divide by zero 
error in a previous version.

TestK(X,Y,0) returns the mean value of R, G, B. (1)

R+G-B will also return the mean if R, G and B are all the same, i.e. 
colour is Grey. (Black and White are just shades of Grey :-))  (2)

So the GreyTest (1)-(2) returns zero if R, G and B are equal and a small 
value if they are close.

BUT --------------------------------------------------------

You got me thinking, are there any cases where the test returns zero but 
R, G, B are not equal?

Answer - yes, the test sometimes falls down when the 3 numbers are 
equally spaced. e.g  0.1, 0.2, 0.3    or 0.3, 0.6, 0.9

I was over thinking, maybe this will work:

#declare GreyTest = abs(TestR(X,Y,0)-TestG(X,Y,0)) + 
abs(TestR(X,Y,0)-TestB(X,Y,0)) + abs(TestB(X,Y,0)-TestG(X,Y,0));

m@


Post a reply to this message

From: Jörg "Yadgar" Bleimann
Subject: Re: An experiment in monochrome
Date: 11 Jun 2021 12:12:32
Message: <60c38b70$1@news.povray.org>
Hi(gh)!

On 10.06.21 23:55, Bald Eagle wrote:
> =?UTF-8?Q?J=c3=b6rg_=22Yadgar=22_Bleimann?= <yaz### [at] gmxde> wrote:
> 
>> Yadgar
> 
> I really just have to say that if you got some dark sunglasses and a leather
> biker vest, you could totally pull off that "bouncer at a biker bar" look.

Yes, and I'm about as heavyweight as the typical biker bar bouncer - but 
unfortunately, it's more fat than muscle... but nevertheless, I prefer 
muscle-powered cycling over motorbiking!

Now playing: Nobody Home (Pink Floyd)


Post a reply to this message

From: Bald Eagle
Subject: Re: An experiment in monochrome
Date: 11 Jun 2021 18:45:00
Message: <web.60c3e71d23b82ed51f9dae3025979125@news.povray.org>
"m@b" <sai### [at] googlemailcom> wrote:

> I was over thinking, maybe this will work:
>
> #declare GreyTest = abs(TestR(X,Y,0)-TestG(X,Y,0)) +
> abs(TestR(X,Y,0)-TestB(X,Y,0)) + abs(TestB(X,Y,0)-TestG(X,Y,0));


I thought a bit about this, underthought it while playing with the idea, and
then realized that what I wanted to suggest was making use of the HSV color
space.

That way when all of the color channels are equal, the Hues cancel each other
out, or if they are close, then they give a small Saturation vector.  You can
then set the threshold and test the length of that Saturation vector.
Brightness would correspond to the Value.

Then you just use the CRGB2HSV color conversion macro in colors.inc (requires
CRGB2H).

// Converts a color in RGB color space to a color in HSV color space.
// Input:  < Red, Green, Blue, Filter, Transmit >
// Output: < Hue, Saturation, Value, Filter, Transmit >
#macro CRGB2HSV(Color)
   #local RGBFT = color Color;
   #local R = (RGBFT.red);
   #local G = (RGBFT.green);
   #local B = (RGBFT.blue);
   #local Min = min(R,min(G,B));
   #local Max = max(R,max(G,B));
   #local Span = Max-Min;
   #local H = CRGB2H (<R,G,B>, Max, Span);
   #local S = 0; #if (Max!=0) #local S = Span/Max; #end
   <H,S,Max,(RGBFT.filter),(RGBFT.transmit)>
#end


// Takes RGB vector, Max component, and Span as input,
// returns Hue value.
#macro CRGB2H (RGB, Max, Span)
   #local H = 0;
   #local R = RGB.red;
   #local G = RGB.green;
   #local B = RGB.blue;
   #if (Span>0)
      #local H = (
         + (R = Max & G != Max ? 0 + (G - B)/Span : 0)
         + (G = Max & B != Max ? 2 + (B - R)/Span : 0)
         + (B = Max & R != Max ? 4 + (R - G)/Span : 0)
      )*60;
   #end
   H
#end


Post a reply to this message

From: m@b
Subject: Re: An experiment in monochrome
Date: 14 Jun 2021 04:40:58
Message: <60c7161a@news.povray.org>
On 08/06/2021 11:21 am, m@b wrote:
> Trying to emulate mechanical shading.
> 
> m@

Here is an animated version with colour. Including the traditional 
checkered floor and blue sky:

<https://youtu.be/N2Z-DXoJBUY>

m@


Post a reply to this message

From: m@b
Subject: Re: An experiment in monochrome
Date: 18 Jun 2021 05:25:35
Message: <60cc668f@news.povray.org>
On 08/06/2021 11:21 am, m@b wrote:
> Trying to emulate mechanical shading.
> 
> m@

Latest:


Post a reply to this message


Attachments:
Download 'image cross hatch 04.png' (279 KB)

Preview of image 'image cross hatch 04.png'
image cross hatch 04.png


 

From: Thomas de Groot
Subject: Re: An experiment in monochrome
Date: 18 Jun 2021 07:15:46
Message: <60cc8062$1@news.povray.org>
Op 18-6-2021 om 11:25 schreef m@b:
> On 08/06/2021 11:21 am, m@b wrote:
>> Trying to emulate mechanical shading.
>>
>> m@
> 
> Latest:
> 
Oh yes! I prefer this one to those with different cross-hatches.

-- 
Thomas


Post a reply to this message

From: Mr
Subject: Re: An experiment in monochrome
Date: 18 Jun 2021 07:20:00
Message: <web.60cc80e523b82ed56adeaecb3f378f2@news.povray.org>
"m@b" <sai### [at] googlemailcom> wrote:
> On 08/06/2021 11:21 am, m@b wrote:
> > Trying to emulate mechanical shading.
> >
> > m@
>
> Latest:

The technique refines ! result looks excellent !


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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