SketchUcation Plugin Store

 

 

[Plugin] UV Toolkit (2.2.2) — 06 February 2011

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Jim » Sun Nov 29, 2009 8:44 pm

Ok Thanks, I was just thinking about a quick shortcut to rotate a texture 90 degrees (no stretching.)
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Sun Nov 29, 2009 8:54 pm

To add a hotkey to?

Since SU already has a rotate method I haven't made one myself.
uvrotate.PNG


But you can't assign a hotkey to it. That is one reason why I have considered recreating my own function. But it haven't been high up on the list.
Please, register (free) to access all the attachments on the forums.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Jim » Sun Nov 29, 2009 9:10 pm

Looking at your UV Tools, you are shifting the positions of points in 2 arrays. Is it as simple using a rotation on the arrays (around face.normal at face.bounds.center, maybe) instead of shifting? I'll try that.
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Sun Nov 29, 2009 9:15 pm

I don't quite remember what I did. But what I do is somewhat special for quad-faces with textures stretched to fit.
Think you need some different handling for a general rotate method...
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Jim » Sun Nov 29, 2009 9:37 pm

It works for square textures (where the image is square) but distorts rectangular ones.
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Sun Nov 29, 2009 9:47 pm

I think what you need to do is sample four points in a quadratic formation of the face's plane and then shift the 3Dpoints.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Pixero » Tue Dec 22, 2009 8:39 am

Here's my two requests for a great tool:

First, an option to keep the scale of a texture when rotating.



Second, add it to the right click menu for easier access.

Edit: Fixed the image size. :roll:
Last edited by Pixero on Tue Dec 22, 2009 9:19 am, edited 1 time in total.
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1284
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Tue Dec 22, 2009 9:08 am

Pixero wrote:First, an option to keep the scale of a texture when rotating.

That's a mighty small image there... can't see much what's going on.

The rotate feature is meant for textures stretched to fit quad-faces. Special purpose rotate. SU already got rotate methods built in - When you activate SU's texture gizmo - you have a Rotate sub-menu.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Pixero » Tue Dec 22, 2009 9:21 am

Still its great to be able to select a bunch of faces and rotate at the same time.
You cant do that with SU's build in tools can you?
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1284
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Tue Dec 22, 2009 9:24 am

Pixero wrote:Still its great to be able to select a bunch of faces and rotate at the same time.
You cant do that with SU's build in tools can you?

No you can't. Good point. I could add that feature. :thumb:
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Pixero » Tue Dec 22, 2009 9:26 am

I'm using it to rotate the texture on leaves on trees so doing it manually isn't an option. ;)

And don't forget the right click menu...
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1284
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Tue Dec 22, 2009 9:30 am

Only thing though, about which points should it rotate...?
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Pixero » Tue Dec 22, 2009 9:34 am

Can't you just swap the UV "scale"?
I mean like it is now but with an option to keep the scale on the X and Y axis.
(Rotating the points so that Points A,B,C,D would be D,A,B,C or something like that.)
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1284
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Tue Dec 22, 2009 9:49 am

There is no such fixed points. The one for the quad-faces works like that because you can use the four vertices of the face. But you can't do that when you have differently shaped faces and/or want to preserve scale.

With SU, you have to generate the set of points yourself and query the face. So when rotating, I need one anchor point.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Tue Dec 22, 2009 9:50 am

hm... or maybe it won't be a problem.... hmm
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Pixero » Tue Dec 22, 2009 9:57 am

Ok, what would you suggest.
Center of face? Or a window where you can choose like in Profile Builder?

User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1284
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Tue Dec 22, 2009 10:04 am

centerofface.png

That's the thing: what would you determine as centre of face for something like this? (or top,left,right,etc...)
Please, register (free) to access all the attachments on the forums.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Pixero » Tue Dec 22, 2009 10:17 am

Center of bounding box maybe?
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1284
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Gaieus » Tue Dec 22, 2009 11:05 am

