POV-Ray : Newsgroups : povray.general : Photoshop Question (needed for texture) Server Time
4 May 2024 00:05:30 EDT (-0400)
  Photoshop Question (needed for texture) (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: Kenneth
Subject: Re: Photoshop Question (needed for texture)
Date: 29 Jul 2017 14:45:01
Message: <web.597cd673f28314b883fb31c0@news.povray.org>
As an experiment (in Photoshop)  you might try using *heavy* Gaussian Blur on
the image-- so that it's completely blurred-out--then finding the color of a
pixel somewhere near the center of the image. I don't know if this would work
accurately, as I've never tried it.


Post a reply to this message

From: Sven Littkowski
Subject: Re: Photoshop Question (needed for texture)
Date: 30 Jul 2017 05:49:43
Message: <597dabb7@news.povray.org>
On 29.07.2017 14:39, Kenneth wrote:
> As an experiment (in Photoshop)  you might try using *heavy* Gaussian Blur on
> the image-- so that it's completely blurred-out--then finding the color of a
> pixel somewhere near the center of the image. I don't know if this would work
> accurately, as I've never tried it.
> 
> 
> 
> 
No, these two options would not work for me.
1
Gaussian Blur, even within a marquee (selection) would still catch color
from the neighboring areas, I already tried it.
2
I need this on an image, true. But the marquees (selections) are not
square, but like a pie-piece. And all are also different from each
other. I really need a Photoshop solution. I really wished, I could use
your POV-Ray macro.
I need it for the latest version of my "Question: Bump Not Showing"
balloon texture file, inside the IMAGES group here. I am posting that
texture file as very last posting within that thread, using your name
inside the posting thread. When looking at that texture file, you will
see the dark borders within. And I need a color averaging for each field
of that texture.

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Stephen
Subject: Re: Photoshop Question (needed for texture)
Date: 30 Jul 2017 07:20:20
Message: <597dc0f4$1@news.povray.org>
On 7/30/2017 10:49 AM, Sven Littkowski wrote:
> I need it for the latest version of my "Question: Bump Not Showing"
> balloon texture file, inside the IMAGES group here. I am posting that
> texture file as very last posting within that thread, using your name
> inside the posting thread. When looking at that texture file, you will
> see the dark borders within. And I need a color averaging for each field
> of that texture.

I looked at the image you posted. It looks completely black. 
PaintShopPro tells me that there are 6 unique colours in it. I can see 
no detail in it at all. Even after adjusting brightness, contrast etc.
Now when I used an edge enhance function three times I did get a result. 
I's very faint.

-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: Photoshop Question (needed for texture)
Date: 31 Jul 2017 08:05:00
Message: <web.597f1caef28314bc437ac910@news.povray.org>
Maybe if you just use eval pigment to sample all the rgb values, average them
and then place a box at that point, using only povray.

Sorry I don't have too much more - I'm at work  ;)


Post a reply to this message

From: Bald Eagle
Subject: Re: Photoshop Question (needed for texture)
Date: 31 Jul 2017 15:20:01
Message: <web.597f8270f28314bc437ac910@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Maybe if you just use eval pigment to sample all the rgb values, average them
> and then place a box at that point, using only povray.


#version 3.71
global_settings {
 assumed_gamma 1.0
}

// example scene to average pigment values in a box
// x and y ranges are -0.5 to 0.5
// Bill Walker "Bald Eagle"  2017

#include "colors.inc"
#include "functions.inc"
#include "rand.inc"

camera {
  orthographic
  location <0,0,-1>    // position & direction of view
  look_at  <0,0,0>
  right 1*x            // horizontal size of view
  up 1*y               // vertical size of view
}

#declare Rseed = seed (123);
#declare Gseed = seed (456);
#declare Bseed = seed (789);

#declare Pig =
    pigment {
     cells
     color_map {
      #for (E, 0, 1, 0.1)
       #local R = rand (Rseed);
       #local G = rand (Gseed);
       #local B = rand (Bseed);
       [E  color red R green G blue B]
    #end // end for E
   } // color_map
   scale 0.01
    } // end pigment



box {                  // this box fits exactly in view
 <-0.5, -0.5, 0>, <0.5, 0.5, 0>
 pigment {Pig}
} // end box

#declare YS = 1/image_height;
#declare XS = 1/image_width;

#declare ymin =  0.12;
#declare ymax =  0.25;
#declare xmin = -0.11;
#declare xmax =  0.15;

#declare AVG = 0;
#for (Y, ymin, ymax, YS)
 #for (X, xmin, xmax, XS)
  #declare Shade = eval_pigment (Pig, <X, Y, 0>);
  #declare AVG = AVG + Shade;
 #end // end for X
#end // end for Y
#declare AVG = AVG / ( ((xmax-xmin)/XS) * ((ymax-ymin)/YS) );

box {                  // this box fits exactly in view
 <xmin, ymin, -0.01>, <xmax, ymax, -0.01>
 texture {pigment {color rgb AVG}}
} // end box


Gives a gray box over the "cells" pattern.
I'm aware of the redundancy of generating the random colors for the cells
pattern - but I wanted that code block in there with the color map...


Post a reply to this message

From: Sven Littkowski
Subject: Re: Photoshop Question (needed for texture)
Date: 31 Jul 2017 19:43:16
Message: <597fc094$1@news.povray.org>
On 31.07.2017 15:18, Bald Eagle wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>> Maybe if you just use eval pigment to sample all the rgb values, average
 them
