Vanishing Point Tool

Share your custom panels, brushes, papers... (you need to be registered to read posts in this section)
v.veidt
Posts: 67
Joined: 19 Oct 2009, 00:23

Vanishing Point Tool

Post by v.veidt » 27 Jun 2012, 06:42

I've made this brush to serve as a vanishing point tool for creating perspective grids. It's a fairly simple set of radiating lines, which is scalable and can be modified by the Tint brushes in the Sketch Panel. I hope you find it useful.
Spoiler : :
vp1.png
vp3.png
vanishingpoint.tvpx
This file was made in TVP 9.5 Standard if it matters.
You do not have the required permissions to view the files attached to this post.

Elodie
Posts: 13913
Joined: 06 Jan 2009, 09:53
Location: Metz

Re: Vanishing Point Tool

Post by Elodie » 27 Jun 2012, 07:53

Thank you for sharing :)

User avatar
Animark
Posts: 501
Joined: 16 Oct 2008, 15:26
Location: Berlin

Re: Vanishing Point Tool

Post by Animark » 27 Jun 2012, 12:00

Great! Thumbs up!

... and thanks a lot :-)
TVPaint 10.5.7 - Win10/64
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)

User avatar
lemec
Posts: 1668
Joined: 19 Feb 2006, 08:54
Location: Toronto, Ontario, Canada
Contact:

Re: Vanishing Point Tool

Post by lemec » 12 Jul 2012, 21:15

This is a rather heavily modified version of KylerK's vanishing point tool.
Spoiler : Kyler's tutorial video :
This version automatically switches you to the propelling pencil and restores your brush afterwards.
It makes use of the tv_undoOpenStack and tv_undoCloseStack commands to avoid clobbering your undo buffer
It locks/unlocks the display during operation for faster results.
It also uses tv_zLine to fade the opacity at the center point to eliminate the "fuzzy navel" artifact at the vanishing point
vp0.png

Code: Select all

Param Circle

Parse result command Cx Cy r button

tv_getActiveTool
oldTool = Result

if r>800
	t=800
Else
	t=r
End

tv_projectInfo
parse Result name width height extra

maxLen = sqr(width*width + height*height)

tv_propelling mode "color" power 100 opacity 100 dry 0 aaliasing 1 gradient 0 cpower "10;2 0 1 0 0 1 1 "
tv_undoOpenStack
tv_lockDisplay
FOR i = 1 TO t
	angle = i * (360 / t)
	x1=COS(angle) * maxLen
	y1=SIN(angle) * maxLen

	tv_ZLine Cx Cy x1+Cx y1+Cy button 0 255
END
tv_UnLockDisplay
tv_cmd oldTool
tv_undoCloseStack "Perspective Guide"
This one is a little different in that it randomizes the angle and the distance to the center point. It doesn't affect the current tool, so it's useful for various zooming effects.
vp1.png

Code: Select all

Param Circle

Parse result command Cx Cy r button

tv_projectInfo
parse Result name width height extra
maxLen = sqr(width*width + height*height)

r = 800 * (r / (maxLen / 3))

if r>800
	t=800
Else
	t=r
End

tv_undoopenstack
tv_LockDisplay
FOR i = 1 TO t
	r1 = rnd(maxLen / 2)
	o2 = 255 * (1 - (r1 / (maxLen / 2)))
	angle = rnd(3600)
	x2=COS(angle/10)
	y2=SIN(angle/10)
	x1=x2 * maxLen
	y1=y2 * maxLen
	x2 = x2 * r1
	y2 = y2 * r1
	
	tv_ZLine x2+Cx y2+Cy x1+Cx y1+Cy button 0 o2
END
tv_UnLockDisplay
tv_undoclosestack "Radial Burst"
You do not have the required permissions to view the files attached to this post.
Last edited by lemec on 13 Jul 2012, 17:57, edited 3 times in total.
(Win7x64, TVP Pro 11 32-bit)

User avatar
lemec
Posts: 1668
Joined: 19 Feb 2006, 08:54
Location: Toronto, Ontario, Canada
Contact:

Re: Vanishing Point Tool

Post by lemec » 12 Jul 2012, 21:32

vPForestTool.png
vPForest.png
You do not have the required permissions to view the files attached to this post.
(Win7x64, TVP Pro 11 32-bit)

Elodie
Posts: 13913
Joined: 06 Jan 2009, 09:53
Location: Metz

Re: Vanishing Point Tool

Post by Elodie » 13 Jul 2012, 06:55

Wow, very nice :D

