Any donations (of advice) gratefully received
Moderator: Kathy_9
-
papalazaru
- Posts: 11
- Joined: Thu Oct 06, 2016 10:40 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
Any donations (of advice) gratefully received
Hi all, joined the forum to ask advice, just bought pspx7 cos I am working on re-doing graphics for an old game.
What I need to do is block in the shadows of the units in the picture below. The shadows were originally done in checkerboard black and white pixels, but I need to block them in in grey as I have done for the second group of figures:
This can be done manually, but there are thousands of files like the one above, making this a huge and very boring job, so I was wandering if anyone here would know a a shortcut that psp can do to achieve this, or by using layers etc. (I was using the venerable, but very quick psp7 until I bought x7, so don't know many of it's features yet).
By the way, the shadows need to be blocked in because the game resizes the images through the code, and the checkerboard shadows end up looking a bit psychedelic!
I would be very grateful for any ideas.
What I need to do is block in the shadows of the units in the picture below. The shadows were originally done in checkerboard black and white pixels, but I need to block them in in grey as I have done for the second group of figures:
This can be done manually, but there are thousands of files like the one above, making this a huge and very boring job, so I was wandering if anyone here would know a a shortcut that psp can do to achieve this, or by using layers etc. (I was using the venerable, but very quick psp7 until I bought x7, so don't know many of it's features yet).
By the way, the shadows need to be blocked in because the game resizes the images through the code, and the checkerboard shadows end up looking a bit psychedelic!
I would be very grateful for any ideas.
-
Joelle
- Posts: 1815
- Joined: Wed Apr 02, 2008 10:12 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Asus Prime B350M-A
- processor: AMD Ryzen 5 1500 Quad-Core
- ram: 16 GB RAM
- Video Card: NVidia GeForce GTX 1050
- Hard_Drive_Capacity: 1TB
- Monitor/Display Make & Model: Samsung
- Corel programs: PaintShop Pro X9
- Location: UK
Re: Any donations (of advice) gratefully received
As far as I am aware there is no automated process that turns a checkerboard pattern into grey.
You could use the Smart Selection Brush and Fill the selection, but doing that a thousand times might not do your eyes much good!
Joëlle
You could use the Smart Selection Brush and Fill the selection, but doing that a thousand times might not do your eyes much good!
Joëlle
Joëlle
(PSPX9 )
(PSPX9 )
-
papalazaru
- Posts: 11
- Joined: Thu Oct 06, 2016 10:40 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
Re: Any donations (of advice) gratefully received
Thank you, that will make it slightly less manual, I think you may be right, now where's the opticians number?

