It is currently Thu Apr 25, 2024 3:49 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 19 posts ] 
Author Message
 Post subject: Something to play (shadow for 2.10)
PostPosted: Thu May 24, 2018 8:35 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
This is my "Perspective Shadow" filter (in Gimp 2.10)-
Totally derived from the original:
Perspective-shadow.scm version 1.2 (2000/11/08) by "Sven Neumann <sven@gimp.org>".

I ported it to python (and gimp 2.10) and added the possibility to create a shadow in front of the subject (angle > 180).

It has the same limitation of the original (the subject is considered as a 2d object, hence the shadow is created starting from the "base line" on the subject)

If someone is interested, here it is.
Attachment:
PerspectiveShadowDN.7z [2.77 KiB]
Downloaded 145 times

Starting with this image (and selecting the dark silhouette)
Attachment:
yoga-mod.png
yoga-mod.png [ 96.23 KiB | Viewed 2192 times ]

you may get the shadows shown in the subsequent post.

_________________
"Where am I ?"


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Thu May 24, 2018 8:37 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Examples using angle 225 (in front) and 45 (back)


Attachments:
yoga-mod, with a shadow having an an angle of 225.0.jpg
yoga-mod, with a shadow having an an angle of 225.0.jpg [ 165.48 KiB | Viewed 2191 times ]
yoga-mod, with a shadow having an an angle of 45.0.jpg
yoga-mod, with a shadow having an an angle of 45.0.jpg [ 165.88 KiB | Viewed 2191 times ]

_________________
"Where am I ?"
Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Thu May 24, 2018 8:39 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Examples using angle 213 and 33.


Attachments:
yoga-mod, with a shadow having an an angle of 213.0.jpg
yoga-mod, with a shadow having an an angle of 213.0.jpg [ 166.24 KiB | Viewed 2191 times ]
yoga-mod, with a shadow having an an angle of 33.0.jpg
yoga-mod, with a shadow having an an angle of 33.0.jpg [ 166.45 KiB | Viewed 2191 times ]

_________________
"Where am I ?"
Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Thu May 24, 2018 10:12 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12658
Location: Spain, Aragón
How interesting this possibility. Thanks Dinasset. I really use few times shadows in front of the object but it's great to have it. :tyspin :cool

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.


Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Thu May 24, 2018 10:38 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Thanks.
You may try to:
- take a photo of a sunset
- take a silhouette of your grand-child
- place it with the appropriate size and position
- calculate approx the angle from the sun and the silhouette
- run the filter after having selected the silhouette….

