Finding Coordinates of the Image of a Point by OOP Rotation

A forum dedicated to George scripting questions
User avatar
NathanOtano
Posts: 1187
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by NathanOtano »

I just checked what you were talking about Fabrice (had to finish to watch the premiere of lastman tv first haha).

I already tried to apply only rotate and not scale using the variable change you suggested but the formula was still outputting something wrong. ScaNext is just the scale image of NextA. I tried to do one, the other, reverse the order of the transformations and I always have the rotation failing and the scale succeeding.

Also you can note that when I don't calculate any rotation but use scale by not clicking with rmb on the first click, the scale (that still have to go threw the rotation formula with a 0 degree angle because of my script) works correctly and i have the right translate compensation.

Not sure applying scale on my rotation center will change anything because of the reason you suggested. As im using the values of the original point without any transformation like translate, it's supposed to be in the right place. I'll check that tommorow on each variable however, could be something related !

And I'll check the formulas alone as suggested to see if it's a problem on software's side. But the script almost already works so it will do for the talk

EDIT : I've just seen that in your formulas you also replaced the second variable to the other coordoninates. Is it on purpose ? Will try it tommorow but I'm not sure it follows the formula.

Edit 2 : maybe I got it. The parameter I use for input of rotation works but Y axis in tvpaint are inverted regarding pixels (0 position is top right) so maybe I inverted the sign while first calculating my rotation direction (so my input works...) and I have to invert the angle in the formulas afterward.
Hope it's the solution haha
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
User avatar
Fabrice
Posts: 10077
Joined: 17 Jul 2007, 15:00
Contact:

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by Fabrice »

I wasn't thinking that somebody would have to read it other than me haha
:wink:
NathanOtano wrote:EDIT : I've just seen that in your formulas you also replaced the second variable to the other coordoninates. Is it on purpose ? Will try it tommorow but I'm not sure it follows the formula.
yes, it was on purpose.
NathanOtano wrote: Edit 2 : maybe I got it. The parameter I use for input of rotation works but Y axis in tvpaint are inverted regarding pixels (0 position is top right) so maybe I inverted the sign while first calculating my rotation direction (so my input works...) and I have to invert the angle in the formulas afterward.
Hope it's the solution haha
arrgh ... you are right.
That might be it !
Fabrice Debarge
User avatar
NathanOtano
Posts: 1187
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by NathanOtano »

Edit 2 : maybe I got it. The parameter I use for input of rotation works but Y axis in tvpaint are inverted regarding pixels (0 position is top right) so maybe I inverted the sign while first calculating my rotation direction (so my input works...) and I have to invert the angle in the formulas afterward.
Hope it's the solution haha
It worked yay! haha
So to explain : the coordinate system used for the OOP angle input is not the same than the one of the pixels you click on (because you want to have your drawing going clockward with positive value and backward with negative value on OOP). While calculating with my math formulas however I'm using the coordonates of the pixels I click on, the Y axis is inverted.
So when I was serching my angle for OOP input I inverted this value to make it work, thinking I just inverted two lines. But for my translate compensation calculation, I needed the right value.

Basically the math problem was at lines 69, 71, 116, and 118 :D

I'll add some messages to help the setup of the script and then release it as soon as possible :) and make it work if OOP is already set. Next step it two button to activate desactivate rotate/scale using strings
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
User avatar
NathanOtano
Posts: 1187
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by NathanOtano »

Ok I finished it and I've been also able to make it work even if you have an OOP already set (was some headache to do but worth it). I added some text windows to know what you have to click on, it's bothering me so I'll add an option to desactivate it later. You have to see only the previous and next lighttable image.

I'll post it properly when I'll be able to, with a nice description and gif, in the content sharing session. For now if you can try it and give feedbacks it could be awesome:
Attachments
OTANO_OopSet_WIP.tvpx
(38 KiB) Downloaded 152 times
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
User avatar
Peter Wassink
Posts: 4283
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by Peter Wassink »

! amazing !
it works flawlessly here.
congratz,
and thanks for this great tool Nathan.
This is so cool!
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
Peter Wassink
Posts: 4283
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by Peter Wassink »

i did encounter an issue

