It is currently Thu Apr 25, 2024 9:24 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Vanishing Point Rendering...[SOLVED]
PostPosted: Mon Jul 21, 2014 1:08 pm  (#1) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
I'm trying to figure out how to create the kind of image as seen below.
Without having to copy/past and scale each and every image needed.
Image
Is there a script or something in G'Mic that can accomplish this quickly, without all the copying/pasting and scaling of each image?

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Last edited by Wallace on Mon Jul 21, 2014 5:24 pm, edited 3 times in total.

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: Vanishing Point Rendering
PostPosted: Mon Jul 21, 2014 1:36 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Aug 30, 2012
Posts: 2174
Wallace, I have used the multi-replicate script for this sort of thing, the steps I have done are listed below.

Create your initial image and autocrop.
then decide on your vanishing point and guides to locate.
on your image add a guide to the side of the image furthest away from your vanishing. then using the measure tool, measure the distance between your vanishing point and your newly added guide.
next create a new transparent square layer twice the size of the distance just measured and make sure the centre of this layer is located over your vanishing point.
merge this layer with your image layer.
open up the multi-replicate script and make sure you uncheck autocrop layer copies and also set stack to below each other

Here is my results have also attached the xcf file which includes a the multi-replicate settings.

Image


Attachments:
Vanishing point 01.xcf [353.4 KiB]
Downloaded 138 times

_________________
Image
Top
 Post subject: Re: Vanishing Point Rendering
PostPosted: Mon Jul 21, 2014 2:01 pm  (#3) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
he4rty wrote:
Wallace, I have used the multi-replicate script for this sort of thing, the steps I have done are listed below.

Create your initial image and autocrop.
then decide on your vanishing point and guides to locate.
on your image add a guide to the side of the image furthest away from your vanishing. then using the measure tool, measure the distance between your vanishing point and your newly added guide.
next create a new transparent square layer twice the size of the distance just measured and make sure the centre of this layer is located over your vanishing point.
merge this layer with your image layer.
open up the multi-replicate script and make sure you uncheck autocrop layer copies and also set stack to below each other

Here is my results have also attached the xcf file which includes a the multi-replicate settings.

Thanks for the quick reply he4rty, it didn't cross my mind to use multi-replicate. This should do the trick and thanks for adding the xcf file.
I'll change the post to "solved" once I make this work, but I think this will do the job.
Thanks again he4rty. :bigthup

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Vanishing Point Rendering
PostPosted: Mon Jul 21, 2014 2:08 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Aug 30, 2012
Posts: 2174
Welcome, If you interested you can use this method to create a vanishing point outside of the image area, also if you scale image by 1px, although does mean you'll be generating nearly 500 layers you can also make 3d text or shapes.

Image

_________________
Image


Top
 Post subject: Re: Vanishing Point Rendering
PostPosted: Mon Jul 21, 2014 2:49 pm  (#5) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
he4rty wrote:
Welcome, If you interested you can use this method to create a vanishing point outside of the image area, also if you scale image by 1px, although does mean you'll be generating nearly 500 layers you can also make 3d text or shapes.

I forgot all about this script and have only made use of it a few times.
I must explain more about what I'm trying to do.
I want to create about 200+ copies within the vanishing point. I want to have the image look like there are men standing in a "rank" next each other as far as the eye can see, like in my example image, but a much longer rank of men. The last man in the vanishing point or rank should be very tiny/very far away.
I don't know what settings I should use to create this kind of image. Would you have an idea what the settings might be for this?

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Vanishing Point Rendering
PostPosted: Mon Jul 21, 2014 2:56 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Aug 30, 2012
Posts: 2174
the number of copies would need to relate to the number of layers required, then you would need to set the final scale factors for X and Y as to how small you would like your final image, I tend to think of 1.00 = 100% and 0.10 would equal 10%, the only issue I can see happening is that the images will all merge into one and just look like a single person being extracted to a vanishing point.

_________________
Image


Top
 Post subject: Re: Vanishing Point Rendering
PostPosted: Mon Jul 21, 2014 3:16 pm  (#7) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
he4rty wrote:
the number of copies would need to relate to the number of layers required, then you would need to set the final scale factors for X and Y as to how small you would like your final image, I tend to think of 1.00 = 100% and 0.10 would equal 10%, the only issue I can see happening is that the images will all merge into one and just look like a single person being extracted to a vanishing point.

Yes that is what's happening.
I can't seem to make it look like a rank of men going into infinity.
Maybe if I make only 5 men duplicate that a few time then scale them down?
I want it to look much like this image below...
Image

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Vanishing Point Rendering
PostPosted: Mon Jul 21, 2014 3:30 pm  (#8) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
Relatively easy way:
  • open picture with character
  • duplicate N times by clicking frantically on the "duplicate layer" icon
  • use your mad python skillz to spread the copies uniformly by entering the following exactly in the python-fu console:
    # this assumes one single image opened in Gimp...
    image=gimp.image_list()[0]
    # shift each layer by 80 pixels
    for n,l in enumerate(image.layers): l.set_offsets(n*80,0)
  • chain all the layers together (shift-click on the link icon of any in the Layers list)
  • apply the perspective transform to the first, and try to extrapolate the intersection of the top and bottom line for your vanishing point
    Attachment:
    VanishingArmy-1.jpg
    VanishingArmy-1.jpg [ 211.74 KiB | Viewed 5612 times ]
  • press the transform button
    Attachment:
    VanishingArmy-2.jpg
    VanishingArmy-2.jpg [ 121.12 KiB | Viewed 5612 times ]

Edit: actually once you have spread the layer copies you can merge the visible layers and just apply the perspective on the single layer. But using separate layers seems to "naturally" keep the aspect ratio.

_________________
Image


Top
 Post subject: Re: Vanishing Point Rendering
PostPosted: Mon Jul 21, 2014 4:01 pm  (#9) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
ofnuts wrote:
Relatively easy way:
  • open picture with character
  • duplicate N times by clicking frantically on the "duplicate layer" icon
  • use your mad python skillz to spread the copies uniformly by entering the following exactly in the python-fu console:
    # this assumes one single image opened in Gimp...
    image=gimp.image_list()[0]
    # shift each layer by 80 pixels
    for n,l in enumerate(image.layers): l.set_offsets(n*80,0)
  • chain all the layers together (shift-click on the link icon of any in the Layers list)
  • apply the perspective transform to the first, and try to extrapolate the intersection of the top and bottom line for your vanishing point
    Attachment:
    VanishingArmy-1.jpg
  • press the transform button
    Attachment:
    VanishingArmy-2.jpg

Edit: actually once you have spread the layer copies you can merge the visible layers and just apply the perspective on the single layer. But using separate layers seems to "naturally" keep the aspect ratio.

You mean your mad python skillz. :hehe
I've never done anything with the python-fu console before.
I did copy the code you posted and also entered it into the python-fu console, but that's as far as I got. Without any results.


Thanks Ofnuts. :bigthup
Third times the charm, I figured it out and it worked out great.
I just had to change the amount of pixel shift, In order to have the men standing shoulder to shoulder.
I would post my results, but the image belongs to a paying client, for use in the advertising of his business .
I'll post something else, showing that I did get the code to work.


Here's the proof that I got it to work...
Image

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Last edited by Wallace on Mon Jul 21, 2014 5:19 pm, edited 1 time in total.

Top
 Post subject: Re: Vanishing Point Rendering
PostPosted: Mon Jul 21, 2014 5:18 pm  (#10) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
Wallace wrote:
Third times the charm, I figured it out and it worked out great


Cool, so for next time:

Attachment:
copy-and-shift-layer.zip [709 Bytes]
Downloaded 127 times

_________________
Image


Top
 Post subject: Re: Vanishing Point Rendering
PostPosted: Mon Jul 21, 2014 5:37 pm  (#11) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
ofnuts wrote:
Wallace wrote:
Third times the charm, I figured it out and it worked out great


Cool, so for next time:

Attachment:
copy-and-shift-layer.zip

I had to figure that out quickly. The project is due tomorrow.
Thanks a bunch for your help. I would have never been able to figure out that code on my own.
It came out really nice, my client will be very happy and now I can stop sweating. :hehe

BTW... Where do I put that "copy-and-shift-layer.py" file?
Does it go in my plug-in folder?

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Vanishing Point Rendering
PostPosted: Mon Jul 21, 2014 7:02 pm  (#12) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
Wallace wrote:
BTW... Where do I put that "copy-and-shift-layer.py" file?
Does it go in my plug-in folder?


Of course. The menu entry is at the bottom of the "Layer" menu in your image window.

_________________
Image


Top
 Post subject: Re: Vanishing Point Rendering...[SOLVED]
PostPosted: Mon Jul 21, 2014 7:18 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jan 10, 2013
Posts: 863
Very interesting ...
I do not have the mad python skillz as Wallace, and found it all very complicated.
But the effect is very useful in editing of images.

Tomorrow calmly try to get any results from it.
Thx guys!

_________________
bbbbbbbbbbbImage
bbbbbbbbbbb Be patient, English is not my language.


Top
 Post subject: Re: Vanishing Point Rendering...[SOLVED]
PostPosted: Mon Jul 21, 2014 8:00 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: Mar 10, 2014
Posts: 845
thank you Ofnuts I learn a new thing!
quick test py plug-in
Image


Top
 Post subject: Re: Vanishing Point Rendering...[SOLVED]
PostPosted: Mon Jul 21, 2014 8:05 pm  (#15) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
Akros wrote:
Very interesting ...
I do not have the mad python skillz as Wallace, and found it all very complicated.
But the effect is very useful in editing of images.

Tomorrow calmly try to get any results from it.
Thx guys!


That's why I provided a script...

_________________
Image


Top
 Post subject: Re: Vanishing Point Rendering...[SOLVED]
PostPosted: Mon Jul 21, 2014 10:07 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Jan 10, 2013
Posts: 863
ofnuts wrote:
That's why I provided a script...

Now it's super easy!
I tested the script, and get astonished to use it.
Even a noob like me can achieve these effects now! :troll

Thx ofnuts!

_________________
bbbbbbbbbbbImage
bbbbbbbbbbb Be patient, English is not my language.


Top
 Post subject: Re: Vanishing Point Rendering
PostPosted: Mon Jul 21, 2014 10:14 pm  (#17) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
ofnuts wrote:
Of course. The menu entry is at the bottom of the "Layer" menu in your image window.

Thanks Ofnuts, just double checking myself. ;)

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Vanishing Point Rendering...[SOLVED]
PostPosted: Tue Jul 22, 2014 6:39 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Jan 10, 2013
Posts: 863
I think I'm getting the basic use.
Still do not know how exactly align with the vanishing point. When I try, the image is very distorted in my attempts. But I've done some progress.

Image
Credits to http://sk-digiart.deviantart.com/

Wallace your post motivated the creation of this script, so my thanks to you also. :tyspin

_________________
bbbbbbbbbbbImage
bbbbbbbbbbb Be patient, English is not my language.


Top
 Post subject: Re: Vanishing Point Rendering...[SOLVED]
PostPosted: Wed Jul 23, 2014 10:18 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: Jan 15, 2013
Posts: 133
Haven't tried this myself or anything, but isn't there a script in the animation package to fill in tween layers?
Just a thought.
Would be cool if you could just make the first and last layers and have it make all the intermediate layers. Sounds too easy for it to actually work, but just thinking out loud.

_________________
Gimp 2.8.16
Arch Linux - XFCE 4.12
Some of my work.


Top
 Post subject: Re: Vanishing Point Rendering...[SOLVED]
PostPosted: Wed Jul 23, 2014 1:44 pm  (#20) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13016
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
akovia wrote:
Haven't tried this myself or anything, but isn't there a script in the animation package to fill in tween layers?
Just a thought.
Would be cool if you could just make the first and last layers and have it make all the intermediate layers. Sounds too easy for it to actually work, but just thinking out loud.

You may be right about there being something in the animation package that could render this. That was one of my first thoughts, but I don't have that package installed yet.
The copy-and-shift-layer plugin works well and it solved my issue. ;)

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) G'mic >rendering> Underwoods

9

No new posts Attachment(s) Rendering Various Textures and Materials

16

No new posts What is the point of making Gimp look and act like photoshop?

17

No new posts Attachment(s) Entry point _ZdaPv could not be located

2

No new posts Attachment(s) New filter "Rendering / Spline Spirograph"

4



* Login  



Powered by phpBB3 © phpBB Group