- flagpole
- Posts: 535
- Joined: Wed Sep 14, 2011 10:12 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Gigabyte B450 AORUS ELITE DDR4 USB 3.1 RGB
- processor: Ryzen 2600
- ram: 16GB
- Video Card: RTX 2060
- sound_card: on board
- Hard_Drive_Capacity: 6.5TB
- Monitor/Display Make & Model: Iiyama 27"
- Location: UK
- Contact:
Re: Any donations (of advice) gratefully received
You could write a script to detect checkboard patterns and replace them with 50% grey. I don't know how to do this though.
-
LeviFiction
- Advisor
- Posts: 6831
- Joined: Thu Oct 02, 2008 1:07 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Alienware M17xR4
- processor: Intel Core i7-3630QM CPU - 2_40GH
- ram: 6 GB
- Video Card: NVIDIA GeForce GTX 660M
- sound_card: Sound Blaster Recon3Di
- Hard_Drive_Capacity: 500GB
- Corel programs: PSP: 8-2023
- Location: USA
Re: Any donations (of advice) gratefully received
I don't know if this helps or not. The grid is always less than pure white. So if you used the magic wand tool on the white background, with a tolerance of zero, it would select every non-white color. You could then invert the seleciton, and just quickly brush over the areas with a paint brush and you should get a fairly decent solid grey shadow. Just make sure you don't care if the boots get caught up in the change. It's still a lot of work, but potentially faster than my script is.
I don't think this is something that can be easily done in a PSP script. If you can't do it quickly with normal tools, PSP scripting hasn't got a chance. The API was not designed for pixel by pixel manipulation.
I wrote a very simple script to do this, and it's been running for an hour on the current image and only covered 9,000 of the 22,000 pixels in the image. It's just too slow. I mean, there are ways to get the pixel data directly but by that point you might as well use full blown python with the Pillow library and manipulate the images directly.
I don't think this is something that can be easily done in a PSP script. If you can't do it quickly with normal tools, PSP scripting hasn't got a chance. The API was not designed for pixel by pixel manipulation.
I wrote a very simple script to do this, and it's been running for an hour on the current image and only covered 9,000 of the 22,000 pixels in the image. It's just too slow. I mean, there are ways to get the pixel data directly but by that point you might as well use full blown python with the Pillow library and manipulate the images directly.
https://levifiction.wordpress.com/
-
papalazaru
- Posts: 11
- Joined: Thu Oct 06, 2016 10:40 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
Re: Any donations (of advice) gratefully received
Thanks for the information and the time you spent on this, was really hoping there might be a scripting option, but what you suggest with the magic wand will save a lot of time, cheers
-
Joelle
- Posts: 1815
- Joined: Wed Apr 02, 2008 10:12 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Asus Prime B350M-A
- processor: AMD Ryzen 5 1500 Quad-Core
- ram: 16 GB RAM
- Video Card: NVidia GeForce GTX 1050
- Hard_Drive_Capacity: 1TB
- Monitor/Display Make & Model: Samsung
- Corel programs: PaintShop Pro X9
- Location: UK
Re: Any donations (of advice) gratefully received
As I said.. the Smart Selection Brush is your best bet.
Joëlle
Joëlle
Joëlle
(PSPX9 )
(PSPX9 )
-
Cassel
- Posts: 1587
- Joined: Fri Oct 29, 2010 6:49 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- ram: 16Gb
- Corel programs: PSP 8 (JASC) to PSP 2023
- Location: Canada
- Contact:
Re: Any donations (of advice) gratefully received
Actually, i managed to do it and code it into a script. It uses the selection modification tools like Remove Specks and Holes.
I ran it on X6 and X9 (i don't have X7 installed right now)
You might want to modify the grey to match your other projects. The setting is on line 170. Currently, the script uses a (192,192,192) value for the grey but maybe you want a different shadow.
It is not 100% perfect, and you might see some single pixels changed to a grey, in the little figures, but hopefully, it will be minimal.
Since it is a script, you should be able to batch process it on all your images.
Give this a try and let me know how it goes. I am curious.
I ran it on X6 and X9 (i don't have X7 installed right now)
You might want to modify the grey to match your other projects. The setting is on line 170. Currently, the script uses a (192,192,192) value for the grey but maybe you want a different shadow.
It is not 100% perfect, and you might see some single pixels changed to a grey, in the little figures, but hopefully, it will be minimal.
Since it is a script, you should be able to batch process it on all your images.
Give this a try and let me know how it goes. I am curious.
Cassel
https://creationcassel.com/store
Specializing in PSP specific products: scripts and tubes
https://scrapbookcampus.com
for beginner and seasoned scrappers and designers and other PSP users
https://creationcassel.com/store
Specializing in PSP specific products: scripts and tubes
https://scrapbookcampus.com
for beginner and seasoned scrappers and designers and other PSP users
-
papalazaru
- Posts: 11
- Joined: Thu Oct 06, 2016 10:40 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
Re: Any donations (of advice) gratefully received
Wow Cassell! That works! You are an absolute Godsend, and a very hearfelt thank you for this
.
just curious though, I have to run the script twice to get it to work, do you know why this is (because of this it wouldn't allow me to do it in a batch process), is there a way to put those together, so I can get the batch process to work? Also, I have never done scripting before, so was wandering how I get to line 170 to change the grey colour?
Thank you so much.
just curious though, I have to run the script twice to get it to work, do you know why this is (because of this it wouldn't allow me to do it in a batch process), is there a way to put those together, so I can get the batch process to work? Also, I have never done scripting before, so was wandering how I get to line 170 to change the grey colour?
Thank you so much.
-
LeviFiction
- Advisor
- Posts: 6831
- Joined: Thu Oct 02, 2008 1:07 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Alienware M17xR4
- processor: Intel Core i7-3630QM CPU - 2_40GH
- ram: 6 GB
- Video Card: NVIDIA GeForce GTX 660M
- sound_card: Sound Blaster Recon3Di
- Hard_Drive_Capacity: 500GB
- Corel programs: PSP: 8-2023
- Location: USA
Re: Any donations (of advice) gratefully received
Open the script in any text-editor. Notepad will work but it doesn't really show line numbers. Notepad++ which you can download for free does show line numbers. And of course there are other really good code editors as well. PSP scripting is done in Python a language that strives for readability.
https://levifiction.wordpress.com/
-
Cassel
- Posts: 1587
- Joined: Fri Oct 29, 2010 6:49 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- ram: 16Gb
- Corel programs: PSP 8 (JASC) to PSP 2023
- Location: Canada
- Contact:
Re: Any donations (of advice) gratefully received
Why do you need to run it twice? What happens after you run it the first time that requires you to run it a second time?I have to run the script twice to get it to work,
Cassel
https://creationcassel.com/store
Specializing in PSP specific products: scripts and tubes
https://scrapbookcampus.com
for beginner and seasoned scrappers and designers and other PSP users
https://creationcassel.com/store
Specializing in PSP specific products: scripts and tubes
https://scrapbookcampus.com
for beginner and seasoned scrappers and designers and other PSP users
-
papalazaru
- Posts: 11
- Joined: Thu Oct 06, 2016 10:40 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
Re: Any donations (of advice) gratefully received
@Levifiction Thanks for the notepad++ reference
@Cassell, I had a good old look through to see what was up, but couldn't work out what it could be, so just made a new script, which has your script running twice, and it worked absolutely fine for the batch process. X7 runs a bit slow on my ageing computer, and also when I registered, it only downloaded service pack 3, I assumed it was OK, maybe I should have downloaded the other service packs as well.
Thanks again for your time, you have saved me a tonne of bother.
@Cassell, I had a good old look through to see what was up, but couldn't work out what it could be, so just made a new script, which has your script running twice, and it worked absolutely fine for the batch process. X7 runs a bit slow on my ageing computer, and also when I registered, it only downloaded service pack 3, I assumed it was OK, maybe I should have downloaded the other service packs as well.
Thanks again for your time, you have saved me a tonne of bother.
-
Cassel
- Posts: 1587
- Joined: Fri Oct 29, 2010 6:49 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- ram: 16Gb
- Corel programs: PSP 8 (JASC) to PSP 2023
- Location: Canada
- Contact:
Re: Any donations (of advice) gratefully received
I am still a bit curious why you needed to run the script twice. What happened when you ran it once? It worked for me. Just curious.
Cassel
https://creationcassel.com/store
Specializing in PSP specific products: scripts and tubes
https://scrapbookcampus.com
for beginner and seasoned scrappers and designers and other PSP users
https://creationcassel.com/store
Specializing in PSP specific products: scripts and tubes
https://scrapbookcampus.com
for beginner and seasoned scrappers and designers and other PSP users
-
papalazaru
- Posts: 11
- Joined: Thu Oct 06, 2016 10:40 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
Re: Any donations (of advice) gratefully received
Really don't know, the first time I run it, the image looks exactly the same as it was before I ran the script, and the second time I run it, it does the job. The only thing I've noticed is that my settings on the selection tool and magic wand etc. change after running the script, from replace to remove, don't know if that's significant?
-
Cassel
- Posts: 1587
- Joined: Fri Oct 29, 2010 6:49 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- ram: 16Gb
- Corel programs: PSP 8 (JASC) to PSP 2023
- Location: Canada
- Contact:
Re: Any donations (of advice) gratefully received
The tools settings always remain as the last used setting, so that is normal.
Cassel
https://creationcassel.com/store
Specializing in PSP specific products: scripts and tubes
https://scrapbookcampus.com
for beginner and seasoned scrappers and designers and other PSP users
https://creationcassel.com/store
Specializing in PSP specific products: scripts and tubes
https://scrapbookcampus.com
for beginner and seasoned scrappers and designers and other PSP users