thomthom wrote:
centerofface.png

That's the thing: what would you determine as centre of face for something like this? (or top,left,right,etc...)

What kind of a quad is that, Thom?
:shock:
Gai...
User avatar
Gaieus
Administrator
 
Posts: 27603
Joined: Sat Oct 20, 2007 8:24 am
Location: Pécs, Hungary
Name: Csaba Pozsárkó
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: historical reconstruction
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Tue Dec 22, 2009 12:06 pm

:D The exotic kind. ;)

My point was - that when you don't deal with regular quad-faces - it's much harder to predict desired result.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby TIG » Tue Dec 22, 2009 12:14 pm

thomthom wrote:That's the thing: what would you determine as centre of face for something like this? (or top,left,right,etc...)

There's a 'Center of Gravity' script somewhere - 'centroid.rb' - by TBD that adds a cpoint at the CoG of a face.
I can't find it so here it is again
centroid.rb
Please, register (free) to access all the attachments on the forums.
Last edited by TIG on Tue Dec 22, 2009 12:19 pm, edited 1 time in total.
TIG
User avatar
TIG
Global Moderator
 
Posts: 13914
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Pixero » Tue Dec 22, 2009 12:15 pm

Would it be possible to have an option for it to automagicly recognise the lenght direction based on witch side is longest on a quad and rotate it to match that.
Like if I want to rotate some UVs on a branch to line up the texture with the trees branches length direction. Would be cool.
Am I making myself clear? :?
Please, register (free) to access all the attachments on the forums.
Last edited by Pixero on Tue Dec 22, 2009 12:19 pm, edited 1 time in total.
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1284
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Tue Dec 22, 2009 12:17 pm

The thing is - would picking the "centre" (however it's defined) be any different, as just picking the first vertex I can get? At all seem rather arbitrary in terms of the result.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Tue Dec 22, 2009 12:18 pm

Pixero wrote:Would it be possible to have an option for it to automagicly recognise the lenght direction based on witch side is longest on a quad and rotate it to match that.
Like if I want to rotate some UVs on a branch to line up the texture with the trees branches length direction. Would be cool.
Am I making myself clear? :?

Are we talking about rotating on quads strictly? I was under the impression this would be a general purpose rotation.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Tue Dec 22, 2009 12:19 pm

Pixero wrote:Would it be possible to have an option for it to automagicly recognise the lenght direction based on witch side is longest on a quad and rotate it to match that.
Like if I want to rotate some UVs on a branch to line up the texture with the trees branches length direction. Would be cool.
Am I making myself clear? :?

Can you show a little screenshot of your starting point and your desired result?
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Pixero » Tue Dec 22, 2009 12:20 pm

See image in my updated post above.
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1284
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Tue Dec 22, 2009 12:21 pm

Pixero wrote:See image in my updated post above.

Can you show that with hidden geometry on so I can see the mesh?
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Pixero » Tue Dec 22, 2009 1:10 pm

Here's another one with hard edges and lighter texture.
It would be useful for things like trees, railings, plumbing...
Here the texture is applied vertical but should of cause follow the direction of the branches.
Please, register (free) to access all the attachments on the forums.
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1284
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby thomthom » Tue Dec 22, 2009 1:22 pm

The thing is, is's hard to determine the direction here. As far as I can see, there's no quad faces in that three, instead lots of triangles. The longest side of each triangle isn't necessarily the direction you want.

I now understand what you want. But ... it ain't easy. Trying to create predictability in organic shapes...
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] UV Toolkit (1.0.0) — 15 October 2009

Postby Pixero » Tue Dec 22, 2009 1:35 pm

To me it look like it's the direction of the second longest side in the triangles.
(Not the hypothenuse)
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1284
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Need SketchUp Books, Models, Styles or Textures? Check out our One Stop Shop for SketchUp.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012

PreviousNext

Return to Plugins

Who is online

Users browsing this forum: Humpmetwice, michael310, timj and 12 guests