v.veidt
Posts: 67
Joined: 19 Oct 2009, 00:23

Re: Vanishing Point Tool

Post by v.veidt » 13 Jul 2012, 07:39

Wow, thanks for all the work, especially with the "fuzzy navel" issue. I suppose I should really learn to script for TVP.

Not to seem belligerently ignorant, but how does one implement these wonderful scripts?

User avatar
lemec
Posts: 1668
Joined: 19 Feb 2006, 08:54
Location: Toronto, Ontario, Canada
Contact:

Re: Vanishing Point Tool

Post by lemec » 13 Jul 2012, 08:44

1: create a new custom panel action (right click an empty spot on an EDITABLE custom panel and choose Add Action)
2: edit the new action (right click it)
3: Choose Embedded Script
4: copy/paste the script of your choice into the script window that comes up.
(Win7x64, TVP Pro 11 32-bit)

v.veidt
Posts: 67
Joined: 19 Oct 2009, 00:23

Re: Vanishing Point Tool

Post by v.veidt » 13 Jul 2012, 22:09

I can't seem to get either of these scripts to work. The Param Circle command is definitely working and I don't get an error message, but there is no result when I use the action. Is there any reason this would not work on Mac OS X?

Update: It works flawlessly on Windows. Now I'm extra glad I switched over. Thanks.

kariP
Posts: 132
Joined: 20 Jul 2010, 19:14
Location: Turku, Finland

Re: Vanishing Point Tool

Post by kariP » 24 Jul 2012, 07:34

They both seem to work on my mac, very nice, especially the perspective tool!
I adjusted the opacity of the endpoint from 0 to 3. Now it creates a small dot into the horizon, which is a bit clearer for me. And with low amount of lines, no funny stuff on the navel area either. A Big thank you for the script!
iMac OSX El capitan 10.11.6, 32 gb DDR3, Intel Core i7 - tvp pro 11.0.6 - 64 bit Cintiq 22"

User avatar
lemec
Posts: 1668
Joined: 19 Feb 2006, 08:54
Location: Toronto, Ontario, Canada
Contact:

Re: Vanishing Point Tool

Post by lemec » 24 Jul 2012, 07:56

Hm. Maybe I should make a version that will set the vanishing point to the intersection of two non-parallel lines. Might be useful for getting perspective guides for imagery that has an existing vanishing point.
(Win7x64, TVP Pro 11 32-bit)

User avatar
Fabrice
Posts: 10079
Joined: 17 Jul 2007, 15:00
Contact:

Re: Vanishing Point Tool

Post by Fabrice » 24 Jul 2012, 08:05

hey Mark and Vincent Veidt, excellent job, as usual ;)
Fabrice Debarge

User avatar
Peter Wassink
Posts: 3534
Joined: 17 Feb 2006, 15:38
Location: Amsterdam (Basse-Lotharingie)
Contact:

Re: Vanishing Point Tool

Post by Peter Wassink » 08 Aug 2012, 15:09

lemec wrote:Hm. Maybe I should make a version that will set the vanishing point to the intersection of two non-parallel lines. Might be useful for getting perspective guides for imagery that has an existing vanishing point.
you mean a version with an input of four points that would create a grid to match an existing image?
cool idea!
Peter Wassink - 2D animator
• PC: Win10/64 Home - Xeon Quadcore E5410@2.33Ghz - 12Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 8Gb RAM

User avatar
slowtiger
Posts: 2352
Joined: 08 May 2008, 21:10
Location: berlin, germany
Contact:

Re: Vanishing Point Tool

Post by slowtiger » 08 Aug 2012, 16:26

+1. That's something so fundamental, yet I haven't seen it in any graphics program yet: let the user create a rectangle or tetragon, and the script would create a grid of that. Adjust the original tetragon, and the grid changes with it.
grid.png
You do not have the required permissions to view the files attached to this post.
TVP 10.0.18, Mac Pro Quadcore 3 GHz, 16 GB RAM, OS 10.11, QT 7.7.3

User avatar
Fabrice
Posts: 10079
Joined: 17 Jul 2007, 15:00
Contact:

Re: Vanishing Point Tool

Post by Fabrice » 09 Aug 2012, 12:32

Maybe it can help :
The vanishing points are usable in the warp tool.
So if you draw a grid on the screen, you can use the warp tool to put it in perspective, using the vanishing points of the warp tool.

nb : This kind of grid is in the ToDo list for a future 10.x version. with the complete renewal of grid, guides, etc ... (old code ...)
Fabrice Debarge

Post Reply