What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Does anyone know a way to randomly select these?


Jonas_Thomas

Member
Messages
21
Likes
3
Hello,

I am working on big project with a lot of windows:

project_nueba_render_274_forum.jpg

I have a lot of textures sticking on the buildings that look something like this: (this is a simplified example)

ramen_voorbeeld.png


Now I would like to "randomly" select a part of those windows so I can make theme darker or lighter to create a bit of variation. (Like you can see in the upper left corner in this example)

My question is the following:

It's pretty time-consuming to do this manualy. Does anyone of you know how to do this in a more automated way? A script maybe?

Thanks!
Jonas
 
I can't thing of any auto action you could do. The only thing I can image is to use the pen or polygonal lasso. If you use the pen, you can make all the selections one by one, all without changing the path, just adding to it. You can just add to lasso selections using the shift/add tool or setting the plus function on the tool. That is what I would try. No matter what you do, I think it will be time consuming.
 
Ok, thanks for the reply ibclare! That is what I was a bit afraid of, that there is no solution and that it will be time consuming either way.
 
Last edited:
But pretty awesome code writing. I should think. Maybe if you wanted to get rid of every rectangle of similar size one could write that code more easily.

Anyway, the way I described may be time consuming, but I think it might be less time consuming than you think. Good luck whatever you decide to do.
 
Would something like this help?

Unfortunately, with this method, each "window" is not uniformly filled in with a single color, but rather, each is partially filled in with either 1 or 2 colors (given the particular parameters I used in this case).

While this method isn't perfect, it's very simple, it's done entirely in Photoshop, and there Lots of adjustments possible (eg, number of color(s), which colors are used, fraction of the windows that have each of the colors, etc.).

Tom

PS - I bet that once you see the attached image, you'll instantly be able to figure out several methods that would all yield something like this, and I won't even have to explain it. :-)
 

Attachments

  • ramen_voorbeeld-tjm01_ps01a-03png_with_transparency_698px_wide.png
    ramen_voorbeeld-tjm01_ps01a-03png_with_transparency_698px_wide.png
    565.7 KB · Views: 43
Last edited:
Hello Tom,

Thanks for your reply! That looks very promising! :-)

I have been trying to figure it out, but I don't immediatly find it. Did you use a filter in combination with something else? I'm really curious to know how you did this. :-)
 
Hello Colleague,

Thanks for your response!

Does this script has an internet page or something? I have tried it, but I didn't have much succes in making it work. I'm using Photoshop CS5 here. Do you have some step-by-step guide by any chance?
 
Hi jonas

I have also CS5
and I tried it with this jpg

I made the script with some cut and paste
can you try the script with this jpg
(the script has to be adapted if you work with bigger images / windows)
 

Attachments

  • test sample and bucket.jpg
    test sample and bucket.jpg
    547.2 KB · Views: 6
I have tried it with the jpeg in your post.

What I did:

- I opened the file in photoshop
- I went to file > scripts > browse
- I selected the script you gave me and clicked on load
- It executed itself, here you can see the result:

result_001.JPG
 
maybe it's doing this just once

in the script I test height and width of the selection made by magic wand
and if H+W is bigger than 101pixels it chooses new coordinates

can you try a few extra times ?

here's a screenmovie from my computer
 

Attachments

I tried it a couple of times more in different ways. I don't see any difference in the way you do it in the little movie. I also put the script in the script folder first... but it didn't work. I get the same result every time. Here is a screenshot of my history:

result_002.JPG
 
I approached this by looking at the result you want to achieve, which I think is some random coloration to the windows. I put the black "windows" on it's own layer. I made a new layer and filled it with 50% grey, then added a reticulation filter with colors set to white and grey. On this layer I used the magic wand to select a color (variation of grey). Then on a new layer I filled the selection with red (just so it would show well). I used transform to make the fill much larger and then clipped it to the black boxes. After that I used a motion blur on it.
 

Attachments

  • ScreenShot001.jpg
    ScreenShot001.jpg
    120.3 KB · Views: 1
Yes indeed ibclare, I received a lot of good solutions. :-) Thanks a lot for that everyone! (I'm still curious how Tom Mann ended up with his result :-) )

Thanks to the large amount of patience of Colleague I now also have a real script to do it! :-) With a little bit of tweaking on the script it is applicable to different window sizes. Here you can see the result:

resultaat_09.jpg

I'm trying to upload the script as an attachement, but I get the message "invalid file" or something. I don't know if I am doing something wrong?

Thanks a lot Colleague for your help and patience!!!

Jonas
 

Back
Top