_________________
"Where am I ?"


Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Thu May 24, 2018 10:55 am  (#6) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
Here's an additional challenge for you ;)

As we discussed some years ago, as you've rarely got a point light source, the shadow should get increasingly blurred the further from the object it gets: viewtopic.php?f=9&t=8989&p=116497&hilit=shadow#p116497


Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Thu May 24, 2018 11:08 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12658
Location: Spain, Aragón
My try. I like it. :coolthup


Attachments:
beach-clouds-and child-DN_PerspectiveShadow.jpg
beach-clouds-and child-DN_PerspectiveShadow.jpg [ 186.69 KiB | Viewed 2152 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Thu May 24, 2018 11:13 am  (#8) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2424
Do you really need a script for everything?

A selection and the transform tools + gradient tool usually works

A bit about it here https://www.gimp-forum.net/Thread-Shado ... 739#pid739

_________________
Image


Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Thu May 24, 2018 12:36 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
ehehe….
yes, Rich, I'm a lazy filters man ...

edit: BTW, Rich, the original filter is about 20 years old, hence I'm not the only maniac...

_________________
"Where am I ?"


Last edited by dinasset on Thu May 24, 2018 12:57 pm, edited 1 time in total.

Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Thu May 24, 2018 12:43 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
paynekj wrote:
Here's an additional challenge for you ;)

As we discussed some years ago, as you've rarely got a point light source, the shadow should get increasingly blurred the further from the object it gets: viewtopic.php?f=9&t=8989&p=116497&hilit=shadow#p116497

the filter has the blur option, but it's the same as the original, not really as it should be
Attachment:
yoga-mod-blurred-shadow.png
yoga-mod-blurred-shadow.png [ 142.98 KiB | Viewed 2134 times ]


This filter is only a porting into python plus gimp 2.10 with the addition (required some time ago, but I do not remember by whom) to allow the shadow in front of the subject (backlight).

_________________
"Where am I ?"


Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Thu May 24, 2018 12:45 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Issabella wrote:
My try. I like it. :coolthup

Wow, excellent Issabella.
So you will have situations where to use this filter.
I'm sure you too make "backlight" photos...

_________________
"Where am I ?"


Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Thu May 24, 2018 3:56 pm  (#12) 
Offline
GimpChat Member

Joined: May 12, 2015
Posts: 4694
Thank you very much, Dinasset. I have done the shadows manually but like you, I use the filters more and more to do something. Saves time. Thanks again!


Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Fri May 25, 2018 7:54 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
paynekj wrote:
Here's an additional challenge for you ;)

As we discussed some years ago, as you've rarely got a point light source, the shadow should get increasingly blurred the further from the object it gets: viewtopic.php?f=9&t=8989&p=116497&hilit=shadow#p116497

Accepted the challenge.
Reshaffled the filter, simplified, and added the distance-blur.

Attachment:
yoga-mod, with a shadow having an an angle of 45.0_with blur for distance.jpg
yoga-mod, with a shadow having an an angle of 45.0_with blur for distance.jpg [ 162.54 KiB | Viewed 1148 times ]

Attachment:
yoga-mod, with a shadow having an an angle of 225.0_ with blur for distance.jpg
yoga-mod, with a shadow having an an angle of 225.0_ with blur for distance.jpg [ 161.84 KiB | Viewed 1148 times ]


It remains something to play, not a "serious" filter.
The new version is here:
Attachment:
SimplePerspectiveShadow.7z [2.8 KiB]
Downloaded 72 times

_________________
"Where am I ?"


Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Fri May 25, 2018 9:16 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12658
Location: Spain, Aragón
Thank you Dinasset. I got this outcome after selection the object. :)


Attachments:
beach-clouds-dawn-and child_DN_Shadow.jpg
beach-clouds-dawn-and child_DN_Shadow.jpg [ 184.6 KiB | Viewed 1142 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Fri May 25, 2018 5:31 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1826
The problem as I see it, is that Gimp 2.10 already comes with both Perspective Shadow and Advanced Perspective Shadow, so why the need for such filter? At the very least, you should rename it to something else and put it in the "Light and Shadows" category.


Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Fri May 25, 2018 11:06 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
@racer
If you can get a shadow also in front of the subject (and not only beyond), you're perfectly right, but:
- in my 2.10 as published (samj) I have only one of those 2 mentioned (Perspective)
- it still has the same limitation to allow only an angle <=180
If you can get a perspective shadow with an angle > 180 with the second one mentioned, fine, just ignore my post.
As told in my initial post, the main difference is exactly the angle treatment.

Thanks anyhow for your comment

_________________
"Where am I ?"


Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Sat May 26, 2018 6:33 pm  (#17) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1826
Yes, you are right, The "Advanced Perspective Shadow" was an add on SCM script and it is also limited to 180 degrees. I edited your script to show up in Light and Shadows. It works OK, but doesn't line up right in foreground shadows. It's easy enough to fix though.

Thanks...


Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Sun May 27, 2018 12:01 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Racer,
feel free to post here your amended version, any improvement is very well welcome.

_________________
"Where am I ?"


Top
 Post subject: Re: Something to play (shadow for 2.10)
PostPosted: Sun May 27, 2018 8:15 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1826
No, I meant fixing it in post. I don't know how to code a script other than basic things.


Top
Post new topic Reply to topic  [ 19 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Drop Shadow help

6

No new posts Attachment(s) Something to play with

13

No new posts Attachment(s) Something else to play with

17

No new posts Attachment(s) Something to play with also.

16

No new posts Attachment(s) Let's play golf

7



* Login  



Powered by phpBB3 © phpBB Group