Lua script for Polar mapping correction of seamless textures

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  11 November 2006
Lua script for Polar mapping correction of seamless textures

If you texture a sphere you know how it can pinch the poles and show seams. There are tools for Photoshop to remap with a polar transform so that a spherical projection won't show these.

Paul Bourke has described the algorithm in 2001. Here's a Lua script version:

This should work in any of the Project Dogwaffle versions supporting plugins (PD Artist, PD Pro, PD 2 and PD 1.2 freeware version), as well as the GIMP and ArtWeaver, since this script does not make use of any Dogwaffle-only or Artweaver-only GUI features, it is in fact gui-less.

I hope it is useful. It was created in about 2 hours late last night - and I don't have uch scripting experience day to day with Lua, just the occasional dabble. So it was very interesting for me to see the well written code from Paul turn into a great Lua experiment.

If you use the GIMP, ArtWeaver or any Dogwaffle, I'd love to hear feedback. If you use other imaging tools that can run this script you absolutely must share your information and experience for the benefit of all starving artits :-)
  11 November 2006
How would you use it in the gimp?
Typical FOV Angles
  11 November 2006
Originally Posted by billrobertson42: How would you use it in the gimp?

There's a plugin available for the GIMP called gluas, it's what served as the basis also for the DogLua plugin in Dogwaffle and the Lua plugin in ArtWeaver. I forget who created it, but it's prominently visible and accessible at the gimp's website. I have a not-so-recent installation of Gimp on this system, not sure if gluas came installed with it automatically, I think not.

When you have the Lua capability installed, whether in Gimp or Artweaver or Dogwaffle or elsewhere, you should be able to browse for files ending in .lua, select one and execute that script. It will apply to the current image, perhaps the current layer (I'll have to re-visit that on the Gimp's side)
  11 November 2006
I installed gluas, and it's now in the Filter menu:

Filters > Generic > gluas...
  11 November 2006
Originally Posted by staigerman: I installed gluas, and it's now in the Filter menu:

Filters > Generic > gluas...

oh and I forgot to mention... works like a charm on Gimp (I have v2.2) though quite a bit faster in Dogwaffle. But hey it works.
  11 November 2006
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 10:12 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.