>> and then place a box at that point, using only povray.
> 
> 
> #version 3.71
> global_settings {
>  assumed_gamma 1.0
> }
> 
> // example scene to average pigment values in a box
> // x and y ranges are -0.5 to 0.5
> // Bill Walker "Bald Eagle"  2017
> 
> #include "colors.inc"
> #include "functions.inc"
> #include "rand.inc"
> 
> camera {
>   orthographic
>   location <0,0,-1>    // position & direction of view
>   look_at  <0,0,0>
>   right 1*x            // horizontal size of view
>   up 1*y               // vertical size of view
> }
> 
> #declare Rseed = seed (123);
> #declare Gseed = seed (456);
> #declare Bseed = seed (789);
> 
> #declare Pig =
>     pigment {
>      cells
>      color_map {
>       #for (E, 0, 1, 0.1)
>        #local R = rand (Rseed);
>        #local G = rand (Gseed);
>        #local B = rand (Bseed);
>        [E  color red R green G blue B]
>     #end // end for E
>    } // color_map
>    scale 0.01
>     } // end pigment
> 
> 
> 
> box {                  // this box fits exactly in view
>  <-0.5, -0.5, 0>, <0.5, 0.5, 0>
>  pigment {Pig}
> } // end box
> 
> #declare YS = 1/image_height;
> #declare XS = 1/image_width;
> 
> #declare ymin =  0.12;
> #declare ymax =  0.25;
> #declare xmin = -0.11;
> #declare xmax =  0.15;
> 
> #declare AVG = 0;
> #for (Y, ymin, ymax, YS)
>  #for (X, xmin, xmax, XS)
>   #declare Shade = eval_pigment (Pig, <X, Y, 0>);
>   #declare AVG = AVG + Shade;
>  #end // end for X
> #end // end for Y
> #declare AVG = AVG / ( ((xmax-xmin)/XS) * ((ymax-ymin)/YS) );
> 
> box {                  // this box fits exactly in view
>  <xmin, ymin, -0.01>, <xmax, ymax, -0.01>
>  texture {pigment {color rgb AVG}}
> } // end box
> 
> 
> Gives a gray box over the "cells" pattern.
> I'm aware of the redundancy of generating the random colors for the cells

> pattern - but I wanted that code block in there with the color map...
> 
> 
> 
> 
Thanks. Actually, there is a related thread inside the IMAGE group,
there you can see the texture file and its many pie-shaped areas, which
I want to transform to the individual average color of each section.

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: omniverse
Subject: Re: Photoshop Question (needed for texture)
Date: 1 Aug 2017 00:45:01
Message: <web.5980069af28314b9c5d6c810@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > Maybe if you just use eval pigment to sample all the rgb values, average them
> > and then place a box at that point, using only povray.
>
> // example scene to average pigment values in a box
> // x and y ranges are -0.5 to 0.5
> // Bill Walker "Bald Eagle"  2017

--->8---

> #declare Rseed = seed (123);
> #declare Gseed = seed (456);
> #declare Bseed = seed (789);
>
> #declare Pig =
>     pigment {
>      cells
>      color_map {
>       #for (E, 0, 1, 0.1)
>        #local R = rand (Rseed);
>        #local G = rand (Gseed);
>        #local B = rand (Bseed);
>        [E  color red R green G blue B]
>     #end // end for E
>    } // color_map
>    scale 0.01
>     } // end pigment
>
>
>
> box {                  // this box fits exactly in view
>  <-0.5, -0.5, 0>, <0.5, 0.5, 0>
>  pigment {Pig}
> } // end box
>
> #declare YS = 1/image_height;
> #declare XS = 1/image_width;
>
> #declare ymin =  0.12;
> #declare ymax =  0.25;
> #declare xmin = -0.11;
> #declare xmax =  0.15;
>
> #declare AVG = 0;
> #for (Y, ymin, ymax, YS)
>  #for (X, xmin, xmax, XS)
>   #declare Shade = eval_pigment (Pig, <X, Y, 0>);
>   #declare AVG = AVG + Shade;
>  #end // end for X
> #end // end for Y
> #declare AVG = AVG / ( ((xmax-xmin)/XS) * ((ymax-ymin)/YS) );
>
> box {                  // this box fits exactly in view
>  <xmin, ymin, -0.01>, <xmax, ymax, -0.01>
>  texture {pigment {color rgb AVG}}
> } // end box
>
>
> Gives a gray box over the "cells" pattern.
> I'm aware of the redundancy of generating the random colors for the cells
> pattern - but I wanted that code block in there with the color map...

That's a nifty way of going about it, even if I can't think of a way to use it
for myself someone might. Good work.

Bob


Post a reply to this message

From: Sven Littkowski
Subject: Re: Photoshop Question (needed for texture)
Date: 1 Aug 2017 21:12:10
Message: <598126ea$1@news.povray.org>
I went to a place where a newer version of Photoshop is installed, and
got what I wanted. Thanks to everyone!

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: ingo
Subject: Re: Photoshop Question (needed for texture)
Date: 2 Aug 2017 02:35:02
Message: <XnsA7C55751C7EB6seed7@news.povray.org>
in news:597c3bc4$1@news.povray.org Sven Littkowski wrote:

> get the
> average color of a selected image area

Imagemagick:
https://stackoverflow.com/questions/10825952/calculate-the-average-colour-
of-an-area-in-an-image

Ingo


Post a reply to this message

From: Sven Littkowski
Subject: Re: Photoshop Question (needed for texture)
Date: 2 Aug 2017 02:56:22
Message: <59817796$1@news.povray.org>
On 02.08.2017 02:35, ingo wrote:
> in news:597c3bc4$1@news.povray.org Sven Littkowski wrote:
> 
>> get the
>> average color of a selected image area
> 
> Imagemagick:
> https://stackoverflow.com/questions/10825952/calculate-the-average-colour
-
> of-an-area-in-an-image
> 
> Ingo
> 
Thanks. Problem already solved. :-)

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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