when i only want the previous image to OOP
i used rmb on the previous image but not on the following image ( because there wasn't one and i just clicked to make the pop up go away)
i got this error message:
nathan-oop-panel.jpg
nathan-oop-panel.jpg (12.46 KiB) Viewed 1771 times
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
schwarzgrau
Posts: 1238
Joined: 23 Jan 2012, 22:08
Location: Offenbach / Germany
Contact:

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by schwarzgrau »

Ah a shame I'm working on a job at the moment and don't have access to a cintiq, I would love to try it.
Windows 11 22H2 / TVP 11.7.0 PRO WIBU / Cintiq 22HD
Windows 11 22H2 / TVP 11.7.0 PRO WIBU / Mobile Studio Pro 16" (2019)
Android 13 / TVP 11.7.0 / Galaxy Tab 7 FE
INSTAGRAM
User avatar
NathanOtano
Posts: 1187
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by NathanOtano »

That's interesting : ) what to do if you want to set only one image ?
Would you prefer two different buttons to launch or this click for nothing (bug beside)? I can also choose to follow the images activated on your lighttable so if you have only the image before visible you'll not oop the invisible one. I'll have to adapt this rmb thing but that's easy
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
User avatar
Peter Wassink
Posts: 4283
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by Peter Wassink »

NathanOtano wrote:That's interesting : ) what to do if you want to set only one image ?
Would you prefer two different buttons to launch or this click for nothing (bug beside)? I can also choose to follow the images activated on your lighttable so if you have only the image before visible you'll not oop the invisible one. I'll have to adapt this rmb thing but that's easy
I think the last option (automatic detection) sounds the most user friendly.
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
NathanOtano
Posts: 1187
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by NathanOtano »

I agree, let's do that then. Plus adding support for images -2 and 2
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
User avatar
NathanOtano
Posts: 1187
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by NathanOtano »

Some news (still want some time to finish it before posting but I'll post updates here for testing) : I updated my OOP set script so it sets only the images that are visible on your lighttable, as discussed with peter, and it works for images -2, -1, 1 and 2. I also updated my modified OOP flip scripts based on MJ ones so they are faster.

If I take some time I can extend the set script to the whole activated lighttable images, It's just copy pasting and changing variables for me but for now it's enough to test if people (and also for me) needs 5 oop drawings or not if setup is easier (and because people don't always work with images -1 and 1, sometimes using instead the whole lightable and choosing the images, that's better if it works with things like image -6 and 8 for exemple). I'll post it when I'll have updated the OOP flip script so it also manages those images (so you can flip your whole oop drawings).
I can already flip 5 images just need to make it avoid unset images, for now it's only the 3 images OOP.
Attachments
OTANO_OOP_Tools.tvpx
(360 KiB) Downloaded 134 times
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
User avatar
meslin
Posts: 154
Joined: 26 Oct 2008, 03:07
Location: Connecticut / New York

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by meslin »

OTANO_OOP_Tools_Icons.png
OTANO_OOP_Tools_Icons.png (5.14 KiB) Viewed 1721 times
Great enough to deserve consistent icons!
Attachments
OTANO_OOP_Tools_Icons.tvpx
(352 KiB) Downloaded 150 times
User avatar
NathanOtano
Posts: 1187
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by NathanOtano »

haha thanks!
because of my hi res display on my cintiq companino 2 I can't really read tiny icons, but that's kind! Especially the last one. I even notice that my first one is blurry :3 will do something consistent for the release
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
User avatar
meslin
Posts: 154
Joined: 26 Oct 2008, 03:07
Location: Connecticut / New York

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by meslin »

Yeah, I made a 23x23 template for making pixel perfect icons. It would be cool if the interface scaling also allowed for 46x46/69x69 icons...
User avatar
NathanOtano
Posts: 1187
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: Finding Coordinates of the Image of a Point by OOP Rotat

Post by NathanOtano »

Yep I also do my icons on templates (i thinks i just resized the first one somehow), I just love aliasing and hand drawn typos haha. And I work at the smallest scale to have more space to draw, (don't click on the interface anymore cause every key of my keyboard is full of 3 or more scripted shortcuts... Yes I'm of those crazy guys).
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Post Reply